From 0a26275af913b65fbfdebc8c9ac188489255a59c Mon Sep 17 00:00:00 2001 From: lcfr123 Date: Wed, 28 Dec 2016 17:00:04 +0100 Subject: [PATCH] =?UTF-8?q?Added=20workaround=20for=20=E2=80=98flags=20=3D?= =?UTF-8?q?=3D=2016=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python_scripts/backups/backup10.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python_scripts/backups/backup10.py b/python_scripts/backups/backup10.py index d302c8d..687352a 100644 --- a/python_scripts/backups/backup10.py +++ b/python_scripts/backups/backup10.py @@ -97,7 +97,10 @@ def __init__ (self, path): relative_path = record[2] flags = record[3] file_blob = record[4] - self.files[filename] = MBFile(domain, relative_path, flags, file_blob) + if flags == 16: + warn("Flags == 16 for {0} {1} ({2})".format(domain, relative_path, file_blob)) + else: + self.files[filename] = MBFile(domain, relative_path, flags, file_blob) finally: conn.close() @@ -141,7 +144,7 @@ def _extract_file(self, filename, record, output_path): if record.encryption_key is not None and self.keybag: # file is encrypted! key = self.keybag.unwrapKeyForClass(record.protection_class, record.encryption_key[4:]) if not key: - warn("Cannot unwrap key") + warn("Cannot unwrap key for {0}".format(out_file)) return aes = AES.new(key, AES.MODE_CBC, "\x00"*16)