mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-30 16:18:54 +00:00
Merge branch 'clearer-error-reporting' of https://github.com/dkg/mvt into dkg-clearer-error-reporting
This commit is contained in:
commit
9bb8ae5187
|
@ -78,8 +78,13 @@ class DecryptBackup:
|
||||||
cleartextpassword=password,
|
cleartextpassword=password,
|
||||||
backuproot=os.path.dirname(self.backup_path))
|
backuproot=os.path.dirname(self.backup_path))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.exception(e)
|
if isinstance(e, KeyError) and len(e.args) > 0 and e.args[0] == b"KEY":
|
||||||
log.critical("Failed to decrypt backup. Did you provide the correct password?")
|
log.critical("Failed to decrypt backup. Password is probably wrong.")
|
||||||
|
elif isinstance(e, FileNotFoundError) and os.path.basename(e.filename) == "Manifest.plist":
|
||||||
|
log.critical(f"Failed to find backup at {self.backup_path}. Did you need to specify the full path?")
|
||||||
|
else:
|
||||||
|
log.exception(e)
|
||||||
|
log.critical("Failed to decrypt backup. Did you provide the correct password? Did you point to the right backup path?")
|
||||||
|
|
||||||
def decrypt_with_key_file(self, key_file):
|
def decrypt_with_key_file(self, key_file):
|
||||||
"""Decrypts an encrypted iOS backup using a key file.
|
"""Decrypts an encrypted iOS backup using a key file.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user