Due to various troubles on binding and compiling from upstream, this project has been deprecated and no longer supported.
Textractor has released a CLI version, please refer to node-textractor to get the same functionalities.
Below is the original README, if you MUST use this project, use at your own risk.
node-nexthooker is a Node.js wrapper for NextHooker (now renamed Textractor).
Textractor is the next generation of text hooker made by Artikash and DoumanAsh.
For the best compatibility, vnrhook.dll and nexthooker.node SHOULD BE PLACED UNDER THE ROOT FOLDER OF YOUR PROJECT!!!
npm install --save electron
npm install --save nexthooker --force
if you see an error with node-gyp rebuild, don't worry.
cd .\node_modules\nexthooker
- Open CMakeLists.txt from Visual Studio
- Change build option to x86-Debug
- CMake -> Generate All
npm install -g node-gyp
node-gyp rebuild --target=<ELECTRON_VERSION> --arch=ia32 --dist-url=https://atom.io/download/electron --debug
cp .\Builds\x86-Debug\Build\vnrhook.dll ..\..
cp .\build\Debug\nexthooker.node ..\..
const hooker = require('./nexthooker')
hooker.onProcessAttach((pid) => { console.log(`process attached: ${pid}`) })
hooker.onProcessDetach((pid) => { console.log(`process detached: ${pid}`) })
hooker.onThreadCreate(
(thread) => { console.log(`thread create: ${JSON.stringify(thread)}`) },
(thread, text) => { console.log(`get text '${text}' from thread: ${JSON.stringify(thread)}`) }
)
hooker.onThreadRemove((thread) => { console.log(`thread removed: ${JSON.stringify(thread)}`) })
hooker.start()
hooker.injectProcess(parseInt(process.argv[2]))
/* index.js */
.\node_modules\.bin\electron.cmd index.js <PID_OF_GAME>
npm install --save nexthooker --force
or
git clone https://github.com/Yagt/node-nexthooker
- Open CMakeLists.txt from Visual Studio
- Change build option to x86-Debug
- CMake -> Generate All
npm install -g node-gyp
node-gyp rebuild --debug
cp .\Builds\x86-Debug\Build\vnrhook.dll .
cp .\build\Debug\nexthooker.node .
const hooker = require('./nexthooker')
hooker.onProcessAttach((pid) => { console.log(`process attached: ${pid}`) })
hooker.onProcessDetach((pid) => { console.log(`process detached: ${pid}`) })
hooker.onThreadCreate(
(thread) => { console.log(`thread create: ${JSON.stringify(thread)}`) },
(thread, text) => { console.log(`get text '${text}' from thread: ${JSON.stringify(thread)}`) }
)
hooker.onThreadRemove((thread) => { console.log(`thread removed: ${JSON.stringify(thread)}`) })
hooker.start()
hooker.injectProcess(parseInt(process.argv[2]))
/* index.js */
node index.js <PID_OF_GAME>
The four callback function (onProcessAttach, onProcessDetach, onThreadCreate and onThreadRemove) should be declared before start() being called.
GPL v3