Error: setName(): argument types do not match any of:
.overload('java.lang.String')
at ge (frida/node_modules/frida-java-bridge/lib/class-factory.js:584)
at frida/node_modules/frida-java-bridge/lib/class-factory.js:996
at je (frida/node_modules/frida-java-bridge/lib/class-factory.js:633)
at frida/node_modules/frida-java-bridge/lib/class-factory.js:616
hook代碼如下:
//獲取所有方法,并Hook
function HookAllMethod() {
var student=Java.use('com.example.encrptiondemo.Person');
var methods=student.class.getDeclaredMethods();
for (var i=0;i<methods.length;i++){
var methodName=methods.getName(); console.log(methodName);
//多個重載
for(var k=0;k<student[methodName].overloads.length;k++){
student[methodName].overloads[k].implementation=function() { console.log("arguments:",JSON.stringify(arguments));
//多個參數(shù)
for (var j=0;j<arguments.length;j++){ console.log(arguments[j]);
}