[DEV] Global host option/SMB server rewrite/LDAP server rewrite#39
Open
MatrixEditor wants to merge 17 commits intomasterfrom
Open
[DEV] Global host option/SMB server rewrite/LDAP server rewrite#39MatrixEditor wants to merge 17 commits intomasterfrom
MatrixEditor wants to merge 17 commits intomasterfrom
Conversation
- filters.py: remove FilterObj.from_string() constructor alias (pure passthrough) - loader.py: replace os.path.join/exists/isfile/basename with pathlib equivalents, remove import os - paths.py: add get_dementor_path() and get_config_path() that re-resolve HOME on each call, for use in test contexts where HOME changes post-import - servers.py: extract _ThreadingServerInitMixin to eliminate duplicate __init__ in ThreadingUDPServer and ThreadingTCPServer; remove get_service_name() abstract method, consolidating into service_name property directly
completer.py: - Add -> Iterable[Completion] return annotation to get_completions() - move TLS cert generation to config/tls.py - config/__init__.py: introduce init_config(default_path, user_path) as an explicit application startup function - Migrate all _CLEARTEXT/_NO_USER/_HOST_INFO private aliases to public names across 11 files (ftp, http, imap, ldap, mssql, mysql, pop3, smtp, x11, ntlm, tui/commands/database) - tui/commands/proto.py: update caller to use property access
- msrpc/rpc.py: add -> None to all setter methods, fix set_rcp -> set_rpc typo - WinRM.apply_config: call super().apply_config() first so TOML [WinRM] Server entries are honoured; fall back to hardcoded 5985/5986 defaults only when user has not configured anything imap.py: - Add @overload decorators to challenge_auth() expressing bytes vs str conditional return based on decode parameter (Literal[True/False]) - ldap.py: replace 3 inline fqdn.split() with ntlm_split_fqdn() - ldap.py: convert triple-quoted string inside if-block to proper # comments - kerberos.py: rename KRB5_Err → krb5_err, KRB5_ASREQ_to_hashcat_format → krb5_asreq_to_hashcat_format (snake_case consistent with ntlm_* convention)
- mysql.py: rename SERVER_STATUS_flags_enum → ServerStatusFlags (PascalCase) - ntlm.py: extract _apply_ntlm_field() helper, remove 7 duplicate try/except blocks - ntlm_auth_create_challenge(): thin wrapper for LDAP callers - Extract _store_ntlm_captures() from ntlm_handle_authenticate_message to separate auth-parsing from credential-storage concerns - Extract _decode_ntlm_identity_string() to remove duplicate user/domain decode try/excepts - ntlm.py: extract _build_smb1_host_info() helper
pop3.py: - Add @overload decorators to challenge_auth() expressing bytes vs str conditional return based on decode parameter (Literal[True/False]) - remove FQDN config attribute (unused) - smtp.py/quic.py: convert get_service_name() overrides to service_name property - smb.py: Extracted _fill_smb1_negotiate_params() helper in SMBHandler to eliminate verbatim duplication of 9 field assignments (DialectIndex, SecurityMode, MaxMpxCount, MaxNumberVcs, MaxBufferSize, MaxRawSize, SessionKey, LowDateTime, HighDateTime, ServerTimeZone) between the extended and non-extended security paths of handle_smb1_negotiate - Refactor smb.py handle_smb1_negotiate: remove duplicated command build/send; - smb.py: add missing support for custom error code - SMTP.create_server_thread: add type annotations (SessionConfig, SMTPServerConfig -> BaseServerThread)
- standalone.py: fix supress_output typo -> suppress_output - standalone.py: remove dead 'if not supress_output: pass' block
+ smb/ntlm tests: update method names and config
+ replace unicode symbols with ascii equivalents
- remove unnecessary HostDerivedValue
- cli.rst: add --host option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request tracks the latest changes and preparations for the 1.0.0.dev22 release: global host option, SMB server rewrite, LDAP server rewrite, NetBIOS NETLOGON support and code cleanup.
Most important changes:
--host/-H)Changes
HOME on each call, for use in test contexts where HOME changes post-import
in ThreadingUDPServer and ThreadingTCPServer; remove get_service_name()
abstract method, consolidating into service_name property directly
Server entries are honoured; fall back to hardcoded 5985/5986 defaults
only when user has not configured anything
conditional return based on decode parameter (Literal[True/False])
krb5_asreq_to_hashcat_format (snake_case consistent with ntlm_* convention)
Closes #35