Skip to content Skip to sidebar Skip to footer

Frida Calls The Wrong Constructor

I'm trying to hook the following constructor of java.net.URL: URL(URL context, String spec, URLStreamHandler handler) My code is as follows: import argparse import frida import sys

Solution 1:

I got an answer on the frida github. The solution is:

Java.perform(function () {
  var URL = Java.use('java.net.URL');

  var ctor = URL.$init.overload('java.net.URL', 'java.lang.String', 'java.net.URLStreamHandler');
  ctor.implementation = function (arg0, arg1, arg2) {
    return ctor.call(this, arg0, arg1, arg2);
  };
});

Post a Comment for "Frida Calls The Wrong Constructor"