chame1eon / jnitrace

A Frida based tool that traces usage of the JNI API in Android apps.
MIT License
1.62k stars 260 forks source link

Error when running script line 1: expecting '(' at <anonymous> (/frida/repl-2.js:1) #65

Open Mkurbanov opened 1 year ago

Mkurbanov commented 1 year ago

When i run example script showing error. Thank you in advance.

import { JNIInterceptor } from "jnitrace-engine";

// Attach to the JNI FindClass method
JNIInterceptor.attach("FindClass", {
    onEnter(args) {
        // called whenever the FindClass is about to be called
        console.log("FindClass method called");
        this.className = Memory.readCString(args[1]);
    },
    onLeave(retval) {
        // called whenever the FindClass method has finished executing
        console.log("\tLoading Class:", this.className);
        console.log("\tClass ID:", retval.get());
    }
});

Снимок

frida version:

16.1.3

Device:

Nox Emulator, Android Version 7. x86.

ubn9 commented 3 months ago

any help>>?