mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 22:58:30 +00:00
Fix luks2hashcat for empty containers
Return error when LUKS container is not initialized.
This commit is contained in:
parent
8973f2beca
commit
5b0ef28432
@ -253,6 +253,8 @@ def extract_version1(file):
|
||||
payload = file.read(PAYLOAD_SIZE)
|
||||
if len(payload) < PAYLOAD_SIZE:
|
||||
raise ValueError("file contains less data than needed")
|
||||
if sum(payload) == 0:
|
||||
raise ValueError("file not initialized - payload contains zeros only")
|
||||
|
||||
# convert into header
|
||||
header = HeaderVersion1(
|
||||
|
Loading…
Reference in New Issue
Block a user