3.0.0 • Published 6 months ago

frida-itrace v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 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);
3.0.0

6 months ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago