Repository Analysis

fortra/impacket

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

11.3 Low AI signal View on GitHub
11.3
Adjusted Score
11.3
Raw Score
100%
Time Factor
2026-05-28
Last Push
15,770
Stars
Python
Language
191,015
Lines of Code
349
Files
1958
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 3HIGH 17MEDIUM 112LOW 1826

Pattern Findings

1958 matches across 14 categories. Click a row to expand file-level details.

Excessive Try-Catch Wrapping556 hits · 582 pts
SeverityFileLineSnippet
LOWsetup.py41except Exception:
LOWimpacket/IP6_Address.py249 except Exception:
MEDIUMimpacket/IP6_Address.py244def is_a_valid_text_representation(cls, text_representation):
LOWimpacket/ntlm.py54except Exception:
MEDIUMimpacket/tds.py1282def disconnect(self):
LOWimpacket/tds.py1110 except Exception as e:
LOWimpacket/tds.py1274 except Exception:
LOWimpacket/tds.py1553 except Exception as e:
LOWimpacket/tds.py1563 except Exception:
LOWimpacket/tds.py1663 except Exception as e:
LOWimpacket/smb.py3091 except Exception:
MEDIUMimpacket/smbserver.py2896def _kerberos_auth(token, connData, smbServer):
LOWimpacket/smbserver.py1515 except Exception as e:
LOWimpacket/smbserver.py1526 except Exception as e:
LOWimpacket/smbserver.py3529 except Exception as e:
LOWimpacket/smbserver.py3543 except Exception as e:
LOWimpacket/smbserver.py178 except Exception as e:
LOWimpacket/smbserver.py321 except Exception as e:
LOWimpacket/smbserver.py642 except Exception as e:
LOWimpacket/smbserver.py918 except Exception as e:
LOWimpacket/smbserver.py1112 except Exception as e:
LOWimpacket/smbserver.py1250 except Exception as e:
LOWimpacket/smbserver.py1387 except Exception as e:
LOWimpacket/smbserver.py1574 except Exception as e:
LOWimpacket/smbserver.py1609 except Exception as e:
LOWimpacket/smbserver.py1657 except Exception as e:
LOWimpacket/smbserver.py1855 except Exception as e:
LOWimpacket/smbserver.py1901 except Exception as e:
LOWimpacket/smbserver.py1954 except Exception as e:
LOWimpacket/smbserver.py2141 except Exception as e:
LOWimpacket/smbserver.py2241 except Exception as e:
LOWimpacket/smbserver.py2271 except Exception as e:
LOWimpacket/smbserver.py2681 except Exception as e:
LOWimpacket/smbserver.py2804 except Exception as e:
LOWimpacket/smbserver.py3174 except Exception as e:
LOWimpacket/smbserver.py3405 except Exception as e:
LOWimpacket/smbserver.py3435 except Exception as e:
LOWimpacket/smbserver.py3702 except Exception as e:
LOWimpacket/smbserver.py3773 except Exception as e:
LOWimpacket/smbserver.py3824 except Exception as e:
LOWimpacket/smbserver.py3852 except Exception as e:
LOWimpacket/smbserver.py4126 except Exception as e:
LOWimpacket/smbserver.py4199 except Exception as e:
LOWimpacket/smbserver.py4736 except Exception as e:
LOWimpacket/smbserver.py4799 except Exception as e:
LOWimpacket/mqtt.py279 except Exception:
LOWimpacket/mqtt.py356 except Exception as e:
LOWimpacket/ese.py952 except Exception:
LOWimpacket/acl.py382 except Exception as e:
LOWimpacket/crypto.py30except Exception:
LOWimpacket/structure.py144 except Exception as e:
LOWimpacket/structure.py170 except Exception as e:
LOWimpacket/structure.py491 except Exception:
LOWimpacket/winregistry.py233 except Exception as e:
LOWimpacket/winregistry.py805 except Exception:
LOWimpacket/nmb.py554 except Exception as e:
LOWimpacket/nmb.py990 except Exception as ex:
MEDIUMimpacket/dpapi.py474 print('Error decrypting entry #%d' % i)
LOWimpacket/dcerpc/v5/drsuapi.py50except Exception:
LOWimpacket/dcerpc/v5/dcomrt.py1066 except Exception as e:
496 more matches not shown…
Over-Commented Block437 hits · 429 pts
SeverityFileLineSnippet
LOWsetup.py1#!/usr/bin/env python
LOWimpacket/ICMP6.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/eap.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/hresult_errors.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/dns.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/dns.py21# - 2181 - Clarifications to the DNS Specification [https://www.ietf.org/rfc/rfc2181.txt]
LOWimpacket/dns.py421 # Preference Unsigned 16-bit integer.
LOWimpacket/smb3.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/smb3.py21#
LOWimpacket/smb3.py901 self._Connection['SupportsEncryption'] = False
LOWimpacket/smb3.py1601 return True
LOWimpacket/IP6_Address.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/ntlm.py61NTLM_AUTH_PKT = 4
LOWimpacket/ntlm.py101# If set, requests the usage of the LMOWF (section 3.3). An alternate name for this field is
LOWimpacket/ntlm.py121# TargetName field of the CHALLENGE_MESSAGE. If this bit is set, then NTLMSSP_TARGET_TYPE_DOMAIN MUST NOT be set.
LOWimpacket/ntlm.py161NTLMSSP_RESERVED_8 = 0x00000100
LOWimpacket/ntlm.py701 if ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_KEY_EXCH:
LOWimpacket/NDP.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/tds.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/tds.py21# ToDo:
LOWimpacket/tds.py1461 # Here comes the important part, MSSQL server does not expect a raw TLS socket
LOWimpacket/smb.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/smb.py21#
LOWimpacket/smb.py41# [ ] Try [SMB]transport fragmentation using Transact requests
LOWimpacket/smb.py2881 if paramcnt + paramds < totparamcnt or datacnt + datads < totdatacnt:
LOWimpacket/smb.py2901 # CALL MD5Init( md5context )
LOWimpacket/smbserver.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/smbserver.py4441 del (self.__smbTransCommands[transCommand])
LOWimpacket/smbserver.py4461 # data : the transaction data
LOWimpacket/smbserver.py4521 # If smbCommand doesn't not exist, it is added
LOWimpacket/smbserver.py4541 # errorCode: the NT error code
LOWimpacket/smbserver.py4621
LOWimpacket/smbserver.py4681 # We might have compound requests
LOWimpacket/smbserver.py4801 # traceback.print_exc()
LOWimpacket/system_errors.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/ImpactDecoder.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/__init__.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/cdp.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/Dot11Crypto.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/mqtt.py1#!/usr/bin/env python
LOWimpacket/ese.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/ese.py801 return self.getNextRow(cursor, filter_tables = filter_tables)
LOWimpacket/Dot11KeyManager.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/dot11.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/dot11.py41 # +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
LOWimpacket/dot11.py1921 def get_dB_ant_noise( self ):
LOWimpacket/spnego.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/spnego.py161 # reject (2),
LOWimpacket/acl.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/crypto.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/crypto.py41# + Algorithm Generate_Subkey +
LOWimpacket/crypto.py101
LOWimpacket/crypto.py121# + +
LOWimpacket/crypto.py181def AES_CMAC_PRF_128(VK, M, VKlen, Mlen):
LOWimpacket/http.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/wps.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/helper.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/msada_guids.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/ImpactPacket.py1# Impacket - Collection of Python classes for working with network protocols.
LOWimpacket/winregistry.py1# Impacket - Collection of Python classes for working with network protocols.
377 more matches not shown…
Unused Imports347 hits · 341 pts
SeverityFileLineSnippet
LOWsetup.py20
LOWimpacket/smb3.py33
LOWimpacket/smb3.py34
LOWimpacket/smb3.py48
LOWimpacket/dpapi_ng.py12
LOWimpacket/ntlm.py12
LOWimpacket/ntlm.py13
LOWimpacket/tds.py33
LOWimpacket/tds.py34
LOWimpacket/tds.py47
LOWimpacket/smb.py52
LOWimpacket/smb.py53
LOWimpacket/mqtt.py27
LOWimpacket/ese.py29
LOWimpacket/ese.py30
LOWimpacket/spnego.py18
LOWimpacket/spnego.py19
LOWimpacket/crypto.py25
LOWimpacket/crypto.py26
LOWimpacket/http.py30
LOWimpacket/structure.py12
LOWimpacket/structure.py13
LOWimpacket/ImpactPacket.py21
LOWimpacket/ImpactPacket.py22
LOWimpacket/winregistry.py25
LOWimpacket/winregistry.py26
LOWimpacket/nmb.py37
LOWimpacket/nmb.py38
LOWimpacket/nmb.py39
LOWimpacket/smbconnection.py31
LOWimpacket/smb3structs.py18
LOWimpacket/smb3structs.py19
LOWimpacket/dpapi.py27
LOWimpacket/dpapi.py28
LOWimpacket/uuid.py19
LOWimpacket/uuid.py20
LOWimpacket/dcerpc/v5/srvs.py26
LOWimpacket/dcerpc/v5/srvs.py27
LOWimpacket/dcerpc/v5/drsuapi.py27
LOWimpacket/dcerpc/v5/drsuapi.py28
LOWimpacket/dcerpc/v5/dcomrt.py33
LOWimpacket/dcerpc/v5/dcomrt.py34
LOWimpacket/dcerpc/v5/bkrp.py30
LOWimpacket/dcerpc/v5/bkrp.py31
LOWimpacket/dcerpc/v5/even.py27
LOWimpacket/dcerpc/v5/even.py28
LOWimpacket/dcerpc/v5/transport.py17
LOWimpacket/dcerpc/v5/transport.py18
LOWimpacket/dcerpc/v5/transport.py32
LOWimpacket/dcerpc/v5/dhcpm.py27
LOWimpacket/dcerpc/v5/dhcpm.py28
LOWimpacket/dcerpc/v5/tsts.py29
LOWimpacket/dcerpc/v5/tsts.py34
LOWimpacket/dcerpc/v5/tsts.py36
LOWimpacket/dcerpc/v5/lsad.py26
LOWimpacket/dcerpc/v5/lsad.py27
LOWimpacket/dcerpc/v5/dtypes.py18
LOWimpacket/dcerpc/v5/dtypes.py19
LOWimpacket/dcerpc/v5/rpch.py19
LOWimpacket/dcerpc/v5/rpch.py20
287 more matches not shown…
Deep Nesting329 hits · 288 pts
SeverityFileLineSnippet
LOWimpacket/dns.py372
LOWimpacket/smb3.py412
LOWimpacket/smb3.py953
LOWimpacket/smb3.py1784
LOWimpacket/IP6_Address.py129
LOWimpacket/IP6_Address.py203
LOWimpacket/ntlm.py907
LOWimpacket/tds.py849
LOWimpacket/tds.py1581
LOWimpacket/tds.py1988
LOWimpacket/tds.py2059
LOWimpacket/tds.py2119
LOWimpacket/tds.py2440
LOWimpacket/tds.py2559
LOWimpacket/smb.py325
LOWimpacket/smb.py1038
LOWimpacket/smb.py2948
LOWimpacket/smb.py3612
LOWimpacket/smb.py3982
LOWimpacket/smb.py4083
LOWimpacket/smb.py4240
LOWimpacket/smbserver.py329
LOWimpacket/smbserver.py383
LOWimpacket/smbserver.py520
LOWimpacket/smbserver.py664
LOWimpacket/smbserver.py763
LOWimpacket/smbserver.py816
LOWimpacket/smbserver.py945
LOWimpacket/smbserver.py993
LOWimpacket/smbserver.py1060
LOWimpacket/smbserver.py1204
LOWimpacket/smbserver.py1342
LOWimpacket/smbserver.py1495
LOWimpacket/smbserver.py1546
LOWimpacket/smbserver.py1628
LOWimpacket/smbserver.py1674
LOWimpacket/smbserver.py1721
LOWimpacket/smbserver.py1769
LOWimpacket/smbserver.py1816
LOWimpacket/smbserver.py1874
LOWimpacket/smbserver.py1920
LOWimpacket/smbserver.py2110
LOWimpacket/smbserver.py2158
LOWimpacket/smbserver.py2339
LOWimpacket/smbserver.py2476
LOWimpacket/smbserver.py2984
LOWimpacket/smbserver.py3199
LOWimpacket/smbserver.py3333
LOWimpacket/smbserver.py3497
LOWimpacket/smbserver.py3567
LOWimpacket/smbserver.py3628
LOWimpacket/smbserver.py3736
LOWimpacket/smbserver.py3785
LOWimpacket/smbserver.py4164
LOWimpacket/smbserver.py4664
LOWimpacket/ImpactDecoder.py73
LOWimpacket/ImpactDecoder.py130
LOWimpacket/ImpactDecoder.py163
LOWimpacket/ImpactDecoder.py435
LOWimpacket/ImpactDecoder.py525
269 more matches not shown…
Hyper-Verbose Identifiers161 hits · 169 pts
SeverityFileLineSnippet
LOWimpacket/ICMP6.py151 def __get_message_description(self):
LOWimpacket/ICMP6.py339 def get_neighbor_advertisement_flags(self):
LOWimpacket/ICMP6.py342 def set_neighbor_advertisement_flags(self, flags):
LOWimpacket/ICMP6.py388 def __build_node_information_message(class_object, type, code, payload = None):
LOWimpacket/ICMP6.py505 def set_node_information_data(self, data):
LOWimpacket/ICMP6.py510 def get_note_information_data(self):
LOWimpacket/ICMP6.py529 def get_originating_packet_data(self):
LOWimpacket/dns.py372 def __process_answer_structure(self, offset, num):
LOWimpacket/smb3.py2096 def perform_hostname_validation(self):
LOWimpacket/IP6_Address.py129 def get_human_readable_address_type(self):
LOWimpacket/IP6_Address.py148 def __is_address_in_compressed_form(self, address):
LOWimpacket/IP6_Address.py163 def __count_compressed_groups(self, address):
LOWimpacket/IP6_Address.py168 def __count_compression_marker(self, address):
LOWimpacket/IP6_Address.py185 def __expand_compressed_address(self, address):
LOWimpacket/IP6_Address.py203 def __trim_longest_zero_chain(self, address):
LOWimpacket/IP6_Address.py244 def is_a_valid_text_representation(cls, text_representation):
LOWimpacket/dpapi_ng.py281def generate_kek_secret_from_pubkey(gke: GroupKeyEnvelope, key_id: KeyIdentifier,l2_key: bytes):
LOWimpacket/tds.py1235 def _has_active_tls_channel_binding(self):
LOWimpacket/tds.py1434 def generate_cbt_from_tls_unique(self):
LOWimpacket/smb.py3397 def get_server_dns_domain_name(self):
LOWimpacket/smb.py3434 def perform_hostname_validation(self):
LOWimpacket/Dot11KeyManager.py22 def __get_bssid_hasheable_type(self, bssid):
LOWimpacket/dot11.py2219 def __calculate_elements_length(self, elements):
LOWimpacket/dot11.py2658 def get_authentication_algorithm(self):
LOWimpacket/dot11.py2662 def set_authentication_algorithm(self, algorithm):
LOWimpacket/dot11.py2666 def get_authentication_sequence(self):
LOWimpacket/dot11.py2670 def set_authentication_sequence(self, seq):
LOWimpacket/dot11.py2674 def get_authentication_status(self):
LOWimpacket/dot11.py2678 def set_authentication_status(self, status):
LOWimpacket/acl.py166 def get_readable_standard_rights(self):
LOWimpacket/acl.py184 def get_readable_specific_rights(self):
LOWimpacket/IP6_Extension_Headers.py125 def get_header_extension_length(self):
LOWimpacket/IP6_Extension_Headers.py131 def set_header_extension_length(self, header_extension_length):
LOWimpacket/nmb.py609 def name_registration_request(self, nbname, destaddr, qtype, scope, nb_flags=0, nb_address='0.0.0.0'):
LOWimpacket/dcerpc/v5/rpcrt.py1373 def set_default_max_fragment_size(self):
LOWimpacket/dcerpc/v5/transport.py255 def set_default_max_fragment_size(self):
LOWimpacket/dcerpc/v5/rpch.py783 def handle_out_of_sequence_rts(self, response_data):
LOWimpacket/krb5/pac.py340def _normalize_pac_checksum_type(signature_type, signature_length, aes_key, infer_aes_signature_type):
LOWimpacket/krb5/crypto.py731def get_kerberos_key_for_enctype(enctype, nt_hash=None, generic_aes_key=None, aes128_key=None, aes256_key=None):
LOWimpacket/krb5/asn1.py74def _sequence_optional_component(name, tag_value, type, **subkwargs):
LOWimpacket/examples/secretsdump.py1556 def __decrypt_history_entries_aes(self, rid_int, entries):
LOWimpacket/examples/secretsdump.py1594 def __decode_aes_history_block(self, rid_int, data, offset, length):
LOWimpacket/examples/ldap_shell.py384 def toggle_account_enable_disable(self, user_name, enable):
LOWimpacket/examples/__init__.py13def _insecure_create_default_context(purpose=ssl.Purpose.SERVER_AUTH, *, cafile=None, capath=None, cadata=None):
LOWimpacket/examples/__init__.py21def monkeypatch_ssl_create_default_context():
LOWimpacket/examples/__init__.py35def monkeypatch_readline_backend():
LOWimpacket/examples/regsecrets.py423 def __decrypt_history_entries_aes(self, rid_int, entries):
LOWimpacket/examples/regsecrets.py461 def __decode_aes_history_block(self, rid_int, data, offset, length):
LOWimpacket/examples/ntlmrelayx/clients/ldaprelayclient.py178 def create_authenticate_message(self):
LOWimpacket/examples/ntlmrelayx/utils/rdp_ssl.py52def generate_self_signed_cert(common_name="RDP-Server"):
LOWimpacket/examples/ntlmrelayx/servers/rdprelayserver.py372 def build_tsrequest_challenge(self, challenge_data):
LOWimpacket/examples/ntlmrelayx/servers/socksserver.py284class SocksRequestHandler(socketserver.BaseRequestHandler):
LOW…cket/examples/ntlmrelayx/servers/socksplugins/mssql.py98 def _should_wrap_sql_batch_for_backend(self):
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py650 def is_template_for_authentification(entry):
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py667 def get_enrollment_principals(entry):
LOW…/examples/ntlmrelayx/attacks/httpattacks/adcsattack.py230 def _extract_certificate_identity(cls, cert):
LOW…s/ntlmrelayx/attacks/httpattacks/sccmpoliciesattack.py147def generate_registration_request_payload(management_point, public_key, private_key, client_name):
LOW…s/ntlmrelayx/attacks/httpattacks/sccmpoliciesattack.py178def generate_policies_request_payload(management_point, private_key, client_guid, client_name):
LOW…s/ntlmrelayx/attacks/httpattacks/sccmpoliciesattack.py287def deobfuscate_secret_policy_blob(output):
LOW…xamples/ntlmrelayx/attacks/httpattacks/sccmdpattack.py184 def recursive_package_directory_fetch(self, object, directory, depth):
101 more matches not shown…
Self-Referential Comments35 hits · 104 pts
SeverityFileLineSnippet
MEDIUMimpacket/tds.py1298 # This function is the generic sendTDS packet which is used to embed data into a regular TDS packet
MEDIUMimpacket/tds.py1327 # This function is a wrapper that is used to dispatch packets to send depending of the TLS context
MEDIUMimpacket/tds.py1363 # This function is the generic recvTDS packet which is used to extract data from a regular TDS packet
MEDIUMimpacket/tds.py1401 # This function is a wrapper that is used to dispatch packets to read depending of the TLS context
MEDIUMimpacket/tds.py1451 # This function is used to set the TLS context, process the handshak in memory
MEDIUMimpacket/smb.py127SMB_O_CREAT = 0x10 # Create the file if file does not exists. Otherwise, operation fails.
MEDIUMimpacket/examples/serviceinstall.py97 # Create the service
MEDIUMimpacket/examples/ntlmrelayx/clients/dcsyncclient.py265 # Initialize NTDSHashes object
MEDIUMimpacket/examples/ntlmrelayx/utils/ssl.py34 # Create a private key
MEDIUMimpacket/examples/ntlmrelayx/utils/ssl.py38 # Create the certificate
MEDIUMimpacket/examples/ntlmrelayx/utils/ssl.py57 # Create a context, we don't really care about the SSL/TLS
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py966 # Create a nice shiny new user for the escalation
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py992 # Create a nice shiny new user for the escalation
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py1139# Create an object ACE with the specified privguid and our sid
MEDIUMimpacket/examples/ntlmrelayx/attacks/ldapattack.py1156# Create an ALLOW ACE with the specified sid
MEDIUMtests/SMB_RPC/test_acl.py114 # Create a new ACE for a different user with R,W permissions
MEDIUMexamples/secretsdump.py145 # Create the baseDN
MEDIUMexamples/GetADComputers.py64 # Create the baseDN
MEDIUMexamples/dacledit.py379 # This function is called before any writing action (write, remove or restore)
MEDIUMexamples/badsuccessor.py83 # Create the baseDN if not provided
MEDIUMexamples/GetLAPSPassword.py87 # Create the baseDN
MEDIUMexamples/raiseChild.py209 # Create the pipes threads
MEDIUMexamples/GetNPUsers.py90 # Create the baseDN
MEDIUMexamples/findDelegation.py97 # Create the baseDN
MEDIUMexamples/rbcd.py56# Create an ALLOW ACE with the specified sid
MEDIUMexamples/goldenPac.py162 # Create the pipes threads
MEDIUMexamples/addcomputer.py116 # Create the baseDN
MEDIUMexamples/GetADUsers.py60 # Create the baseDN
MEDIUMexamples/changepasswd.py945 # Create a password management session
MEDIUMexamples/ping6.py47# Create a new IP packet and set its source and destination addresses.
MEDIUMexamples/GetUserSPNs.py23# This module provides a Python implementation for this attack, adding also the ability to PtH/Ticket/Key.
MEDIUMexamples/GetUserSPNs.py103 # Create the baseDN
MEDIUMexamples/ping.py46# Create a new IP packet and set its source and destination addresses.
MEDIUMexamples/ping.py52# Create a new ICMP packet of type ECHO.
MEDIUMexamples/psexec.py183 # Create the pipes threads
Redundant / Tautological Comments48 hits · 76 pts
SeverityFileLineSnippet
LOWimpacket/smb.py129SMB_O_OPEN = 0x01 # Open the file if the file exists
LOWimpacket/smbserver.py1519 # Check if the file was marked for removal
LOWimpacket/smbserver.py3533 # Check if the file was marked for removal
LOWimpacket/smbserver.py2068 # Check if the Tid matches the Tid trying to disconnect
LOWimpacket/smbserver.py2092 # Check if the Uid matches the user trying to logoff
LOWimpacket/smbserver.py3973 # Check if the next data will exceed the OutputBufferLength
LOWimpacket/smb3structs.py179FILE_OPEN_IF = 0x00000003 # Open the file if it already exists; otherwise, create the file. This value SHOULD
LOWimpacket/dcerpc/v5/transport.py515 # Check if we have a smb connection already setup
LOWimpacket/dcerpc/v5/rpch.py678 # Check if the previous chunk is still there
LOWimpacket/examples/secretsdump.py767 # Check if remoteName is FQDN, otherwise it will likely be the hostname only
LOWimpacket/examples/secretsdump.py2395 # Check if old LSA secrets values are also need to be shown
LOWimpacket/examples/regsecrets.py81 # Check if remoteName is FQDN, otherwise it will likely be the hostname only and we can't build the salt
LOWimpacket/examples/regsecrets.py1029 # Check if old LSA secrets values are also need to be shown
LOWimpacket/examples/regsecrets.py1065 # Check if old LSA secrets values are also need to be shown
LOWimpacket/examples/ntlmrelayx/clients/httprelayclient.py58 #Check if server wants auth
LOWimpacket/examples/ntlmrelayx/utils/targetsutils.py70 # Check if we have a single target, with no URI form
LOWimpacket/examples/ntlmrelayx/servers/rdprelayserver.py339 # Check if SOCKS is enabled and if we support the target scheme
LOWimpacket/examples/ntlmrelayx/servers/rpcrelayserver.py396 # Check if SOCKS is enabled and if we support the target scheme
LOW…acket/examples/ntlmrelayx/servers/winrmsrelayserver.py531 # Check if SOCKS is enabled and if we support the target scheme
LOW…packet/examples/ntlmrelayx/servers/winrmrelayserver.py517 # Check if SOCKS is enabled and if we support the target scheme
LOWimpacket/examples/ntlmrelayx/servers/rawrelayserver.py187 # Check if SOCKS is enabled and if we support the target scheme
LOWimpacket/examples/ntlmrelayx/servers/smbrelayserver.py934 # Check if SOCKS is enabled and if we support the target scheme
LOWimpacket/examples/ntlmrelayx/servers/httprelayserver.py524 # Check if SOCKS is enabled and if we support the target scheme
LOWimpacket/examples/ntlmrelayx/servers/wcfrelayserver.py327 # Check if SOCKS is enabled and if we support the target scheme
LOW…packet/examples/ntlmrelayx/servers/mssqlrelayserver.py424 # Check if SOCKS is enabled and if we support the target scheme
LOW…cket/examples/ntlmrelayx/servers/socksplugins/mssql.py166 # Check if we have a connection for the user
LOW…packet/examples/ntlmrelayx/servers/socksplugins/smb.py360 # Check if we have a connection for the user
LOW…packet/examples/ntlmrelayx/servers/socksplugins/smb.py514 # Check if we have a connection for the user
LOW…acket/examples/ntlmrelayx/servers/socksplugins/http.py65 # Check if we have a connection for the user
LOW…acket/examples/ntlmrelayx/servers/socksplugins/http.py179 # Check if the body is larger than 1 packet
LOW…acket/examples/ntlmrelayx/servers/socksplugins/smtp.py102 # Check if we have a connection for the user
LOW…acket/examples/ntlmrelayx/servers/socksplugins/imap.py95 # Check if we have a connection for the user
LOWimpacket/examples/ntlmrelayx/attacks/imapattack.py47 #Check if search worked
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py577 # Check if the ACE has restrictions on object type (inherited case)
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py581 # Verify if the ACE applies to this object type
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py587 # Check if this applies to our objecttype
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py619 # Check if the ACE is an OBJECT ACE, if so the WRITE_DACL is applied to
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py1187# Check if an ACE allows for creation of users
LOWimpacket/examples/ntlmrelayx/attacks/ldapattack.py1195# Check if an ACE allows for adding members
LOWexamples/badsuccessor.py292 # Check if ACE has relevant rights
LOWexamples/GetLAPSPassword.py111 # Check if item is in cache
LOWexamples/raiseChild.py184 # Check if we need to copy a file for execution
LOWexamples/findDelegation.py40 # Check if SPN exists
LOWexamples/rpcdump.py112 # Display results.
LOWexamples/samrdump.py91 # Display results.
LOWexamples/split.py130 # Open file
LOWexamples/goldenPac.py137 # Check if we need to copy a file for execution
LOWexamples/psexec.py158 # Check if we need to copy a file for execution
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippet
HIGHimpacket/dcerpc/v5/transport.py0this method only makes sense before connection for most protocols.
HIGHimpacket/dcerpc/v5/transport.py0this method only makes sense before connection for most protocols.
HIGHimpacket/dcerpc/v5/transport.py0this method only makes sense before connection for most protocols.
HIGHimpacket/dcerpc/v5/transport.py0this method only makes sense before connection for most protocols.
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:pro
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:pro
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:pro
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:p
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:p
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:p
Decorative Section Separators12 hits · 36 pts
SeverityFileLineSnippet
MEDIUMimpacket/mapi_constants.py869# ====================
MEDIUMimpacket/mapi_constants.py1565# ====================
MEDIUMimpacket/examples/utils.py64# ----------
MEDIUMimpacket/examples/utils.py249# ----------
MEDIUMimpacket/examples/utils.py296# ----------
MEDIUMimpacket/examples/utils.py321# ----------
MEDIUMtests/misc/test_ntfs_read.py21# ---------------------------------------------------------------------------
MEDIUMtests/misc/test_ntfs_read.py23# ---------------------------------------------------------------------------
MEDIUMtests/misc/test_ntfs_read.py43# ===========================================================================
MEDIUMtests/misc/test_ntfs_read.py45# ===========================================================================
MEDIUMtests/misc/test_ntfs_read.py190# ===========================================================================
MEDIUMtests/misc/test_ntfs_read.py192# ===========================================================================
Cross-Language Confusion7 hits · 34 pts
SeverityFileLineSnippet
HIGHimpacket/hresult_errors.py2908 0xC026250A: ("ERROR_GRAPHICS_OPM_INVALID_POINTER", "The function failed because an invalid pointer parameter was
HIGHimpacket/hresult_errors.py2908 0xC026250A: ("ERROR_GRAPHICS_OPM_INVALID_POINTER", "The function failed because an invalid pointer parameter was
HIGHimpacket/nt_errors.py1598 0xC01E050A: ("STATUS_GRAPHICS_OPM_INVALID_POINTER","The function failed because an invalid pointer parameter was
HIGHimpacket/nt_errors.py1598 0xC01E050A: ("STATUS_GRAPHICS_OPM_INVALID_POINTER","The function failed because an invalid pointer parameter was
HIGHimpacket/nt_errors.py1639 0xC01E05E4: ("STATUS_GRAPHICS_INVALID_POINTER","The function failed because an invalid pointer parameter was pas
HIGHimpacket/nt_errors.py1639 0xC01E05E4: ("STATUS_GRAPHICS_INVALID_POINTER","The function failed because an invalid pointer parameter was pas
HIGHtests/SMB_RPC/test_wmi.py326 # PowerShell "gwmi win32_currenttime" command output shows it empty indicating it is $null, so it should be None
Hallucination Indicators3 hits · 22 pts
SeverityFileLineSnippet
CRITICALtests/SMB_RPC/test_wmi.py336 The following lines were added in the impacket.dcerpc.v5.dcom.wmi.IWbemClassObject.SpawnInstance():
CRITICALtests/SMB_RPC/test_wmi.py342 # NOTE: I think these shouldn't be strings, see impacket.dcerpc.v5.dcom.wmi.ENCODED_VALUE.getValue() and
CRITICALtests/SMB_RPC/test_wmi.py343 # impacket.dcerpc.v5.dcom.wmi.CLASS_PART.getProperties() (links below). I won't change that code since I
AI Slop Vocabulary7 hits · 11 pts
SeverityFileLineSnippet
LOWimpacket/smbserver.py649 # For now we just return fake values
LOWimpacket/smbserver.py2945 # just use the same key
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.
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.
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.
LOWexamples/raiseChild.py686 # If dwExtCaps is not included in the answer, let's just add it so we can unpack DRS_EXTENSIONS_INT right.
MEDIUMexamples/smbexec.py21# Certainly not a stealthy way.
Slop Phrases5 hits · 9 pts
SeverityFileLineSnippet
MEDIUMimpacket/dcerpc/v5/transport.py440 # But you can use set_rpc_proxy_url method to set any URL / query you want.
LOWimpacket/examples/secretsdump.py2291 LOG.warning("Don't forget to remove sensitive content before sending the data in a Github issue.")
LOWimpacket/examples/regsecrets.py925 LOG.warning("Don't forget to remove sensitive content before sending the data in a Github issue.")
MEDIUMexamples/GetADUsers.py17# If no entries are returned that means users don't have email addresses specified. If so, you can use the
LOWexamples/ntlmrelayx.py289 "are optional, and don't forget to escape the '\\'). If unspecified, it will relay bac
Dead Code1 hit · 2 pts
SeverityFileLineSnippet
MEDIUMimpacket/dcerpc/v5/enum.py671