Created
April 22, 2019 09:27
-
-
Save adamyordan/848a11b33c8b5455b07ea669e7319cdd to your computer and use it in GitHub Desktop.
Simple Frida script to log (console output) targeted methods when called
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java.perform(function() { | |
const targetClass = Java.use('com.example.TargetClass'); | |
targetClass.targetMethod.implementation = function() { | |
const argumentsJson = JSON.stringify(arguments, null, 2); | |
const returnValue = targetClass.targetMethod.apply(this, arguments); | |
console.log('TARGETED_METHOD_CALLED'); | |
console.log('ARGUMENTS:', argumentsJson); | |
console.log('RETURN_VALUE:', returnValue); | |
return returnValue; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
iOS version?