I'm learning frida and trying to hook a function that looks like:
`.method public final fn()[B`
It returns a byte array. Here's my code:
Java.perform(function () {
var test = Java.use("com...");
test.fn.overload().implementation = function () {
var ret = this.fn();
console.log("how to write here?");
return ret;
};
});
How to print the ret
variable returned by the function? It's a byte[]. I tried console.log
but it only prints a [object], and hexdump
complains 'expected a pointer'. How can I print the array?