Crates.io | NEXMemory |
lib.rs | NEXMemory |
version | 0.1.2 |
source | src |
created_at | 2023-04-12 19:55:49.511121 |
updated_at | 2023-04-13 21:28:42.772245 |
description | Easily read, and write into a process's memory. |
homepage | |
repository | https://github.com/NeutronX-dev/NEXMemory |
max_upload_size | |
id | 837185 |
size | 45,554 |
Firstly, you need to import NEXMemory
into your project, you can do this by writing the following below [dependencies]
in Cargo.toml
:
NEXMemory = "0.1.0"
Running this in your terminal:
cargo add NEXMemory
fn main() {
// Getting handle for example.exe & Building a process struct
let handle: u32 = NEXMemory::process_match_name(|proc| proc.contains("example.exe")).unwrap();
let process = NEXMemory::Process::new(handle);
// Reading Example
let mut read_value: u32 = 0;
println!("Read {} bytes.", {
process.read_memory(&mut read_value, 0x0000110).unwrap() // Random Address
});
// Writing Example
let mut write_value: u32 = 0;
println!("Wrote {} bytes.", {
process.write_memory(&mut write_value, 0x0000110).unwrap() // Random Address
});
}
The code is probably bad, I am still learning, however if you find anything that as poorly written, a bad practice, etc... feel free to correct it.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.