Skip to content

Instantly share code, notes, and snippets.

@ptrstr
Created April 11, 2021 17:30
Show Gist options
  • Save ptrstr/c65ee6390eb4d545a0ec93cb7433bc6d to your computer and use it in GitHub Desktop.
Save ptrstr/c65ee6390eb4d545a0ec93cb7433bc6d to your computer and use it in GitHub Desktop.
Small script to find all IPSW files with research (symbolicated) kernelcaches. Uses ipsw.me API
from remotezip import RemoteZip
import requests
def ipsw_api(endpoint):
return requests.get('https://api.ipsw.me/v4/' + endpoint).json()
def scan():
for device in ipsw_api('devices'):
print(' [*] Device %s' % (device['name']))
for firmware in ipsw_api('device/' + device['identifier'])['firmwares']:
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:
continue
if __name__ == '__main__':
scan()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment