Skip to content

alfman99/memoryts

Repository files navigation

Warning This is a work-in-progress and not the finished product.

MemoryTS - High-Level Process Memory Interaction for Node.js TypeScript

MemoryTS is a powerful TypeScript package designed to provide developers with a high-level interface for interacting with process memory in Node.js applications. With MemoryTS, you can easily read and write data to the memory of a running process, making it ideal for tasks like game hacking, debugging, and reverse engineering.

Features

  • Processes

    • Get a handle to a process
    • List all processes
    • Close the handle to a process
  • Memory

    • Read memory from a process

      • Primitives
        • Bool
        • Int8 [Byte, Char]
        • UInt8
        • Int16
        • UInt16
        • Int32
        • UInt32
        • Float
        • Double
      • Arrays of primitives
    • Write memory to a process

      • Primitives
        • Bool
        • Int8 [Byte, Char]
        • UInt8
        • Int16
        • UInt16
        • Int32
        • UInt32
        • Float
        • Double
      • Arrays of primitives
  • Pattern scanning

    • Find on memory a byte pattern that follows the IDA format (3F ?? AA 64) and return address
  • Modules

    • Find a module in a specified process
    • List all modules in a process
  • Protection

    • Set protection level on a memory region
  • Util

    • Architecture running
    • Check if running as administrator

Compatibility

  • Windows
    • Host process x86 targeting x86
    • Host process x64 targeting x86
    • Host process x64 targeting x64

For more detailed information, check out the API documentation.

Examples

Read single char Notepad.exe

import mem from 'memoryts';

// Open handle to process
const pHandle = mem.OpenProcess('Notepad.exe')

// Read 20 bytes from memory at address 0x7FFC885D3A30
const readData = mem.Read(mem.types.Char, pHandle, 0x7FFC885D3A30)

// Print data
console.log(readData.value)

Read 20 char array from Notepad.exe and transform into UTF-16 encoded String

import mem from 'memoryts';

// Open handle to process
const pHandle = mem.OpenProcess('Notepad.exe')

// Read 20 bytes from memory at address 0x7FFC885D3A30
const readData = mem.ReadArray(mem.types.Char, 20, pHandle, 0x7FFC885D3A30)

// Transform raw buffer into string using UTF-16 encoding
const data = new TextDecoder('utf-16').decode(readData.rawBuffer)

// Print data
console.log(data)

License

MemoryTS is MIT licensed.


Disclaimer: MemoryTS is intended for legal and ethical use. The developers of MemoryTS are not responsible for any misuse or damage caused by its usage. Always respect the terms of service of the software you are interacting with.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published