Skip to content

Instantly share code, notes, and snippets.

@konwa
konwa / hookNativeFunc.js
Created August 9, 2022 03:16 — forked from 709924470/hookNativeFunc.js
Frida android native hooking
// Android native hooks By @709924470
// CC-BY-NC 4.0
var moduleName = "libmain.so"; // Module name gose here
var hookFunctions = [
{
name: "Java_com_example_hellojni_getstr", // Function name goes here
onEnter: function(args){
// TODO: your code here
},
onLeave: function(ret){
@konwa
konwa / objectdump.js
Created May 26, 2023 11:09 — forked from SeeFlowerX/objectdump.js
参考了Wallbreaker,把全部父类的的field也打印了,可以直接在hook脚本接入,不需要额外代码
function log(msg) {
console.log(msg);
}
let handleCache = [];
function getRealClassName(object) {
const objClass = Java.use("java.lang.Object").getClass.apply(object);
return Java.use("java.lang.Class").getName.apply(objClass)
}