mirror of
https://github.com/lgandx/Responder.git
synced 2025-12-28 02:19:07 +00:00
Fix various Python 3.12 SyntaxWarning
```
/usr/share/responder/tools/MultiRelay/RelayMultiCore.py:1957: SyntaxWarning: invalid escape sequence '\p'
Command = "c:\\Windows\\Temp\\"+FileName+" \"rpc::server /protseq:ncacn_np /endpoint:\pipe\\"+NamedPipe+" /guid:{"+DisplayGUID+"} /noreg\" service::me exit"
/usr/share/responder/tools/MultiRelay/impacket-dev/impacket/dcerpc/v5/transport.py:33: SyntaxWarning: invalid escape sequence '\['
+'([^\[]*)' # Network Address (opt.)
/usr/share/responder/tools/MultiRelay/impacket-dev/impacket/dcerpc/v5/transport.py:34: SyntaxWarning: invalid escape sequence '\['
+'(?:\[([^\]]*)\])?') # Endpoint and options (opt.)
/usr/share/responder/tools/MultiRelay/impacket-dev/impacket/hresult_errors.py:197: SyntaxWarning: invalid escape sequence '\<'
0x80004017: ("CO_E_RUNAS_SYNTAX", "A RunAs specification must be <domain name>\<user name> or simply <user name>."),
/usr/share/responder/tools/MultiRelay/impacket-dev/impacket/hresult_errors.py:285: SyntaxWarning: invalid escape sequence '\<'
0x8001012C: ("CO_E_WRONGTRUSTEENAMESYNTAX", "One of the trustee strings provided by the user did not conform to the <Domain>\<Name> syntax and it was not the *\" string\"."),
/usr/share/responder/tools/MultiRelay/impacket-dev/impacket/uuid.py:41: SyntaxWarning: invalid escape sequence '\d'
matches = re.match('([\dA-Fa-f]{8})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})([\dA-Fa-f]{8})', uuid)
/usr/share/responder/tools/MultiRelay/impacket-dev/impacket/uuid.py:71: SyntaxWarning: invalid escape sequence '\.'
g = re.search("([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}).*?([0-9]{1,5}\.[0-9]{1,5})",s+" 1.0")
```
This commit is contained in:
@@ -29,9 +29,9 @@ from impacket.smbconnection import SMBConnection
|
||||
|
||||
class DCERPCStringBinding:
|
||||
parser = re.compile(r'(?:([a-fA-F0-9-]{8}(?:-[a-fA-F0-9-]{4}){3}-[a-fA-F0-9-]{12})@)?' # UUID (opt.)
|
||||
+'([_a-zA-Z0-9]*):' # Protocol Sequence
|
||||
+'([^\[]*)' # Network Address (opt.)
|
||||
+'(?:\[([^\]]*)\])?') # Endpoint and options (opt.)
|
||||
+r'([_a-zA-Z0-9]*):' # Protocol Sequence
|
||||
+r'([^\[]*)' # Network Address (opt.)
|
||||
+r'(?:\[([^\]]*)\])?') # Endpoint and options (opt.)
|
||||
|
||||
def __init__(self, stringbinding):
|
||||
match = DCERPCStringBinding.parser.match(stringbinding)
|
||||
|
||||
Reference in New Issue
Block a user