我正在使用 android frida 来挂钩构造函数,但它没有从我的 frida 脚本中调用构造函数。
我的代码:
安卓
package com.demo.app.test;
public class DemoTest {
public String v1;
public int v2;
public boolean v3;
public DemoTest(String v1, int v2, boolean v3){
this.v1 = v1;
this.v2 = v2;
this.v3 = v3;
}
}
Frida 脚本 - test.js
setTimeout(function() {
Java.perform(function() {
console.log(" Demo Test")
var activity = Java.use("com.demo.app.test.DemoTest");
activity.$init.overload('java.lang.String', 'int', 'boolean').implementation = function(arg0, arg1, arg2) {
console.log(arg0+" :: "+arg1+" :: "+arg2);
return this.init.overload('java.lang.String', 'int', 'boolean').call(this,arg0, arg1, arg2);
}
});
}, 0);
弗里达指挥部:
frida -U -f com.demo.app -l test.js --no-pause
这是上面的代码。我无法在实现内部调用,它没有从构造函数中得到任何结果。
请建议我一些解决方案。