1
mirror of https://github.com/hashcat/hashcat synced 2024-11-20 23:27:31 +01:00

Extract all active keys

This commit is contained in:
Konrad Goławski 2022-11-02 22:00:02 +01:00
parent 2a20731b00
commit 23139faa62
2 changed files with 11 additions and 4 deletions

View File

@ -11,6 +11,12 @@
- Added hash-mode: ENCsecurity Datavault (MD5/keychain)
- Added hash-mode: Dahua NVR/DVR/HVR (md5($salt1.strtoupper(md5($salt2.$pass))))
##
## Bugs
##
- Fixed keys extraction in luks2hashcat - now extracts all active keys
##
## Technical
##

View File

@ -273,8 +273,13 @@ def extract_version1(file):
)
# check for any active key
if all(key.active not in [KeyVersion1.Active.ENABLED, KeyVersion1.Active.ENABLED_OLD] for key in header.keys):
# all keys are disabled
raise ValueError("all keys are disabled")
for key in header.keys:
if key.active not in [KeyVersion1.Active.ENABLED, KeyVersion1.Active.ENABLED_OLD]:
# skip inactive keys
continue
hash = SIGNATURE + "$".join(
@ -294,10 +299,6 @@ def extract_version1(file):
)
)
print(hash)
break
else:
# all keys are disabled
raise ValueError("all keys are disabled")
# main