Skip to content

Instantly share code, notes, and snippets.

@adamyordan
Created April 22, 2019 09:27
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamyordan/848a11b33c8b5455b07ea669e7319cdd to your computer and use it in GitHub Desktop.
Save adamyordan/848a11b33c8b5455b07ea669e7319cdd to your computer and use it in GitHub Desktop.
Simple Frida script to log (console output) targeted methods when called
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;
}
});
@iamvinny
Copy link

iamvinny commented Apr 7, 2024

iOS version?

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