Skip to content

Commit

Permalink
Merge pull request #163 from X0RW3LL/main
Browse files Browse the repository at this point in the history
Fix Python 3.12 SyntaxWarning (use raw strings)
  • Loading branch information
skelsec authored Jan 1, 2025
2 parents 893c1dd + 2cdf873 commit 0b2d070
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pypykatz/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
""" % __version__

__logo__ = \
"""
r"""
&.
@@@@@
///////\\ @@@@@@@
Expand All @@ -33,4 +33,4 @@
\x1b[38;5;118m \\\x1b[38;5;106m(((( \x1b[38;5;240m@@@@@@@@@@@@@\x1b[0m
\x1b[38;5;118m \\\\\x1b[38;5;106m((((((\x1b[38;5;240m.@@@@@@@@@@@@@@@@ \x1b[0m
------ \x1b[38;5;196mP Y P Y K A T Z\x1b[0m ------
"""
"""
6 changes: 3 additions & 3 deletions pypykatz/commons/winapi/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ def __init__(self, api = None):

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

def get_domain(self):
if self.domain is None:
params = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters')
params = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters')
self.domain = winreg.QueryValueEx(params, 'Domain')[0]
return self.domain

Expand Down Expand Up @@ -119,4 +119,4 @@ def list_all_pids(self):
#for srv in t:
# print(str(t[sid]))
#t = u.get_current_user()
#print(str(t))
#print(str(t))
6 changes: 3 additions & 3 deletions pypykatz/dpapi/dpapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
if platform.system().lower() == 'windows':
from pypykatz.commons.winapi.processmanipulator import ProcessManipulator

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

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

def decrypt_vpol_file(self, file_path):
"""
r"""
Decrypts a VPOL file
Location: %APPDATA%\Local\Microsoft\Vault\%GUID%\<>.vpol
Expand Down

0 comments on commit 0b2d070

Please sign in to comment.