Support crypt12

This commit is contained in:
KnugiHK
2021-07-10 21:28:49 +08:00
parent b9f343cf2f
commit 35ef4031fc
2 changed files with 15 additions and 7 deletions

View File

@@ -94,7 +94,8 @@ def main():
print("Decryption key specified, decrypting WhatsApp backup...")
key = open(options.key, "rb").read()
db = open(options.backup, "rb").read()
if not extract.decrypt_backup(db, key, msg_db):
is_crypt14 = False if "crypt12" in options.backup else True
if not extract.decrypt_backup(db, key, msg_db, is_crypt14):
print("Dependencies of decrypt_backup are not present. For details, see README.md")
return False
if options.wa is None: