diff --git a/Whatsapp_Chat_Exporter/extract.py b/Whatsapp_Chat_Exporter/extract.py index f2aebf1..a6b6469 100644 --- a/Whatsapp_Chat_Exporter/extract.py +++ b/Whatsapp_Chat_Exporter/extract.py @@ -112,7 +112,8 @@ def decrypt_backup(database, key, output, crypt=Crypt.CRYPT14): raise ValueError("The crypt15 file must be at least 131 bytes") t1 = t2 = None iv = database[8:24] - db_ciphertext = database[131:] + db_offset = database[0] + 2 # Skip protobuf + protobuf size and backup type + db_ciphertext = database[proto_len:] if t1 != t2: raise ValueError("The signature of key file and backup file mismatch")