process-memory
This crate is loosely based on read-process-memory
by luser, but has been extended to be able to write to process memory as well.
The current supported platforms are:
- Windows
- OSX
- Linux
Examples
use ;
// We have a variable with some value
let x = 4_u32;
println!;
// We need to make sure that we get a handle to a process, in this case, ourselves
let handle = .try_into_process_handle.unwrap;
// We make a `DataMember` that has an offset referring to its location in memory
let member = new_offset;
// The memory refered to is now the same
println!;
assert_eq!;
// The value of the member is the same as the variable
println!;
assert_eq!;
// We can write to and modify the value of the variable using the member
member.write.unwrap;
println!;
assert_eq!;
use ;
// We have a variable with some value
let x = 4_u32;
println!;
// We make a `LocalMember` that has an offset referring to its location in memory
let member = new_offset;
// The memory refered to is now the same
println!;
assert_eq!;
// The value of the member is the same as the variable
println!;
assert_eq!;
// We can write to and modify the value of the variable using the member
member.write.unwrap;
println!;
assert_eq!;