mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-22 05:31:11 +00:00
Merge pull request #3498 from ventaquil/bugfix/luks-all-keys
Tool `luks2hashcat.py` extract all active keys
This commit is contained in:
commit
23458b8898
@ -12,6 +12,12 @@
|
|||||||
- Added hash-mode: DANE RFC7929/RFC8162 SHA2-256
|
- Added hash-mode: DANE RFC7929/RFC8162 SHA2-256
|
||||||
- Added hash-mode: Dahua NVR/DVR/HVR (md5($salt1.strtoupper(md5($salt2.$pass))))
|
- 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
|
## Technical
|
||||||
##
|
##
|
||||||
|
@ -273,8 +273,13 @@ def extract_version1(file):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# check for any active key
|
# 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:
|
for key in header.keys:
|
||||||
if key.active not in [KeyVersion1.Active.ENABLED, KeyVersion1.Active.ENABLED_OLD]:
|
if key.active not in [KeyVersion1.Active.ENABLED, KeyVersion1.Active.ENABLED_OLD]:
|
||||||
|
# skip inactive keys
|
||||||
continue
|
continue
|
||||||
|
|
||||||
hash = SIGNATURE + "$".join(
|
hash = SIGNATURE + "$".join(
|
||||||
@ -294,10 +299,6 @@ def extract_version1(file):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
print(hash)
|
print(hash)
|
||||||
break
|
|
||||||
else:
|
|
||||||
# all keys are disabled
|
|
||||||
raise ValueError("all keys are disabled")
|
|
||||||
|
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
Loading…
Reference in New Issue
Block a user