LunaTextractor is an open-source x86/x64 text hooker for Windows support almost visual novel games
-
✅ LunaHook ver 3.2.1
-
✅ Need files include
LunaHost64.dll
LunaHost32.dll
LunaHook64.dll
LunaHook32.dll
LunaHostCLI64.exe / LunaHostCLI32.exe
npm i lunahook
import LunaHookTextractor from "lunaHook";
//process pid
const PID = 16064
//need the path of LunaHostCLI64.exe
let textractor = new LunaHookTextractor('../unaTextractor/LunaHostCLI64.exe');
textractor.on('output', output => {
console.log(`[${output.handle}]: ${output.text}`)
})
textractor.start()
textractor.attach(PID)
{
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
}
The constructor.
Path
to LunaHostCLI64/32.exe
Start LunaHook 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 LunaHook 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
Execute a command manually.
command
- The command to execute
ReferenceError if LunaHook process is not started
Stop LunaHook process.