Last active
August 7, 2022 16:37
-
-
Save MantisSTS/6a6d6a72cab8f04500cdddd016d13699 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
if (ObjC.available) { | |
try { | |
// Classname to be hooked | |
var className = ""; | |
// Full function name to be hooked including - or + | |
var funcName = ""; | |
var hook = eval('ObjC.classes.' + className + '["' + funcName + '"]'); | |
Interceptor.attach(hook.implementation, { | |
onEnter: function(args) { | |
console.log("[+] Class Name: " + className); | |
console.log("[+] Method Name: " + funcName); | |
}, | |
onLeave: function(retVal) { | |
console.log('Return Value: ' + ObjC.Object(retVal)); | |
} | |
}); | |
} catch(err) { | |
console.log("[!] Exception: " + err.message); | |
} | |
} else { | |
console.log("ObjC Runtime is not available!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment