Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Latest commit

 

History

History
48 lines (37 loc) · 1.68 KB

File metadata and controls

48 lines (37 loc) · 1.68 KB

💻 Support

The library only works on Windows for now, but cross-platform support may be added in the future. Don't look forward to it, though.

For all support needed to this library, you can open an issue.

📥 Install

Installation is done through pip:

pip install git+https://github.com/OpenM-Project/librosewater.git

⚠️ WARNING: This will require you to have git in your PATH.

⚡ Example

In this small example, we will:

  • Wait for a process to start
  • Open the process
  • Get the address and path of a module loaded into the process
  • Dump the module and patch it
  • Inject patched module into memory
import ctypes
import librosewater
import librosewater.module
import librosewater.process

PID = librosewater.process.wait_for_process("my_app.exe")
process_handle = ctypes.windll.kernel32.OpenProcess(librosewater.PROCESS_ALL_ACCESS, False, PID)

# Get module address and path
module_address, module_path = librosewater.module.wait_for_module(process_handle, "super_secret_stuff.dll")

# Dump module to variable
data_length, data = librosewater.module.dump_module(process_handle, module_address)

# Inject new module data
new_data = data.replace(b"\x00", b"\x02")
librosewater.module.inject_module(process_handle, module_address, new_data)

📃 License

All code and assets are licensed under MIT License, read more at the LICENSE file.