123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import {HookImpl} from "./HookImpl";
- export let hooklinker = {
- start: function () {
- // linker64 arm64
- if (Process.pointerSize === 8) {
- let module = Process.findModuleByName("linker64");
- Interceptor.attach(module.base.add(0xb5b48), {
- onEnter: function (args) {
- var path = args[3].readCString();
- console.log("path " + path);
- if (path.includes("libil2cpp.so")) {
- HookImpl.start();
- }
- }
- })
- } else {
- //linker
- }
- },
- startByOpen: function () {
- let open = Module.findExportByName(null, "open");
- if (open != null) {
- Interceptor.attach(open, {
- onEnter: function (args) {
- let path = args[0].readCString();
- if (path.includes("libil2cpp.so")) {
- this.hook = true;
- }
- },
- onLeave: function (ret) {
- if (this.hook) {
- HookImpl.start();
- }
- }
- })
- }
- }
- }
|