update hook JNI by address

This commit is contained in:
iddoeldor 2018-06-08 16:45:03 +03:00 committed by GitHub
parent d432b6afdc
commit 03d3457372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
- [SQLite hook example](#sqlite-hook) - [SQLite hook example](#sqlite-hook)
- [Hook Java refelaction](#hook-refelaction) - [Hook Java refelaction](#hook-refelaction)
- [Hook constructor](#hook-constructor) - [Hook constructor](#hook-constructor)
- [Hook JNI](#hook-jni) - [Hook JNI by address](#hook-jni-by-address)
- [Print all runtime strings & Stacktrace](#print-runtime-strings) - [Print all runtime strings & Stacktrace](#print-runtime-strings)
- [Find iOS application UUID](#find-ios-application-uuid) - [Find iOS application UUID](#find-ios-application-uuid)
- [Execute shell command](#execute-shell-command) - [Execute shell command](#execute-shell-command)
@ -66,8 +66,8 @@ Java.use('java.lang.StringBuilder').$init.overload('java.lang.String').implement
return this(stringArgument); return this(stringArgument);
}; };
``` ```
#### Hook JNI #### Hook JNI by address
Hook native method and print arguments Hook native method by module name and method address and print arguments
``` ```
var moduleName = "libfoo.so"; var moduleName = "libfoo.so";
var nativeFuncAddr = 0x1234; // $ nm --demangle --dynamic libfoo.so | grep "Class::method(" var nativeFuncAddr = 0x1234; // $ nm --demangle --dynamic libfoo.so | grep "Class::method("