最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Code for Frida to intercept what are the values of arguments passing through the function when it is called in Andr

programmeradmin1浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 5
Java.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);

        }

});

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论