mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-24 06:51:39 +00:00
A more concrete way to determine database offset
This commit is contained in:
@@ -112,7 +112,8 @@ def decrypt_backup(database, key, output, crypt=Crypt.CRYPT14):
|
|||||||
raise ValueError("The crypt15 file must be at least 131 bytes")
|
raise ValueError("The crypt15 file must be at least 131 bytes")
|
||||||
t1 = t2 = None
|
t1 = t2 = None
|
||||||
iv = database[8:24]
|
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:
|
if t1 != t2:
|
||||||
raise ValueError("The signature of key file and backup file mismatch")
|
raise ValueError("The signature of key file and backup file mismatch")
|
||||||
|
|||||||
Reference in New Issue
Block a user