-
-
Save apkunpacker/68c1a71efcb5e4a40b952e43c5466122 to your computer and use it in GitHub Desktop.
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
Interceptor.attach(ObjC.classes.AppDelegate['- application:continueUserActivity:restorationHandler:'].implementation, { | |
onEnter: function (args) { | |
printHeader(args) | |
this.application = ObjC.Object(args[2]); | |
this.continueUserActivity = ObjC.Object(args[3]); | |
this.restorationHandler = ObjC.Object(args[4]); | |
console.log("application: " + this.application); | |
// https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc | |
console.log("continueUserActivity: " + this.continueUserActivity); | |
console.log("continueUserActivity.webpageURL: " + this.continueUserActivity.webpageURL().toString()); | |
console.log("restorationHandler: " + this.restorationHandler); | |
printContext(this); | |
}, | |
onLeave: function (retval) { | |
printRet(retval); | |
} | |
}); | |
Interceptor.attach(ObjC.classes.__NSConcreteURLComponents['- initWithURL:resolvingAgainstBaseURL:'].implementation, { | |
onEnter: function (args) { | |
printHeader(args) | |
this.initWithURL = ObjC.Object(args[2]).toString(); | |
this.resolvingAgainstBaseURL = args[3]; | |
console.log("initWithURL: " + this.initWithURL); | |
console.log("resolvingAgainstBaseURL: " + this.resolvingAgainstBaseURL); | |
printContext(this); | |
}, | |
onLeave: function (retval) { | |
printRet(retval); | |
retval = ObjC.Object(retval); | |
console.log("ret (scheme=" + retval.scheme() | |
+ ", host=" + retval.host() | |
+ ", path=" + retval.path() | |
+ ")"); | |
} | |
}); | |
function printHeader(args) { | |
console.log("\n[*] ("+ ObjC.Object(args[0]).toString() + ") " + Memory.readUtf8String(args[1]) + " @ " + args[1]) | |
}; | |
function printRet(retval) { | |
console.log('RET @ ' + retval + ': ' ); | |
try { | |
console.log(new ObjC.Object(retval).toString()); | |
} catch (e) { | |
console.log(retval.toString()); | |
} | |
}; | |
function printContext(_this) { | |
console.log('Context information:'); | |
console.log('Context : ' + JSON.stringify(_this.context)); | |
console.log('Return : ' + _this.returnAddress); | |
console.log('ThreadId : ' + _this.threadId); | |
console.log('Depth : ' + _this.depth); | |
console.log('Errornr : ' + _this.err); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment