Repository Analysis

fortra/impacket

Impacket is a collection of Python classes for working with network protocols.

11.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of fortra/impacket, a Python project with 15,905 GitHub stars. SynthScan v2.0 examined 193,232 lines of code across 352 source files, recording 2053 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 11.7 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

11.7
Adjusted Score
11.7
Raw Score
100%
Time Factor
2026-07-08
Last Push
15.9K
Stars
Python
Language
193.2K
Lines of Code
352
Files
2.1K
Pattern Hits
2026-07-14
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 3HIGH 18MEDIUM 112LOW 1920

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2053 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Excessive Try-Catch Wrapping565 hits · 589 pts
SeverityFileLineSnippetContext
LOWsetup.py41except Exception:CODE
LOWimpacket/IP6_Address.py249 except Exception:CODE
MEDIUMimpacket/IP6_Address.py244def is_a_valid_text_representation(cls, text_representation):CODE
LOWimpacket/ntlm.py54except Exception:CODE
MEDIUMimpacket/tds.py1282def disconnect(self):CODE
LOWimpacket/tds.py1110 except Exception as e:CODE
LOWimpacket/tds.py1274 except Exception:CODE
LOWimpacket/tds.py1553 except Exception as e:CODE
LOWimpacket/tds.py1563 except Exception:CODE
LOWimpacket/tds.py1663 except Exception as e:CODE
LOWimpacket/smb.py3095 except Exception:CODE
MEDIUMimpacket/smbserver.py2896def _kerberos_auth(token, connData, smbServer):CODE
LOWimpacket/smbserver.py1515 except Exception as e:CODE
LOWimpacket/smbserver.py1526 except Exception as e:CODE
LOWimpacket/smbserver.py3529 except Exception as e:CODE
LOWimpacket/smbserver.py3543 except Exception as e:CODE
LOWimpacket/smbserver.py178 except Exception as e:CODE
LOWimpacket/smbserver.py321 except Exception as e:CODE
LOWimpacket/smbserver.py642 except Exception as e:CODE
LOWimpacket/smbserver.py918 except Exception as e:CODE
LOWimpacket/smbserver.py1112 except Exception as e:CODE
LOWimpacket/smbserver.py1250 except Exception as e:CODE
LOWimpacket/smbserver.py1387 except Exception as e:CODE
LOWimpacket/smbserver.py1574 except Exception as e:CODE
LOWimpacket/smbserver.py1609 except Exception as e:CODE
LOWimpacket/smbserver.py1657 except Exception as e:CODE
LOWimpacket/smbserver.py1855 except Exception as e:CODE
LOWimpacket/smbserver.py1901 except Exception as e:CODE
LOWimpacket/smbserver.py1954 except Exception as e:CODE
LOWimpacket/smbserver.py2141 except Exception as e:CODE
LOWimpacket/smbserver.py2241 except Exception as e:CODE
LOWimpacket/smbserver.py2271 except Exception as e:CODE
LOWimpacket/smbserver.py2681 except Exception as e:CODE
LOWimpacket/smbserver.py2804 except Exception as e:CODE
LOWimpacket/smbserver.py3174 except Exception as e:CODE
LOWimpacket/smbserver.py3405 except Exception as e:CODE
LOWimpacket/smbserver.py3435 except Exception as e:CODE
LOWimpacket/smbserver.py3702 except Exception as e:CODE
LOWimpacket/smbserver.py3773 except Exception as e:CODE
LOWimpacket/smbserver.py3824 except Exception as e:CODE
LOWimpacket/smbserver.py3852 except Exception as e:CODE
LOWimpacket/smbserver.py4126 except Exception as e:CODE
LOWimpacket/smbserver.py4199 except Exception as e:CODE
LOWimpacket/smbserver.py4736 except Exception as e:CODE
LOWimpacket/smbserver.py4799 except Exception as e:CODE
LOWimpacket/mqtt.py279 except Exception:CODE
LOWimpacket/mqtt.py356 except Exception as e:CODE
LOWimpacket/ese.py952 except Exception:CODE
LOWimpacket/acl.py382 except Exception as e:CODE
LOWimpacket/crypto.py30except Exception:CODE
LOWimpacket/structure.py144 except Exception as e:CODE
LOWimpacket/structure.py170 except Exception as e:CODE
LOWimpacket/structure.py491 except Exception:CODE
LOWimpacket/winregistry.py242 except Exception as e:CODE
LOWimpacket/winregistry.py824 except Exception:CODE
LOWimpacket/nmb.py554 except Exception as e:CODE
LOWimpacket/nmb.py990 except Exception as ex:CODE
MEDIUMimpacket/dpapi.py474 print('Error decrypting entry #%d' % i)CODE
LOWimpacket/dcerpc/v5/drsuapi.py50except Exception:CODE
LOWimpacket/dcerpc/v5/dcomrt.py1066 except Exception as e:CODE
505 more matches not shown…
Over-Commented Block438 hits · 429 pts
SeverityFileLineSnippetContext
LOWsetup.py1#!/usr/bin/env pythonCOMMENT
LOWimpacket/ICMP6.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/eap.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/hresult_errors.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/dns.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/dns.py21# - 2181 - Clarifications to the DNS Specification [https://www.ietf.org/rfc/rfc2181.txt]COMMENT
LOWimpacket/dns.py421 # Preference Unsigned 16-bit integer.COMMENT
LOWimpacket/smb3.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/smb3.py21#COMMENT
LOWimpacket/smb3.py901 # Do not encrypt anonymous connectionsCOMMENT
LOWimpacket/smb3.py1121 # Application KeyCOMMENT
LOWimpacket/smb3.py1601 packet['Data'] = smbLockCOMMENT
LOWimpacket/IP6_Address.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/ntlm.py61NTLM_AUTH_PKT = 4COMMENT
LOWimpacket/ntlm.py101# If set, requests the usage of the LMOWF (section 3.3). An alternate name for this field isCOMMENT
LOWimpacket/ntlm.py121# TargetName field of the CHALLENGE_MESSAGE. If this bit is set, then NTLMSSP_TARGET_TYPE_DOMAIN MUST NOT be set.COMMENT
LOWimpacket/ntlm.py161NTLMSSP_RESERVED_8 = 0x00000100COMMENT
LOWimpacket/ntlm.py701 if ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_KEY_EXCH:COMMENT
LOWimpacket/NDP.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/tds.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/tds.py21# ToDo:COMMENT
LOWimpacket/tds.py1461 # Here comes the important part, MSSQL server does not expect a raw TLS socketCOMMENT
LOWimpacket/smb.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/smb.py21#COMMENT
LOWimpacket/smb.py41# [ ] Try [SMB]transport fragmentation using Transact requestsCOMMENT
LOWimpacket/smb.py2901 # least significant 32 bits of the SecuritySignature field and the remainingCOMMENT
LOWimpacket/smbserver.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/smbserver.py4441 del (self.__smbTransCommands[transCommand])COMMENT
LOWimpacket/smbserver.py4461 # data : the transaction dataCOMMENT
LOWimpacket/smbserver.py4521 # If smbCommand doesn't not exist, it is addedCOMMENT
LOWimpacket/smbserver.py4541 # errorCode: the NT error codeCOMMENT
LOWimpacket/smbserver.py4621COMMENT
LOWimpacket/smbserver.py4681 # We might have compound requestsCOMMENT
LOWimpacket/smbserver.py4801 # traceback.print_exc()COMMENT
LOWimpacket/system_errors.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/ImpactDecoder.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/__init__.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/cdp.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/Dot11Crypto.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/mqtt.py1#!/usr/bin/env pythonCOMMENT
LOWimpacket/ese.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/ese.py801 return self.getNextRow(cursor, filter_tables = filter_tables)COMMENT
LOWimpacket/Dot11KeyManager.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/negoex.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/dot11.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/dot11.py41 # +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+COMMENT
LOWimpacket/dot11.py1921 def get_dB_ant_noise( self ):COMMENT
LOWimpacket/spnego.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/spnego.py161 # reject (2),COMMENT
LOWimpacket/acl.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/crypto.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/crypto.py41# + Algorithm Generate_Subkey +COMMENT
LOWimpacket/crypto.py101COMMENT
LOWimpacket/crypto.py121# + +COMMENT
LOWimpacket/crypto.py181def AES_CMAC_PRF_128(VK, M, VKlen, Mlen):COMMENT
LOWimpacket/http.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/wps.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/helper.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/msada_guids.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
LOWimpacket/ImpactPacket.py1# Impacket - Collection of Python classes for working with network protocols.COMMENT
378 more matches not shown…
Unused Imports347 hits · 340 pts
SeverityFileLineSnippetContext
LOWsetup.py20CODE
LOWimpacket/smb3.py33CODE
LOWimpacket/smb3.py34CODE
LOWimpacket/smb3.py48CODE
LOWimpacket/dpapi_ng.py12CODE
LOWimpacket/ntlm.py12CODE
LOWimpacket/ntlm.py13CODE
LOWimpacket/tds.py33CODE
LOWimpacket/tds.py34CODE
LOWimpacket/tds.py47CODE
LOWimpacket/smb.py52CODE
LOWimpacket/smb.py53CODE
LOWimpacket/mqtt.py27CODE
LOWimpacket/ese.py29CODE
LOWimpacket/ese.py30CODE
LOWimpacket/spnego.py18CODE
LOWimpacket/spnego.py19CODE
LOWimpacket/crypto.py25CODE
LOWimpacket/crypto.py26CODE
LOWimpacket/http.py30CODE
LOWimpacket/structure.py12CODE
LOWimpacket/structure.py13CODE
LOWimpacket/ImpactPacket.py21CODE
LOWimpacket/ImpactPacket.py22CODE
LOWimpacket/winregistry.py25CODE
LOWimpacket/winregistry.py26CODE
LOWimpacket/nmb.py37CODE
LOWimpacket/nmb.py38CODE
LOWimpacket/nmb.py39CODE
LOWimpacket/smbconnection.py31CODE
LOWimpacket/smb3structs.py18CODE
LOWimpacket/smb3structs.py19CODE
LOWimpacket/dpapi.py27CODE
LOWimpacket/dpapi.py28CODE
LOWimpacket/uuid.py19CODE
LOWimpacket/uuid.py20CODE
LOWimpacket/dcerpc/v5/srvs.py26CODE
LOWimpacket/dcerpc/v5/srvs.py27CODE
LOWimpacket/dcerpc/v5/drsuapi.py27CODE
LOWimpacket/dcerpc/v5/drsuapi.py28CODE
LOWimpacket/dcerpc/v5/dcomrt.py33CODE
LOWimpacket/dcerpc/v5/dcomrt.py34CODE
LOWimpacket/dcerpc/v5/bkrp.py30CODE
LOWimpacket/dcerpc/v5/bkrp.py31CODE
LOWimpacket/dcerpc/v5/even.py27CODE
LOWimpacket/dcerpc/v5/even.py28CODE
LOWimpacket/dcerpc/v5/transport.py17CODE
LOWimpacket/dcerpc/v5/transport.py18CODE
LOWimpacket/dcerpc/v5/transport.py32CODE
LOWimpacket/dcerpc/v5/dhcpm.py27CODE
LOWimpacket/dcerpc/v5/dhcpm.py28CODE
LOWimpacket/dcerpc/v5/tsts.py29CODE
LOWimpacket/dcerpc/v5/tsts.py34CODE
LOWimpacket/dcerpc/v5/tsts.py36CODE
LOWimpacket/dcerpc/v5/lsad.py26CODE
LOWimpacket/dcerpc/v5/lsad.py27CODE
LOWimpacket/dcerpc/v5/dtypes.py18CODE
LOWimpacket/dcerpc/v5/dtypes.py19CODE
LOWimpacket/dcerpc/v5/rpch.py19CODE
LOWimpacket/dcerpc/v5/rpch.py20CODE
287 more matches not shown…
Deep Nesting334 hits · 293 pts
SeverityFileLineSnippetContext
LOWimpacket/dns.py372CODE
LOWimpacket/smb3.py412CODE
LOWimpacket/smb3.py960CODE
LOWimpacket/smb3.py1791CODE
LOWimpacket/IP6_Address.py129CODE
LOWimpacket/IP6_Address.py203CODE
LOWimpacket/ntlm.py907CODE
LOWimpacket/tds.py849CODE
LOWimpacket/tds.py1581CODE
LOWimpacket/tds.py1988CODE
LOWimpacket/tds.py2062CODE
LOWimpacket/tds.py2126CODE
LOWimpacket/tds.py2452CODE
LOWimpacket/tds.py2571CODE
LOWimpacket/smb.py326CODE
LOWimpacket/smb.py1042CODE
LOWimpacket/smb.py2952CODE
LOWimpacket/smb.py3622CODE
LOWimpacket/smb.py3992CODE
LOWimpacket/smb.py4093CODE
LOWimpacket/smb.py4250CODE
LOWimpacket/smbserver.py329CODE
LOWimpacket/smbserver.py383CODE
LOWimpacket/smbserver.py520CODE
LOWimpacket/smbserver.py664CODE
LOWimpacket/smbserver.py763CODE
LOWimpacket/smbserver.py816CODE
LOWimpacket/smbserver.py945CODE
LOWimpacket/smbserver.py993CODE
LOWimpacket/smbserver.py1060CODE
LOWimpacket/smbserver.py1204CODE
LOWimpacket/smbserver.py1342CODE
LOWimpacket/smbserver.py1495CODE
LOWimpacket/smbserver.py1546CODE
LOWimpacket/smbserver.py1628CODE
LOWimpacket/smbserver.py1674CODE
LOWimpacket/smbserver.py1721CODE
LOWimpacket/smbserver.py1769CODE
LOWimpacket/smbserver.py1816CODE
LOWimpacket/smbserver.py1874CODE
LOWimpacket/smbserver.py1920CODE
LOWimpacket/smbserver.py2110CODE
LOWimpacket/smbserver.py2158CODE
LOWimpacket/smbserver.py2339CODE
LOWimpacket/smbserver.py2476CODE
LOWimpacket/smbserver.py2984CODE
LOWimpacket/smbserver.py3199CODE
LOWimpacket/smbserver.py3333CODE
LOWimpacket/smbserver.py3497CODE
LOWimpacket/smbserver.py3567CODE
LOWimpacket/smbserver.py3628CODE
LOWimpacket/smbserver.py3736CODE
LOWimpacket/smbserver.py3785CODE
LOWimpacket/smbserver.py4164CODE
LOWimpacket/smbserver.py4664CODE
LOWimpacket/ImpactDecoder.py73CODE
LOWimpacket/ImpactDecoder.py130CODE
LOWimpacket/ImpactDecoder.py163CODE
LOWimpacket/ImpactDecoder.py435CODE
LOWimpacket/ImpactDecoder.py525CODE
274 more matches not shown…
Hyper-Verbose Identifiers197 hits · 211 pts
SeverityFileLineSnippetContext
LOWimpacket/ICMP6.py151 def __get_message_description(self):CODE
LOWimpacket/ICMP6.py339 def get_neighbor_advertisement_flags(self):CODE
LOWimpacket/ICMP6.py342 def set_neighbor_advertisement_flags(self, flags):CODE
LOWimpacket/ICMP6.py388 def __build_node_information_message(class_object, type, code, payload = None):CODE
LOWimpacket/ICMP6.py505 def set_node_information_data(self, data):CODE
LOWimpacket/ICMP6.py510 def get_note_information_data(self):CODE
LOWimpacket/ICMP6.py529 def get_originating_packet_data(self):CODE
LOWimpacket/dns.py372 def __process_answer_structure(self, offset, num):CODE
LOWimpacket/smb3.py2097 def perform_hostname_validation(self):CODE
LOWimpacket/IP6_Address.py129 def get_human_readable_address_type(self):CODE
LOWimpacket/IP6_Address.py148 def __is_address_in_compressed_form(self, address):CODE
LOWimpacket/IP6_Address.py163 def __count_compressed_groups(self, address):CODE
LOWimpacket/IP6_Address.py168 def __count_compression_marker(self, address):CODE
LOWimpacket/IP6_Address.py185 def __expand_compressed_address(self, address):CODE
LOWimpacket/IP6_Address.py203 def __trim_longest_zero_chain(self, address):CODE
LOWimpacket/IP6_Address.py244 def is_a_valid_text_representation(cls, text_representation):CODE
LOWimpacket/dpapi_ng.py281def generate_kek_secret_from_pubkey(gke: GroupKeyEnvelope, key_id: KeyIdentifier,l2_key: bytes):CODE
LOWimpacket/tds.py1235 def _has_active_tls_channel_binding(self):CODE
LOWimpacket/tds.py1434 def generate_cbt_from_tls_unique(self):CODE
LOWimpacket/smb.py3401 def get_server_dns_domain_name(self):CODE
LOWimpacket/smb.py3438 def perform_hostname_validation(self):CODE
LOWimpacket/Dot11KeyManager.py22 def __get_bssid_hasheable_type(self, bssid):CODE
LOWimpacket/dot11.py2219 def __calculate_elements_length(self, elements):CODE
LOWimpacket/dot11.py2658 def get_authentication_algorithm(self):CODE
LOWimpacket/dot11.py2662 def set_authentication_algorithm(self, algorithm):CODE
LOWimpacket/dot11.py2666 def get_authentication_sequence(self):CODE
LOWimpacket/dot11.py2670 def set_authentication_sequence(self, seq):CODE
LOWimpacket/dot11.py2674 def get_authentication_status(self):CODE
LOWimpacket/dot11.py2678 def set_authentication_status(self, status):CODE
LOWimpacket/acl.py166 def get_readable_standard_rights(self):CODE
LOWimpacket/acl.py184 def get_readable_specific_rights(self):CODE
LOWimpacket/IP6_Extension_Headers.py125 def get_header_extension_length(self):CODE
LOWimpacket/IP6_Extension_Headers.py131 def set_header_extension_length(self, header_extension_length):CODE
LOWimpacket/nmb.py609 def name_registration_request(self, nbname, destaddr, qtype, scope, nb_flags=0, nb_address='0.0.0.0'):CODE
LOWimpacket/dcerpc/v5/rpcrt.py1373 def set_default_max_fragment_size(self):CODE
LOWimpacket/dcerpc/v5/transport.py255 def set_default_max_fragment_size(self):CODE
LOWimpacket/dcerpc/v5/rpch.py783 def handle_out_of_sequence_rts(self, response_data):CODE
LOWimpacket/krb5/pac.py340def _normalize_pac_checksum_type(signature_type, signature_length, aes_key, infer_aes_signature_type):CODE
LOWimpacket/krb5/crypto.py731def get_kerberos_key_for_enctype(enctype, nt_hash=None, generic_aes_key=None, aes128_key=None, aes256_key=None):CODE
LOWimpacket/krb5/asn1.py74def _sequence_optional_component(name, tag_value, type, **subkwargs):CODE
LOWimpacket/examples/secretsdump.py1556 def __decrypt_history_entries_aes(self, rid_int, entries):CODE
LOWimpacket/examples/secretsdump.py1594 def __decode_aes_history_block(self, rid_int, data, offset, length):CODE
LOWimpacket/examples/smbclient.py890 def _resolve_path_with_dfs_boundary(self, line):CODE
LOWimpacket/examples/smbclient.py981 def _restore_original_connection(self):CODE
LOWimpacket/examples/ldap_shell.py384 def toggle_account_enable_disable(self, user_name, enable):CODE
LOWimpacket/examples/__init__.py13def _insecure_create_default_context(purpose=ssl.Purpose.SERVER_AUTH, *, cafile=None, capath=None, cadata=None):CODE
LOWimpacket/examples/__init__.py21def monkeypatch_ssl_create_default_context():CODE
LOWimpacket/examples/__init__.py35def monkeypatch_readline_backend():CODE
LOWimpacket/examples/regsecrets.py423 def __decrypt_history_entries_aes(self, rid_int, entries):CODE
LOWimpacket/examples/regsecrets.py461 def __decode_aes_history_block(self, rid_int, data, offset, length):CODE
LOWimpacket/examples/ntlmrelayx/clients/ldaprelayclient.py178 def create_authenticate_message(self):CODE
LOWimpacket/examples/ntlmrelayx/utils/rdp_ssl.py52def generate_self_signed_cert(common_name="RDP-Server"):CODE
LOWimpacket/examples/ntlmrelayx/servers/rdprelayserver.py372 def build_tsrequest_challenge(self, challenge_data):CODE
LOWimpacket/examples/ntlmrelayx/servers/socksserver.py284class SocksRequestHandler(socketserver.BaseRequestHandler):CODE
LOW…cket/examples/ntlmrelayx/servers/socksplugins/mssql.py98 def _should_wrap_sql_batch_for_backend(self):CODE
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py652 def is_template_for_authentification(entry):CODE
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py669 def get_enrollment_principals(entry):CODE
LOW…/examples/ntlmrelayx/attacks/httpattacks/adcsattack.py307 def _extract_certificate_identity(cls, cert):CODE
LOW…s/ntlmrelayx/attacks/httpattacks/sccmpoliciesattack.py147def generate_registration_request_payload(management_point, public_key, private_key, client_name):CODE
LOW…s/ntlmrelayx/attacks/httpattacks/sccmpoliciesattack.py178def generate_policies_request_payload(management_point, private_key, client_guid, client_name):CODE
137 more matches not shown…
Self-Referential Comments35 hits · 104 pts
SeverityFileLineSnippetContext
MEDIUMimpacket/tds.py1298 # This function is the generic sendTDS packet which is used to embed data into a regular TDS packetCOMMENT
MEDIUMimpacket/tds.py1327 # This function is a wrapper that is used to dispatch packets to send depending of the TLS contextCOMMENT
MEDIUMimpacket/tds.py1363 # This function is the generic recvTDS packet which is used to extract data from a regular TDS packetCOMMENT
MEDIUMimpacket/tds.py1401 # This function is a wrapper that is used to dispatch packets to read depending of the TLS contextCOMMENT
MEDIUMimpacket/tds.py1451 # This function is used to set the TLS context, process the handshak in memoryCOMMENT
MEDIUMimpacket/smb.py128SMB_O_CREAT = 0x10 # Create the file if file does not exists. Otherwise, operation fails.CODE
MEDIUMimpacket/examples/serviceinstall.py97 # Create the serviceCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/clients/dcsyncclient.py265 # Initialize NTDSHashes objectCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/utils/ssl.py34 # Create a private keyCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/utils/ssl.py38 # Create the certificateCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/utils/ssl.py57 # Create a context, we don't really care about the SSL/TLSCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py968 # Create a nice shiny new user for the escalationCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py994 # Create a nice shiny new user for the escalationCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py1202# Create an object ACE with the specified privguid and our sidCOMMENT
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py1219# Create an ALLOW ACE with the specified sidCOMMENT
MEDIUMtests/SMB_RPC/test_acl.py114 # Create a new ACE for a different user with R,W permissionsCOMMENT
MEDIUMexamples/secretsdump.py145 # Create the baseDNCOMMENT
MEDIUMexamples/GetADComputers.py64 # Create the baseDNCOMMENT
MEDIUMexamples/dacledit.py379 # This function is called before any writing action (write, remove or restore)COMMENT
MEDIUMexamples/badsuccessor.py83 # Create the baseDN if not providedCOMMENT
MEDIUMexamples/GetLAPSPassword.py87 # Create the baseDNCOMMENT
MEDIUMexamples/raiseChild.py209 # Create the pipes threadsCOMMENT
MEDIUMexamples/GetNPUsers.py90 # Create the baseDNCOMMENT
MEDIUMexamples/findDelegation.py97 # Create the baseDNCOMMENT
MEDIUMexamples/rbcd.py56# Create an ALLOW ACE with the specified sidCOMMENT
MEDIUMexamples/goldenPac.py162 # Create the pipes threadsCOMMENT
MEDIUMexamples/addcomputer.py116 # Create the baseDNCOMMENT
MEDIUMexamples/GetADUsers.py60 # Create the baseDNCOMMENT
MEDIUMexamples/changepasswd.py945 # Create a password management sessionCOMMENT
MEDIUMexamples/ping6.py47# Create a new IP packet and set its source and destination addresses.COMMENT
MEDIUMexamples/GetUserSPNs.py23# This module provides a Python implementation for this attack, adding also the ability to PtH/Ticket/Key.COMMENT
MEDIUMexamples/GetUserSPNs.py103 # Create the baseDNCOMMENT
MEDIUMexamples/ping.py46# Create a new IP packet and set its source and destination addresses.COMMENT
MEDIUMexamples/ping.py52# Create a new ICMP packet of type ECHO.COMMENT
MEDIUMexamples/psexec.py183 # Create the pipes threadsCOMMENT
Redundant / Tautological Comments48 hits · 76 pts
SeverityFileLineSnippetContext
LOWimpacket/smb.py130SMB_O_OPEN = 0x01 # Open the file if the file existsCODE
LOWimpacket/smbserver.py1519 # Check if the file was marked for removalCOMMENT
LOWimpacket/smbserver.py3533 # Check if the file was marked for removalCOMMENT
LOWimpacket/smbserver.py2068 # Check if the Tid matches the Tid trying to disconnectCOMMENT
LOWimpacket/smbserver.py2092 # Check if the Uid matches the user trying to logoffCOMMENT
LOWimpacket/smbserver.py3973 # Check if the next data will exceed the OutputBufferLengthCOMMENT
LOWimpacket/smb3structs.py181FILE_OPEN_IF = 0x00000003 # Open the file if it already exists; otherwise, create the file. This value SHOULDCODE
LOWimpacket/dcerpc/v5/transport.py515 # Check if we have a smb connection already setupCOMMENT
LOWimpacket/dcerpc/v5/rpch.py678 # Check if the previous chunk is still thereCOMMENT
LOWimpacket/examples/secretsdump.py767 # Check if remoteName is FQDN, otherwise it will likely be the hostname onlyCOMMENT
LOWimpacket/examples/secretsdump.py2395 # Check if old LSA secrets values are also need to be shownCOMMENT
LOWimpacket/examples/regsecrets.py81 # Check if remoteName is FQDN, otherwise it will likely be the hostname only and we can't build the saltCOMMENT
LOWimpacket/examples/regsecrets.py1029 # Check if old LSA secrets values are also need to be shownCOMMENT
LOWimpacket/examples/regsecrets.py1065 # Check if old LSA secrets values are also need to be shownCOMMENT
LOWimpacket/examples/ntlmrelayx/clients/httprelayclient.py58 #Check if server wants authCOMMENT
LOWimpacket/examples/ntlmrelayx/utils/targetsutils.py70 # Check if we have a single target, with no URI formCOMMENT
LOWimpacket/examples/ntlmrelayx/servers/rdprelayserver.py339 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOWimpacket/examples/ntlmrelayx/servers/rpcrelayserver.py396 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOW…acket/examples/ntlmrelayx/servers/winrmsrelayserver.py531 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOW…packet/examples/ntlmrelayx/servers/winrmrelayserver.py517 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOWimpacket/examples/ntlmrelayx/servers/rawrelayserver.py187 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOWimpacket/examples/ntlmrelayx/servers/smbrelayserver.py934 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOWimpacket/examples/ntlmrelayx/servers/httprelayserver.py524 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOWimpacket/examples/ntlmrelayx/servers/wcfrelayserver.py327 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOW…packet/examples/ntlmrelayx/servers/mssqlrelayserver.py424 # Check if SOCKS is enabled and if we support the target schemeCOMMENT
LOW…cket/examples/ntlmrelayx/servers/socksplugins/mssql.py166 # Check if we have a connection for the userCOMMENT
LOW…packet/examples/ntlmrelayx/servers/socksplugins/smb.py360 # Check if we have a connection for the userCOMMENT
LOW…packet/examples/ntlmrelayx/servers/socksplugins/smb.py514 # Check if we have a connection for the userCOMMENT
LOW…acket/examples/ntlmrelayx/servers/socksplugins/http.py65 # Check if we have a connection for the userCOMMENT
LOW…acket/examples/ntlmrelayx/servers/socksplugins/http.py179 # Check if the body is larger than 1 packetCOMMENT
LOW…acket/examples/ntlmrelayx/servers/socksplugins/smtp.py102 # Check if we have a connection for the userCOMMENT
LOW…acket/examples/ntlmrelayx/servers/socksplugins/imap.py95 # Check if we have a connection for the userCOMMENT
LOWimpacket/examples/ntlmrelayx/attacks/imapattack.py47 #Check if search workedCOMMENT
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py579 # Check if the ACE has restrictions on object type (inherited case)COMMENT
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py583 # Verify if the ACE applies to this object typeCOMMENT
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py589 # Check if this applies to our objecttypeCOMMENT
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py621 # Check if the ACE is an OBJECT ACE, if so the WRITE_DACL is applied toCOMMENT
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py1250# Check if an ACE allows for creation of usersCOMMENT
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py1258# Check if an ACE allows for adding membersCOMMENT
LOWexamples/badsuccessor.py292 # Check if ACE has relevant rightsCOMMENT
LOWexamples/GetLAPSPassword.py111 # Check if item is in cacheCOMMENT
LOWexamples/raiseChild.py184 # Check if we need to copy a file for executionCOMMENT
LOWexamples/findDelegation.py40 # Check if SPN existsCOMMENT
LOWexamples/rpcdump.py112 # Display results.COMMENT
LOWexamples/samrdump.py91 # Display results.COMMENT
LOWexamples/split.py130 # Open fileCOMMENT
LOWexamples/goldenPac.py137 # Check if we need to copy a file for executionCOMMENT
LOWexamples/psexec.py158 # Check if we need to copy a file for executionCOMMENT
Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippetContext
HIGH…acket/examples/ntlmrelayx/servers/winrmsrelayserver.py0<?xml version="1.0"?><d:multistatus xmlns:d="dav:"><d:response><d:href>http://webdavrelay/file/image.jpg/</d:href><d:proSTRING
HIGH…packet/examples/ntlmrelayx/servers/winrmrelayserver.py0<?xml version="1.0"?><d:multistatus xmlns:d="dav:"><d:response><d:href>http://webdavrelay/file/image.jpg/</d:href><d:proSTRING
HIGHimpacket/examples/ntlmrelayx/servers/httprelayserver.py0<?xml version="1.0"?><d:multistatus xmlns:d="dav:"><d:response><d:href>http://webdavrelay/file/image.jpg/</d:href><d:proSTRING
HIGH…acket/examples/ntlmrelayx/servers/winrmsrelayserver.py0<?xml version="1.0"?><d:multistatus xmlns:d="dav:"><d:response><d:href>http://webdavrelay/file/</d:href><d:propstat><d:pSTRING
HIGH…packet/examples/ntlmrelayx/servers/winrmrelayserver.py0<?xml version="1.0"?><d:multistatus xmlns:d="dav:"><d:response><d:href>http://webdavrelay/file/</d:href><d:propstat><d:pSTRING
HIGHimpacket/examples/ntlmrelayx/servers/httprelayserver.py0<?xml version="1.0"?><d:multistatus xmlns:d="dav:"><d:response><d:href>http://webdavrelay/file/</d:href><d:propstat><d:pSTRING
HIGHexamples/raiseChild.py0lcd {path} - changes the current local directory to {path} exit - terminates the server process (and this session) lput STRING
HIGHexamples/goldenPac.py0lcd {path} - changes the current local directory to {path} exit - terminates the server process (and this session) lput STRING
HIGHexamples/psexec.py0lcd {path} - changes the current local directory to {path} exit - terminates the server process (and this session) lput STRING
AI Structural Patterns39 hits · 37 pts
SeverityFileLineSnippetContext
LOWimpacket/smb3.py190CODE
LOWimpacket/smb3.py700CODE
LOWimpacket/tds.py1581CODE
LOWimpacket/acl.py239CODE
LOWimpacket/nmb.py625CODE
LOWimpacket/smbconnection.py63CODE
LOWimpacket/smbconnection.py296CODE
LOWimpacket/smbconnection.py422CODE
LOWimpacket/smbconnection.py489CODE
LOWimpacket/dcerpc/v5/dcomrt.py996CODE
LOWimpacket/dcerpc/v5/dcomrt.py1162CODE
LOWimpacket/dcerpc/v5/transport.py479CODE
LOWimpacket/dcerpc/v5/transport.py605CODE
LOWimpacket/dcerpc/v5/scmr.py1254CODE
LOWimpacket/dcerpc/v5/scmr.py1272CODE
LOWimpacket/ldap/ldap.py176CODE
LOWimpacket/ldap/ldap.py488CODE
LOWimpacket/krb5/kpasswd.py284CODE
LOWimpacket/krb5/kpasswd.py317CODE
LOWimpacket/krb5/gssapi.py352CODE
LOWimpacket/krb5/gssapi.py357CODE
LOWimpacket/examples/secretsdump.py2050CODE
LOWimpacket/examples/secretsdump.py2611CODE
LOWimpacket/examples/utils.py91CODE
LOWimpacket/examples/regsecrets.py693CODE
LOW…acket/examples/ntlmrelayx/servers/socksplugins/smtp.py159CODE
LOWtests/SMB_RPC/test_rpcrt.py32CODE
LOWexamples/rpcmap.py57CODE
LOWexamples/samrdump.py42CODE
LOWexamples/machine_role.py51CODE
LOWexamples/lookupsid.py44CODE
LOWexamples/goldenPac.py430CODE
LOWexamples/changepasswd.py140CODE
LOWexamples/changepasswd.py183CODE
LOWexamples/dcomexec.py68CODE
LOWexamples/smbexec.py119CODE
LOWexamples/atexec.py46CODE
LOWexamples/wmiexec.py52CODE
LOWexamples/psexec.py68CODE
Decorative Section Separators12 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUMimpacket/mapi_constants.py869# ====================COMMENT
MEDIUMimpacket/mapi_constants.py1565# ====================COMMENT
MEDIUMimpacket/examples/utils.py64# ----------COMMENT
MEDIUMimpacket/examples/utils.py249# ----------COMMENT
MEDIUMimpacket/examples/utils.py296# ----------COMMENT
MEDIUMimpacket/examples/utils.py321# ----------COMMENT
MEDIUMtests/misc/test_ntfs_read.py21# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/misc/test_ntfs_read.py23# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/misc/test_ntfs_read.py43# ===========================================================================COMMENT
MEDIUMtests/misc/test_ntfs_read.py45# ===========================================================================COMMENT
MEDIUMtests/misc/test_ntfs_read.py190# ===========================================================================COMMENT
MEDIUMtests/misc/test_ntfs_read.py192# ===========================================================================COMMENT
Cross-Language Confusion7 hits · 34 pts
SeverityFileLineSnippetContext
HIGHimpacket/hresult_errors.py2908 0xC026250A: ("ERROR_GRAPHICS_OPM_INVALID_POINTER", "The function failed because an invalid pointer parameter wasCODE
HIGHimpacket/hresult_errors.py2908 0xC026250A: ("ERROR_GRAPHICS_OPM_INVALID_POINTER", "The function failed because an invalid pointer parameter wasCODE
HIGHimpacket/nt_errors.py1598 0xC01E050A: ("STATUS_GRAPHICS_OPM_INVALID_POINTER","The function failed because an invalid pointer parameter wasCODE
HIGHimpacket/nt_errors.py1598 0xC01E050A: ("STATUS_GRAPHICS_OPM_INVALID_POINTER","The function failed because an invalid pointer parameter wasCODE
HIGHimpacket/nt_errors.py1639 0xC01E05E4: ("STATUS_GRAPHICS_INVALID_POINTER","The function failed because an invalid pointer parameter was pasCODE
HIGHimpacket/nt_errors.py1639 0xC01E05E4: ("STATUS_GRAPHICS_INVALID_POINTER","The function failed because an invalid pointer parameter was pasCODE
HIGHtests/SMB_RPC/test_wmi.py326 # PowerShell "gwmi win32_currenttime" command output shows it empty indicating it is $null, so it should be NoneSTRING
Hallucination Indicators3 hits · 22 pts
SeverityFileLineSnippetContext
CRITICALtests/SMB_RPC/test_wmi.py336 The following lines were added in the impacket.dcerpc.v5.dcom.wmi.IWbemClassObject.SpawnInstance():STRING
CRITICALtests/SMB_RPC/test_wmi.py342 # NOTE: I think these shouldn't be strings, see impacket.dcerpc.v5.dcom.wmi.ENCODED_VALUE.getValue() andSTRING
CRITICALtests/SMB_RPC/test_wmi.py343 # impacket.dcerpc.v5.dcom.wmi.CLASS_PART.getProperties() (links below). I won't change that code since ISTRING
AI Response Leakage2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHimpacket/dcerpc/v5/ndr.py229 # (In this version of NDR, n is one of {1, 2, 4, 8}.) An octet stream index indicatesCOMMENT
HIGHimpacket/dcerpc/v5/ndr.py258 # (In this version of NDR, n is one of {1, 2, 4, 8}.) An octet stream index indicatesCOMMENT
AI Slop Vocabulary7 hits · 11 pts
SeverityFileLineSnippetContext
LOWimpacket/smbserver.py649 # For now we just return fake valuesCOMMENT
LOWimpacket/smbserver.py2945 # just use the same keyCOMMENT
LOWimpacket/examples/secretsdump.py549 # If dwExtCaps is not included in the answer, let's just add it so we can unpack DRS_EXTENSIONS_INT right.COMMENT
LOWimpacket/examples/ntlmrelayx/clients/dcsyncclient.py236 # If dwExtCaps is not included in the answer, let's just add it so we can unpack DRS_EXTENSIONS_INT right.COMMENT
LOWtests/dcerpc/test_drsuapi.py58 # If dwExtCaps is not included in the answer, let's just add it so we can unpack DRS_EXTENSIONS_INT right.COMMENT
LOWexamples/raiseChild.py686 # If dwExtCaps is not included in the answer, let's just add it so we can unpack DRS_EXTENSIONS_INT right.STRING
MEDIUMexamples/smbexec.py21# Certainly not a stealthy way.COMMENT
Slop Phrases5 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMimpacket/dcerpc/v5/transport.py440 # But you can use set_rpc_proxy_url method to set any URL / query you want.COMMENT
LOWimpacket/examples/secretsdump.py2291 LOG.warning("Don't forget to remove sensitive content before sending the data in a Github issue.")CODE
LOWimpacket/examples/regsecrets.py925 LOG.warning("Don't forget to remove sensitive content before sending the data in a Github issue.")CODE
MEDIUMexamples/GetADUsers.py17# If no entries are returned that means users don't have email addresses specified. If so, you can use theCOMMENT
LOWexamples/ntlmrelayx.py290 "are optional, and don't forget to escape the '\\'). If unspecified, it will relay bacCODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWimpacket/dcerpc/v5/enum.py15__all__ = ['Enum', 'IntEnum', 'unique']CODE
LOWimpacket/ldap/ldap.py51__all__ = [CODE
LOWimpacket/ldap/ldapasn1.py25__all__ = [CODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMimpacket/dcerpc/v5/enum.py671CODE
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWimpacket/negoex.py671 #NOTE: This function fails the exchange if the peer doesnt send or pick our authentication schemeCOMMENT