This commit is contained in:
Sky
2026-02-04 11:35:08 +00:00
commit 84305e82e5
11 changed files with 735 additions and 0 deletions

24
agent/index.ts Normal file
View File

@@ -0,0 +1,24 @@
import Java from "frida-java-bridge";
import { log } from "./logger.js";
import { exit } from "node:process";
function hook() {
const baseAddr = Process.findModuleByName("libmer.so")?.base;
if (!baseAddr) {
log("baseAddr is not found.");
return;
}
let offset = 0x01;
Interceptor.attach(baseAddr.add(ptr(offset)), {
onEnter: function (args) {},
onLeave: function (args) {},
});
}
if (Java.available) {
setTimeout(function () {
Java.perform(hook);
}, 200);
} else {
console.log("No Java VM in this process");
}