Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.DS_Store
10 changes: 9 additions & 1 deletion MKDecrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,15 @@ def main():
dmsetupcmd = 'dmsetup create ' + dmname + ' ' + ro + ' --table ' + table
subprocess.call(dmsetupcmd, shell=True)
## test that the volume has decrypted correctly by reading (part of) the OEM from VBR
test = open(dmslot, 'rb')
try:
test = open(dmslot, 'rb')
## in case dmslot not found error
except IOError:
print("io error! decrypt failed! try another one")
if crypt == ' kuznyechik-xts-plain64 ':
## if all encryption types have been tried then try hidden volumes
tryhiddenvol = True
continue
test.seek(3)
OEM = test.read(5)
test.seek(1024)
Expand Down