init
This commit is contained in:
24
agent/index.ts
Normal file
24
agent/index.ts
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user