Skip to content

Instantly share code, notes, and snippets.

View lyonanderson's full-sized avatar

Christopher Lyon Anderson lyonanderson

View GitHub Profile
@lyonanderson
lyonanderson / gist:5b8cc605be1c56b88978
Created February 26, 2015 16:42
Cycript to listen to XPC Messages being created
@import com.saurik.substrate.MS
var log = []
NSLog_ = dlsym(RTLD_DEFAULT, "NSLog")
NSLog = function() { var types = 'v', args = [], count = arguments.length; for (var i = 0; i != count; ++i) { types += '@'; args.push(arguments[i]); } new Functor(NSLog_, types).apply(null, args); }
_CFXPCCreateXPCMessageWithCFObject = dlsym(RTLD_DEFAULT, "_CFXPCCreateXPCMessageWithCFObject");
_CFXPCCreateXPCMessageWithCFObject = @encode(void *(NSDictionary * object))(_CFXPCCreateXPCMessageWithCFObject)
_CFXPCCreateXPCMessageWithCFObject_Old ={}
MS.hookFunction(_CFXPCCreateXPCMessageWithCFObject, function(object) {var result = (*_CFXPCCreateXPCMessageWithCFObject_Old )(object); log.push(object); NSLog("Object>>: " + object); return result}, _CFXPCCreateXPCMessageWithCFObject_Old)
@lyonanderson
lyonanderson / gist:9c47f039cb695e0a9965
Created February 14, 2015 16:11
Get the DigitalDevceID of a device connected to the lighting port without Jailbreak. See http://ramtin-amin.fr/#tristar for more info on IOAccessoryDigitalID
python -c "print '`idevicediagnostics ioreg IOAccessory | grep -A 2 IOAccessoryDigitalID | tail -1`'.strip().decode('base64').encode('hex')"
import urllib2
import urllib
from re import findall
import json
request = urllib2.Request('https://ireserve.apple.com/GB/en_GB/reserve/iPad/productReservation')
request.add_header('Accept','text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')
response = urllib2.urlopen(request)