Last active
November 23, 2019 22:23
-
-
Save eybisi/84b2abcf6ab88e0b4df7cf02f83d40ab to your computer and use it in GitHub Desktop.
hook getsimoperator function
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
Java.perform(function() { | |
var ThreadDef = Java.use('java.lang.Thread'); | |
var ThreadObj = ThreadDef.$new(); | |
var dalvik = Java.use("android.telephony.TelephonyManager") | |
dalvik.getSimOperator.overload().implementation = function(){ | |
console.log("[+] sim operator Catched -> ") | |
stackTrace() | |
return "302" | |
} | |
function stackTrace() { | |
console.log("------------START STACK---------------") | |
var stack = ThreadObj.currentThread().getStackTrace(); | |
for (var i = 0; i < stack.length; i++) { | |
console.log(i + " => " + stack[i].toString()); | |
} | |
console.log("------------END STACK---------------"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment