Created
March 24, 2019 15:51
-
-
Save rena2019/00b9cbbc70885a00f57312d0d03911af to your computer and use it in GitHub Desktop.
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
class_name = "rena2019.dummyapp.LoginActivity" | |
if (Java.available) { | |
setTimeout(function() { // avoid java.lang.ClassNotFoundException | |
Java.perform(function() { | |
var my_class = Java.use(class_name); | |
//replace the original implementation of the function `isEmailValid` with our custom function | |
my_class.isEmailValid.implementation = function(x){ | |
//print the original arguments | |
console.log( "original call: fun("+ x + ")"); | |
//call the original implementation of `isEmailValid` with args | |
// var ret_value = this.isEmailValid("w@g.de"); | |
//return ret_value; | |
return true; | |
} | |
}); | |
}, 0); | |
} else { | |
send("Java not available in this process"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment