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

OpenM-Project/libdopamine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libdopamine 🌙 ⚡


💻 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

You can add the following code under [dependencies] in your Cargo.toml file:

libdopamine = { git = "https://github.com/OpenM-Project/libdopamine.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 & get a handle
  • Wait for the module & get a handle
  • Dump the module and patch it
  • Inject patched module into memory

⚠️ WARNING: This example ignores error handling using .unwrap(). Use the documentation for libdopamine::errors for information on how to handle errors.

use libdopamine;

fn main() {
    let (pid, process) = libdopamine::process::wait_for_process("my_app.exe").unwrap();
    let (_modname, module) = libdopamine::module::wait_for_module(process, "super_secret_stuff.dll").unwrap();
    let (length, mut data) = libdopamine::module::dump_module(process, module).unwrap();

    let mut new_data = ...; // Do your modifications here
    let _ = libdopamine::module::inject_module(process, module, &mut new_data, False);
}

📃 License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages