Skip to content

Commit

Permalink
Fix remote dumping errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxToffy committed Jan 13, 2025
1 parent 6ee9e9b commit fdc6598
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/secretsdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def dump(self):
try:
if self.__isRemote is True:
SAMFileName = self.__remoteOps.saveSAM()
samFormat = "save"
elif self.__samHive:
SAMFileName = self.__samHive
samFormat = "save"
Expand All @@ -312,6 +313,7 @@ def dump(self):
try:
if self.__isRemote is True:
SECURITYFileName = self.__remoteOps.saveSECURITY()
securityFormat = "save"
elif self.__securityHive:
SECURITYFileName = self.__securityHive
securityFormat = "save"
Expand Down
4 changes: 2 additions & 2 deletions impacket/winregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,8 @@ def __init__(self, hive, isRemote = False, hiveFormat = 'save'):
self.__registryParser = exportRegistryParser(hive)

def close(self):
if hasattr(self, 'fd'):
self.fd.close()
if hasattr(self.__registryParser, 'fd'):
self.__registryParser.fd.close()

def __del__(self):
self.close()
Expand Down

0 comments on commit fdc6598

Please sign in to comment.