
| [MENU] | |||||||||
| [THOUGHTS] | [TECH RESOURCES] | [TRASH TALK] | |||||||
| [DANK MEMES] | [FEATURED ARTISTS] | [W] | |||||||
Here is an example for how you can hook native library.
- 'use strict';
- 
- console.log("[*] Script is running");
- 
- global.run = function () {
-     Java.perform(function () {
- 
- 	var example_class = Java.use("<the_class_which_is_callin_jni>");
- 	example_class.stringFromJNI.implementation = function() {
- 	    console.log("[!] Inside in implementation");
- 	    var ret = this.stringFromJNI();
- 	    console.log("ret="+ret);
- 	    return ret;
- 	}    
- 	console.log("[!] DONE");
-     });
- };