osxmem 0.1.4

A macOS library for reading and writing process memory using the Mach kernel APIs.
Documentation

osxmem

crates.io docs.rs license

Read and write process memory on macOS using the Mach kernel APIs.

Requirements

  • macOS only
  • Must be ran with root

Usage

use osxmem::process::Process;
use osxmem::memory::{read_mem, write_mem};

// attach by name or PID
let process = Process::open_by_name("Game").unwrap();
// or: Process::open(1234).unwrap();

let address: usize = 0x7060E5800;

let health: f32 = read_mem::<f32>(&process, address).unwrap();
println!("health: {}", health);

write_mem::<f32>(&process, address, 200.0).unwrap();

read_mem and write_mem are generic over any Copy type, so u8, i32, f64, structs, etc. all work the same way.

License

MIT