Textractor wrapper for Node.js.
Textractor (a.k.a. NextHooker) is an open-source x86/x64 text hooker for Windows/Wine based off of ITHVNR.
- Textractor v4.3.0 and above
const Textractor = require("textractor").Textractor;
let t = new Textractor("X:/path/to/TextractorCLI.exe");
t.on("output", output => {
console.log(`[${output.handle}]: ${output.text}`);
});
t.start();
t.attach(PID);
The constructor.
path
- Path to TextractorCLI.exe
Start Textractor process.
Attach text hooker to a specific process.
pid
- Process ID
- RangeError if pid is invalid
- ReferenceError if Textractor process is not started
Detach text hooker to a specific process.
pid
- Process ID
- ReferenceError if the process has not been attached
Inject a hook into a specific process.
Supports /H hook code and /R read code.
pid
- Process ID
- ReferenceError if Textractor process is not started
- ReferenceError if the process has not been attached
- SyntaxError if code is invalid
Specify callback function when text outputs.
event
- Must be "output"listener
- The callback function
{
handle: number; // hook index
pid: number; // process ID
addr: number; // hook address
ctx: number; // hook context
ctx2: number; // hook context 2
name: string; // hook name
code: string; // hook code
text: string; // output text
}
Execute a command manually.
command
- The command to execute
- ReferenceError if Textractor process is not started
Stop Textractor process.
MIT