2.0.2 • Published 10 months ago

frida-itrace v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

frida-itrace

Instruction tracer powered by Frida.

Example

import {
    TraceBuffer,
    TraceBufferReader,
    TraceSession,
    TraceStrategy,
} from "frida-itrace";

const strategy: TraceStrategy = {
    type: "thread",
    threadId: Process.enumerateThreads()[0].id
};

const buffer = TraceBuffer.create();

const session = new TraceSession(strategy, buffer);
session.events.on("start", (regSpecs, regValues) => {
    send({ type: "itrace:start", payload: regSpecs }, regValues);
});
session.events.on("end", () => {
    send({ type: "itrace:end" });
});
session.events.on("compile", (block) => {
    send({ type: "itrace:compile", payload: block });
});
session.events.on("panic", (message) => {
    console.error(message);
});
session.open();

const reader = new TraceBufferReader(buffer);
setInterval(() => {
    const chunk: ArrayBuffer = reader.read();
    if (chunk.byteLength === 0) {
        return;
    }
    send({ type: "itrace:chunk" }, chunk);
}, 10);
2.0.2

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago