process_read_write

Function get_proc_by_id

Source
pub fn get_proc_by_id(id: i32) -> Pid
Expand description

get_proc_by_id will take a process id as i32 and get the process with that id

ยงExamples

fn main() {
     let pid:i32 = 1234; // id of process 
     let pid = process_read_write::get_proc_by_id(pid);
}
Examples found in repository?
examples/read_example.rs (line 8)
3
4
5
6
7
8
9
10
11
12
fn main(){
    let pid:i32 = 1234; // id of app
    let addr:usize = 0x70eb856006c0; // address of value to read 

    //let pid = get_proc_by_name("SomeRandomGame");
    let pid = process_read_write::get_proc_by_id(pid);

    let health = process_read_write::read_addr(pid,addr,4);
    println!("READING MEMORY: {:?}",health);
}
More examples
Hide additional examples
examples/write_example.rs (line 9)
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    let pid:i32 = 1234; // id of app
    let addr:usize = 0x70eb856006c0; // address of value to change
    let new_value = [0xff,0xff,0xff,0x7f]; // the value the insert into the new address

    //let pid = process_read_write::get_proc_by_name("SomeRandomGame");
    let pid = process_read_write::get_proc_by_id(pid);

    process_read_write::write_addr(pid,addr,&new_value);

}