Skip to main content

A python parser for iOS backups

Project description

Python application Pypi version Language grade: Python

Description

pyiosbackup is a utility created in order to parse and decrypt iOS backups.

Installation

Install the last released version using pip:

python3 -m pip install --user -U pyiosbackup

Or install the latest version from sources:

git clone git@github.com:matan1008/pyiosbackup.git
cd pyiosbackup
python3 -m pip install --user -U -e .

Usage

CLI

Before decrypting a backup, you need to create one. You can use the amazing pymobiledevice3 to do that:

pymobiledevice3 backup2 encryption ON 1234 .
pymobiledevice3 backup2 backup --full .

After creating the backup, you can decrypt it:

pyiosbackup extract-all $BACKUP_FOLDER 1234 --target decrypted

You can also extract single files by their domain and relative path:

pyiosbackup extract-domain-path $BACKUP_FOLDER RootDomain Library/Preferences/com.apple.backupd.plist -p 1234

Or by their file id:

pyiosbackup extract-id $BACKUP_FOLDER a8323a1323d9cad416d8b44d87c8049de1adff25 -p 1234

You can also print some metadata about the backup:

pyiosbackup stats $BACKUP_FOLDER -p 1234

Python

Another way to access the functionality of the package is using python code.

For example, iterating over all files in a backup will look like:

from pyiosbackup import Backup

backup_path = 'BACKUP_PATH'
password = '1234'

backup = Backup.from_path(backup_path, password)
for file in backup.iter_files():
    print(file.filename)
    print(file.last_modified)

You can also access a specific file:

import plistlib

from pyiosbackup import Backup

backup_path = 'BACKUP_PATH'
password = '1234'

backup = Backup.from_path(backup_path, password)
backupd_plist = backup.get_entry_by_domain_and_path(
    'RootDomain', 'Library/Preferences/com.apple.backupd.plist'
)
print(plistlib.loads(backupd_plist))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyiosbackup-0.2.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyiosbackup-0.2.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file pyiosbackup-0.2.0.tar.gz.

File metadata

  • Download URL: pyiosbackup-0.2.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for pyiosbackup-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2d40f68e6a2aa6673a654b495c366206f93accb9ef7b4f3b289f9ed02529e019
MD5 8e5fd8618ba210778c86bfb708e56441
BLAKE2b-256 bf8c729def3ffe927feadac94d7d4d23117b5dcbfe42a91c68e33a1d76d6b5af

See more details on using hashes here.

File details

Details for the file pyiosbackup-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyiosbackup-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for pyiosbackup-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76356b5594cbeb7ddad9d69dcac8c504fdf5a5d7a4a698b90ff851462b4deb37
MD5 8b194924d27c916a68f472cdcc148c2d
BLAKE2b-256 b5b40bc66aea86c3cb737c3c9824dbf751bbecb52c74a1d0404afe39af4fc905

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page