Skip to content

Instantly share code, notes, and snippets.

@zhouyunao
Forked from bet4it/intentMonitor.js
Last active February 23, 2021 14:20
Show Gist options
  • Save zhouyunao/81a21af220265729f2ef5b88c4e1d527 to your computer and use it in GitHub Desktop.
Save zhouyunao/81a21af220265729f2ef5b88c4e1d527 to your computer and use it in GitHub Desktop.
Monitor android intents with frida
Java.perform(function () {
var act = Java.use("android.app.Activity");
act.getIntent.overload().implementation = function () {
var intent = this.getIntent()
var cp = intent.getComponent()
console.log("Starting " + cp.getPackageName() + "/" + cp.getClassName())
var ext = intent.getExtras();
if (ext) {
var keys = ext.keySet()
var iterator = keys.iterator()
while (iterator.hasNext()) {
var k = iterator.next().toString()
var v = ext.get(k)
if(v){
console.log("\t" + v.getClass().getName())
console.log("\t" + k + ' : ' + v.toString())
}
else{
console.log("\t" + + k+ ' : null')
}
}
}
return intent;
};
})
@zhouyunao
Copy link
Author

try to fix the situation with a null extra data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment