Function write_addr

Source
pub fn write_addr(pid: Pid, addr: usize, data: &[u8])
Expand description

write_addr is used to write a buffer of n bytes into the memory of process pid at addr

ยงBackend

this function invokes the process_vm_writev syscall, enabling direct memory writing into a specified address in the target process.

Examples found in repository?
examples/write_example.rs (line 11)
3fn main() {
4    let pid:i32 = 1234; // id of app
5    let addr:usize = 0x70eb856006c0; // address of value to change
6    let new_value = [0xff,0xff,0xff,0x7f]; // the value the insert into the new address
7
8    //let pid = process_read_write::get_proc_by_name("SomeRandomGame");
9    let pid = process_read_write::get_proc_by_id(pid);
10
11    process_read_write::write_addr(pid,addr,&new_value);
12
13}