Skip to content

Commit

Permalink
Merge pull request #143 from dirkjanm/patch-1
Browse files Browse the repository at this point in the history
Fix import from aiosmb during reg dump
  • Loading branch information
skelsec authored Jan 22, 2024
2 parents 6c02115 + 2066ecc commit 3195181
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypykatz/smb/regutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def regdump_single(targetid, connection, hives = ['HKLM\\SAM', 'HKLM\\SYST
try:
from aiosmb.commons.interfaces.machine import SMBMachine
from aiosmb.commons.interfaces.file import SMBFile
from aiosmb.dcerpc.v5.common.service import SMBServiceStatus
from aiosmb.dcerpc.v5.common.service import ServiceStatus
from pypykatz.alsadecryptor.asbmfile import SMBFileReader
from pypykatz.registry.aoffline_parser import OffineRegistry

Expand All @@ -102,7 +102,7 @@ async def regdump_single(targetid, connection, hives = ['HKLM\\SAM', 'HKLM\\SYST
raise err

logger.debug('[REGDUMP] Remote registry service status: %s' % status.name)
if status != SMBServiceStatus.RUNNING:
if status != ServiceStatus.RUNNING:
logger.debug('[REGDUMP] Enabling Remote registry service')
_, err = await machine.enable_service('RemoteRegistry')
if err is not None:
Expand Down Expand Up @@ -244,4 +244,4 @@ async def regfile(url, system, sam = None, security = None, software = None, smb
po = await OffineRegistry.from_async_reader(system_smbfile, sam_reader = sam_smbfile, security_reader = security_smbfile, software_reader = software_smbfile)
logger.debug('[REGFILE] Hive files parsed OK!')

return po
return po

0 comments on commit 3195181

Please sign in to comment.