https://github.com/bakerface/hijack-process
Inspect and manipulate the memory of running processes
https://github.com/bakerface/hijack-process
hijack inspect javascript manipulate memory nodejs process
Last synced: 9 days ago
JSON representation
Inspect and manipulate the memory of running processes
- Host: GitHub
- URL: https://github.com/bakerface/hijack-process
- Owner: bakerface
- License: mit
- Created: 2017-05-05T10:51:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T12:48:19.000Z (about 9 years ago)
- Last Synced: 2026-04-23T09:31:39.682Z (20 days ago)
- Topics: hijack, inspect, javascript, manipulate, memory, nodejs, process
- Language: C++
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hijack-process
[](http://badge.fury.io/js/hijack-process)
[](https://www.npmjs.com/package/hijack-process)
This package can be used to inspect and manipulate the memory of running
processes. **Please note that most platforms restrict virtual memory access to
priviliged users.**
### Table of Contents
- [**hijack**](#hijack-id)(*id*) - hijack a process
- *process*.[**read**](#process-read)(*address*, *size*) - read a byte array
- *process*.[**write**](#process-write)(*address*, *bytes*) - write a byte array
### Documentation
# **hijack**(*id*)
Attaches to the process with the specified *id*.
``` javascript
var hijack = require('hijack-process');
var thisProcess = hijack(process.pid);
// => { handle: 1234 }
```
# *process*.**read**(*address*, *size*)
Read *size* bytes from the specified *address*.
``` javascript
var hijack = require('hijack-process');
var thisProcess = hijack(process.pid);
var bytes = thisProcess.read(0xDEADBEEF, 8);
// => [ 0, 1, 2, 3, 4, 5, 6, 7 ]
```
# *process*.**write**(*address*, *bytes*)
Write an array of *bytes* to the specific *address*.
``` javascript
var hijack = require('hijack-process');
var thisProcess = hijack(process.pid);
var ascending = thisProcess.read(0xDEADBEEF, 8);
// => [ 0, 1, 2, 3, 4, 5, 6, 7 ]
thisProcess.write(0xDEADBEEF, [ 7, 6, 5, 4, 3, 2, 1, 0 ]);
var descending = thisProcess.read(0xDEADBEEF, 8);
// => [ 7, 6, 5, 4, 3, 2, 1, 0 ]
```