-
打印调用堆栈,
hook 某个方法,想看下调用堆栈,代码如下:
function showStacks() {
Java.perform(function () {
send(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Exception").$new()));
});
}
二,需要hook okhttp3 HttpUrl 参数
function hookOkhttp3() {
var Builder = Java.use('okhttp3.Request$Builder');
Builder.url.overload('okhttp3.HttpUrl').implementation = function (a) {
console.log('get a: ' + a)
var res = this.url(a);
console.log("res: