Skip to content

Commit

Permalink
adapt to support older python
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Apr 3, 2024
1 parent 27e0817 commit fb6e7dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions dploot/triage/mobaxterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, target: Target, conn: DPLootSMBConnection, masterkeys: List[M
self._users = None
self.masterkeys = masterkeys

def triage_mobaxterm(self) -> Tuple[List[MobaXtermMasterPassword], List[MobaXtermCredential | MobaXtermPassword]]:
def triage_mobaxterm(self) -> Tuple[List[MobaXtermMasterPassword], List["MobaXtermCredential | MobaXtermPassword"]]:
logging.getLogger("impacket").disabled = True
mobaxterm_credentials = []
mobaxterm_masterpassword_key = []
Expand All @@ -122,7 +122,7 @@ def triage_mobaxterm(self) -> Tuple[List[MobaXtermMasterPassword], List[MobaXter
logging.debug(str(e))
return mobaxterm_masterpassword_key, mobaxterm_credentials

def triage_mobaxterm_for_user(self, user: str, sid: str = None) -> Tuple[MobaXtermMasterPassword, List[MobaXtermCredential | MobaXtermPassword]]:
def triage_mobaxterm_for_user(self, user: str, sid: str = None) -> Tuple[MobaXtermMasterPassword, List["MobaXtermCredential | MobaXtermPassword"]]:
mobaxterm_masterpassword = None
mobaxterm_credentials = []
try:
Expand Down Expand Up @@ -153,7 +153,7 @@ def triage_mobaxterm_for_user(self, user: str, sid: str = None) -> Tuple[MobaXte

return mobaxterm_masterpassword, mobaxterm_credentials

def extract_mobaxtermkeys_for_user_from_ntuser_dat(self, ntuser_dat_filename: str, user: str) -> Tuple[MobaXtermMasterPassword, List[MobaXtermCredential | MobaXtermPassword]]:
def extract_mobaxtermkeys_for_user_from_ntuser_dat(self, ntuser_dat_filename: str, user: str) -> Tuple[MobaXtermMasterPassword, List["MobaXtermCredential | MobaXtermPassword"]]:
reg = winregistry.Registry(ntuser_dat_filename, isRemote=False)
parent_key = reg.findKey(self.mobaxterm_registry_key_path)
if parent_key is None:
Expand Down Expand Up @@ -239,10 +239,10 @@ def decrypt_mobaxterm_masterpassword(self, mobaxterm_masterpassword: MobaXtermMa
mobaxterm_masterpassword.entropy = entropy
mobaxterm_masterpassword.decrypt_masterpassword_raw_value(masterkeys=self.masterkeys)

def decrypt_mobaxterm_password(self, mobaxterm_password: MobaXtermCredential|MobaXtermPassword, mobaxterm_masterpassword: MobaXtermMasterPassword) -> None:
def decrypt_mobaxterm_password(self, mobaxterm_password: "MobaXtermCredential|MobaXtermPassword", mobaxterm_masterpassword: MobaXtermMasterPassword) -> None:
mobaxterm_password.decrypt(masterpassword_key=mobaxterm_masterpassword.masterpassword_decrypted)

def extract_mobaxtermkeys_for_user_from_remote_registry(self, user: str, sid: str) -> Tuple[MobaXtermMasterPassword, List[MobaXtermCredential | MobaXtermPassword]]:
def extract_mobaxtermkeys_for_user_from_remote_registry(self, user: str, sid: str) -> Tuple[MobaXtermMasterPassword, List["MobaXtermCredential | MobaXtermPassword"]]:
self.conn.enable_remoteops()

entropy = None
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dploot"
version = "2.7.0"
version = "2.7.1"
description = "DPAPI looting remotely in Python"
readme = "README.md"
homepage = "https://github.com/zblurx/dploot"
Expand Down

0 comments on commit fb6e7dd

Please sign in to comment.