Skip to content

Commit 0b2d070

Browse files
authored
Merge pull request #163 from X0RW3LL/main
Fix Python 3.12 SyntaxWarning (use raw strings)
2 parents 893c1dd + 2cdf873 commit 0b2d070

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

pypykatz/_version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
""" % __version__
99

1010
__logo__ = \
11-
"""
11+
r"""
1212
&.
1313
@@@@@
1414
///////\\ @@@@@@@
@@ -33,4 +33,4 @@
3333
\x1b[38;5;118m \\\x1b[38;5;106m(((( \x1b[38;5;240m@@@@@@@@@@@@@\x1b[0m
3434
\x1b[38;5;118m \\\\\x1b[38;5;106m((((((\x1b[38;5;240m.@@@@@@@@@@@@@@@@ \x1b[0m
3535
------ \x1b[38;5;196mP Y P Y K A T Z\x1b[0m ------
36-
"""
36+
"""

pypykatz/commons/winapi/machine.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def __init__(self, api = None):
3232

3333
def get_hostname(self):
3434
if self.hostname is None:
35-
params = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters')
35+
params = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters')
3636
self.hostname = winreg.QueryValueEx(params, 'NV Hostname')[0]
3737
return self.hostname
3838

3939
def get_domain(self):
4040
if self.domain is None:
41-
params = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters')
41+
params = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters')
4242
self.domain = winreg.QueryValueEx(params, 'Domain')[0]
4343
return self.domain
4444

@@ -119,4 +119,4 @@ def list_all_pids(self):
119119
#for srv in t:
120120
# print(str(t[sid]))
121121
#t = u.get_current_user()
122-
#print(str(t))
122+
#print(str(t))

pypykatz/dpapi/dpapi.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
if platform.system().lower() == 'windows':
4343
from pypykatz.commons.winapi.processmanipulator import ProcessManipulator
4444

45-
"""
45+
r"""
4646
So! DPAPI...
4747
4848
In order to decrpyt a file/blob/data of any kind you must obtain a masterkey.
@@ -517,7 +517,7 @@ def decrypt_blob_bytes(self, data, key = None, entropy = None):
517517
return self.decrypt_blob(blob, key = key, entropy = entropy)
518518

519519
def decrypt_vcrd_file(self, file_path):
520-
"""
520+
r"""
521521
Decrypts a VCRD file
522522
Location: %APPDATA%\Local\Microsoft\Vault\%GUID%\<>.vcrd
523523
@@ -586,7 +586,7 @@ def decrypt_vpol_bytes(self, data, entropy = None):
586586
return keys.key1.get_key(), keys.key2.get_key()
587587

588588
def decrypt_vpol_file(self, file_path):
589-
"""
589+
r"""
590590
Decrypts a VPOL file
591591
Location: %APPDATA%\Local\Microsoft\Vault\%GUID%\<>.vpol
592592

0 commit comments

Comments
 (0)