I am currently trying to hook the constructor of every int
in an app.
In my test app, there is this keySize
variable, declared like this :
int keySize = 256;
I want to be able to print “int with value 256 has been declared”
I’ve managed to hook the constructor of java.lang.Integer
using these hooks :
Java.use('java.lang.Integer').$init.overload("int").implementation = function(int_argument) {
console.log(int_argument)
return this.$init.overload("int").call(this,int_argument);
}
Java.use('java.lang.Integer').$init.overload("java.lang.String").implementation = function(string_argument){
console.log(string_argument)
return this.$init.overload("java.lang.String").call(this,string_argument);
}
Despite this hook, I don’t see the value of my keySize variable in what Frida prints, is there something I’m doing wrong ? Is it even possible with Frida ?
New contributor
4stronomical is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.