Last active
August 7, 2022 16:37
-
-
Save MantisSTS/6a6d6a72cab8f04500cdddd016d13699 to your computer and use it in GitHub Desktop.
Revisions
-
MantisSTS revised this gist
Sep 8, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ if (ObjC.available) { try { -
MantisSTS created this gist
Sep 8, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ f (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!"); }