A Python library for the ipsw Engine API.
Project description
ipsw-py
ipsw
SDK for Python 🚧
NOTE:
This is a work in progress ⚠️
Getting Started
Start the ipsw
daemon:
macOS
brew install blacktop/tap/ipswd
brew services start blacktop/tap/ipswd
Linux
⚠️ UNTESTED ⚠️
sudo snap install ipswd
Docker
docker run -d -p 3993:3993 -v `pwd`:/data blacktop/ipswd start
Installing
The latest stable version is available on PyPI. Either add ipsw
to your requirements.txt
file or install with pip:
pip install ipsw
Geting Started
Get IPSW info
import ipsw
client = ipsw.IpswClient(base_url='tcp://127.0.0.1:3993')
info = client.info.get("iPhone15,2_16.5_20F5028e_Restore.ipsw")
print(f'{info.version} ({info.build})')
for device in info.devices:
print(f'- {device}')
16.5 (20F5028e)
- iPhone 14 Pro
Get DSC info
import ipsw
client = ipsw.IpswClient(base_url='tcp://127.0.0.1:3993')
dsc = client.dsc.open("20F5028e__iPhone15,2/dyld_shared_cache_arm64e")
print(dsc)
print(dsc.dylibs[0])
<DSC: '(dyld_v1 arm64e) - iOS - FAEC7714-4CCD-3B99-B18F-F5EAB60DE31E'>
{'index': 1, 'name': '/usr/lib/libobjc.A.dylib', 'version': '876.0.0.0.0', 'uuid': '085A190C-6214-38EA-ACCB-428C3E8AFA65', 'load_address': 6443204608}
<Dylib: '64-bit MachO AARCH64 (ARM64e)'>
Get dylib inside DSC info
libswiftCore = dsc.dylib("libswiftCore.dylib")
print(libswiftCore)
Get DSC symbol addresses
syms = dsc.sym_addrs([{'pattern': '.*zero.*', 'image': 'libsystem_c.dylib'}])
print(syms)
Convert between DSC offsets and addresses
off = dsc.a2o(7624591060)
adr = dsc.o2a(61146836)
Lookup DSC symbol by address
print(next(dsc.a2s([7624591060])))
{"address":7624591060,"symbol":"__exit","demanged":"__exit","mapping":"__TEXT","uuid":"3AB55994-1201-3908-BE27-52BB7EFA7573","ext":".21","image":"/usr/lib/system/libsystem_kernel.dylib","section":"__text","segment":"__TEXT"}
Get MachO info
import ipsw
client = ipsw.IpswClient(base_url='tcp://127.0.0.1:3993')
macho = client.macho.open("/bin/ls", arch="arm64e")
print(macho)
<Macho: '64-bit MachO AARCH64 (ARM64e)'>
Community
You have questions, need support and or just want to talk about ipsw-py
?
Here are ways to get in touch with the ipsw-py
community:
License
MIT Copyright (c) 2023 blacktop
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
ipsw-0.1.4.tar.gz
(36.7 kB
view details)
Built Distribution
ipsw-0.1.4-py3-none-any.whl
(35.4 kB
view details)
File details
Details for the file ipsw-0.1.4.tar.gz
.
File metadata
- Download URL: ipsw-0.1.4.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afe9b5ed097d4a004e1981997d40cb92a4c878a25a5d6025299c20883f16fbe3 |
|
MD5 | 35c063f52519444bedc275a1a5716ee2 |
|
BLAKE2b-256 | 3c8a01c44b1fe56972ab48f22adfb316d3db4fb2f54b4b137a52488def04ac55 |
File details
Details for the file ipsw-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: ipsw-0.1.4-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7364d919f47818b8d8a6996230162b581825bf0c65e1b82d98dbf1cf5710de36 |
|
MD5 | ceccbca6c8eb26bbdf5024967182cad4 |
|
BLAKE2b-256 | d0f57491988a64571c840ca214bca41f429c8a38c8effa9756a5fbb0c55d4532 |