-
-
Save angelovAlex/1f4359f4e9a0a161fa5259f4fe69fb82 to your computer and use it in GitHub Desktop.
Cycript to listen to XPC Messages being created
This file contains 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
@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) | |
_CFXPCCreateCFObjectFromXPCMessage = dlsym(RTLD_DEFAULT, "_CFXPCCreateCFObjectFromXPCMessage"); | |
_CFXPCCreateCFObjectFromXPCMessage = @encode(NSDictionary *(void * object))(_CFXPCCreateCFObjectFromXPCMessage); | |
_CFXPCCreateCFObjectFromXPCMessage_Old ={} | |
MS.hookFunction(_CFXPCCreateCFObjectFromXPCMessage, function(object) {var result = (*_CFXPCCreateCFObjectFromXPCMessage_Old )(object); log.push(object); NSLog("Object<<: " + object); return result}, _CFXPCCreateCFObjectFromXPCMessage_Old) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment