Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

project-yuki/node-nexthooker

 
 

Repository files navigation

DEPRECATED - Textractor Node.js Addon

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.

Overview

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.

WARNING

For the best compatibility, vnrhook.dll and nexthooker.node SHOULD BE PLACED UNDER THE ROOT FOLDER OF YOUR PROJECT!!!

Usage (with Electron)

Get the latest version

npm install --save electron
npm install --save nexthooker --force

if you see an error with node-gyp rebuild, don't worry.

Build library

cd .\node_modules\nexthooker
  1. Open CMakeLists.txt from Visual Studio
  2. Change build option to x86-Debug
  3. CMake -> Generate All

Rebuild for Electron

npm install -g node-gyp
node-gyp rebuild --target=<ELECTRON_VERSION> --arch=ia32 --dist-url=https://atom.io/download/electron --debug

Copy Library to ROOT Folder (IMPORTANT)

cp .\Builds\x86-Debug\Build\vnrhook.dll ..\..
cp .\build\Debug\nexthooker.node ..\..

Create test program

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 */

Run test program

.\node_modules\.bin\electron.cmd index.js <PID_OF_GAME>

Usage (with Node.js)

Get the latest version

npm install --save nexthooker --force

or

git clone https://github.com/Yagt/node-nexthooker

Build library

  1. Open CMakeLists.txt from Visual Studio
  2. Change build option to x86-Debug
  3. CMake -> Generate All

Rebuild addon

npm install -g node-gyp
node-gyp rebuild --debug

Copy Library to ROOT Folder (IMPORTANT)

cp .\Builds\x86-Debug\Build\vnrhook.dll .
cp .\build\Debug\nexthooker.node .

Create test program

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 */

Run test program

node index.js <PID_OF_GAME>

Assertion of Using

The four callback function (onProcessAttach, onProcessDetach, onThreadCreate and onThreadRemove) should be declared before start() being called.

License

GPL v3

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.2%
  • C 6.1%
  • CMake 0.4%
  • Objective-C 0.2%
  • Python 0.1%
  • PowerShell 0.0%