From 88e2576334d5bca7e8a9e55f1b3525098024b9c5 Mon Sep 17 00:00:00 2001 From: Nex Date: Sat, 14 Aug 2021 18:25:41 +0200 Subject: [PATCH] Copying plist files too when decrypting a backup --- mvt/ios/cli.py | 1 + mvt/ios/decrypt.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/mvt/ios/cli.py b/mvt/ios/cli.py index 5d0a889..2441ed4 100644 --- a/mvt/ios/cli.py +++ b/mvt/ios/cli.py @@ -79,6 +79,7 @@ def decrypt_backup(ctx, destination, password, key_file, backup_path): if not backup.can_process(): ctx.exit(1) + backup.process_backup() diff --git a/mvt/ios/decrypt.py b/mvt/ios/decrypt.py index 102f87d..088417c 100644 --- a/mvt/ios/decrypt.py +++ b/mvt/ios/decrypt.py @@ -71,6 +71,13 @@ class DecryptBackup: except Exception as e: log.error("Failed to decrypt file %s: %s", relative_path, e) + # Copying over the root plist files as well. + for file_name in os.listdir(self.backup_path): + if file_name.endswith(".plist"): + log.info("Copied plist file %s to %s", file_name, self.dest_path) + shutil.copy(os.path.join(self.backup_path, file_name), + self.dest_path) + def decrypt_with_password(self, password): """Decrypts an encrypted iOS backup. :param password: Password to use to decrypt the original backup