Suppose there is a function which is as below :
public String foo(String str,String str2)
{
//some code here
return str+str2;
}
What would be the Frida code(In JavaScript) to intercept the function get values of both str and str2?
Suppose there is a function which is as below :
public String foo(String str,String str2)
{
//some code here
return str+str2;
}
What would be the Frida code(In JavaScript) to intercept the function get values of both str and str2?
Share Improve this question asked Jan 30, 2021 at 6:30 Hacker111Hacker111 751 silver badge6 bronze badges 2- this may help you baeldung./java-dynamic-proxies – Fartab Commented Jan 30, 2021 at 6:44
- Where is the problem? Just apply the default hooking code for Android Java methods as shown here: frida.re/docs/examples/android – Robert Commented Jan 30, 2021 at 13:12
1 Answer
Reset to default 5Java.perform(function () {
// ClassName = Name of the class you're targeting. E.g for android os 'android.app.Activity'
var class2overload = Java.use("ClassName")
class2overload.foo.overload('java.lang.String', 'java.lang.String').implementation = function (arg1, arg2) {
console.log("Params: " + arg1 + arg2);
return this.foo(arg1, arg2);
}
});