mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-10 15:51:10 +00:00
Merge pull request #3458 from ventaquil/bugfix/luks2hashcat-empty-container
Fix `luks2hashcat` for empty containers
This commit is contained in:
commit
161a5a2a3c
@ -253,6 +253,8 @@ def extract_version1(file):
|
|||||||
payload = file.read(PAYLOAD_SIZE)
|
payload = file.read(PAYLOAD_SIZE)
|
||||||
if len(payload) < PAYLOAD_SIZE:
|
if len(payload) < PAYLOAD_SIZE:
|
||||||
raise ValueError("file contains less data than needed")
|
raise ValueError("file contains less data than needed")
|
||||||
|
if sum(payload) == 0:
|
||||||
|
raise ValueError("file not initialized - payload contains zeros only")
|
||||||
|
|
||||||
# convert into header
|
# convert into header
|
||||||
header = HeaderVersion1(
|
header = HeaderVersion1(
|
||||||
|
Loading…
Reference in New Issue
Block a user