Parsing PLIST files
Recipe Difficulty: Easy
Python Version: 2.7 or 3.5
Operating System: Any
This recipe will process the Info.plist
file present in every iOS backup and extract device-specific information such as the device name, IMEI, serial number, product make, model, and iOS version, and the last backup date. Property lists, or PLISTs, come in two different formats: XML or binary. Typically, when dealing with binary PLISTs, one will need to use the plutil utility on a macOS platform to convert it to a readable XML format. However, we will introduce a Python library that handles both types readily and easily. Once we extract the relevant data elements from the Info.plist
file, we will print this data to the console.
Getting started
This recipe requires the installation of the third-party library biplist
. All other libraries used in this script are present in Python's standard library. The biplist
module provides a means of processing both XML and binary PLIST files.
Note
To learn more about...