-
-
Save profiles/a95ca2a726c7309d1f74fe23d03d1461 to your computer and use it in GitHub Desktop.
Small script to find all IPSW files with research (symbolicated) kernelcaches. Uses ipsw.me API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from remotezip import RemoteZip | |
import requests | |
import concurrent.futures | |
def ipsw_api(endpoint): | |
return requests.get('https://api.ipsw.me/v4/' + endpoint).json() | |
def process_firmware(firmware): | |
try: | |
with RemoteZip(firmware['url']) as zip: | |
for zip_info in zip.infolist(): | |
if zip_info.filename.startswith('kernelcache.research'): | |
print(' [+] %s - %s %s %s (%s)' % (zip_info.filename, firmware['identifier'], firmware['version'], firmware['buildid'], firmware['url'])) | |
break | |
except: | |
pass | |
def scan_device(device): | |
print(' [*] Device %s %s' % (device['identifier'], device['name'])) | |
firmwares = ipsw_api('device/' + device['identifier'])['firmwares'] | |
with concurrent.futures.ThreadPoolExecutor() as executor: | |
executor.map(process_firmware, firmwares) | |
def scan(): | |
devices = reversed(ipsw_api('devices')) | |
with concurrent.futures.ThreadPoolExecutor() as executor: | |
executor.map(scan_device, devices) | |
if __name__ == '__main__': | |
scan() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment