I can successfully hook into this getAuthToken method
public class AuthResponse2 extends DataResponse<Data> {
public static class Data {
private String mAuthToken;
public String getAuthToken() {
return this.mAuthToken;
}
}
}
This is my Frida JS script
setImmediate(function() {
console.log("[*] Starting script");
Java.perform(function () {
var Activity = Java.use("com.app.network.AuthResponse2$Data");
Activity.getAuthToken.overload().implementation = function () {
console.log(mAuthToken);
console.log(mAuthToken.toString());
};
});
})
But I can't get mAuthToken printed. Not sure what kind of syntax I need to use.
I've tried
this.mAuthToken too, and the following gets printed
"[object Object]"
Use .value property to access fields. I often forget this too.