Copying plist files too when decrypting a backup

This commit is contained in:
Nex 2021-08-14 18:25:41 +02:00
parent 076930c2c9
commit 88e2576334
2 changed files with 8 additions and 0 deletions

View File

@ -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()

View File

@ -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