refactoring #1
This commit is contained in:
parent
910c0ce140
commit
8a42ffcfd3
@ -1,11 +1,8 @@
|
||||
/*
|
||||
=========================
|
||||
ObjC Unppining Helper
|
||||
By Lotem
|
||||
=========================
|
||||
* By LotemBY *
|
||||
|
||||
This is a frida script for unpinning and reversing of ObjC applications.
|
||||
It is used to list and intercept methods in moudles by regexs.
|
||||
Intercept method's which match regex.
|
||||
|
||||
You may change the following regex arrays to match your needs:
|
||||
*/
|
||||
@ -28,8 +25,7 @@ To run this script with frida on iPhone, follow these steps:
|
||||
5. Type in console "frida -U <APP PROCCESS NAME> -l <PATH TO THIS SCRIPT>" to run this script
|
||||
6. Now you should use the app to trigger some of the intercepted methods
|
||||
*/
|
||||
|
||||
// The "main" method. Going over all the moudles and all the methods, and trying to intercept each one which matches the regexs.
|
||||
var onCompleteCallback = function (retval) {};
|
||||
setImmediate(function () {
|
||||
if (!ObjC.available) {
|
||||
console.log("[-] Objective-C Runtime is not available!");
|
||||
@ -65,25 +61,22 @@ setImmediate(function () {
|
||||
}
|
||||
}
|
||||
},
|
||||
onComplete: function (retval) {}
|
||||
onComplete: onCompleteCallback
|
||||
});
|
||||
},
|
||||
onComplete: function (retval) {}
|
||||
onComplete: onCompleteCallback
|
||||
});
|
||||
|
||||
|
||||
console.log("[*] Completed!");
|
||||
console.log("=======================================================\n\n");
|
||||
});
|
||||
|
||||
// Return if 'str' match any of the regexs in the array 'regexList'
|
||||
function matchesRegex(regexList, str) {
|
||||
for (var i = 0; i < regexList.length; i++) {
|
||||
if (str.search(regexList[i]) != -1) {
|
||||
regexList.forEach(function(el) {
|
||||
if (str.search(el) != -1)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user