#process-memory #pid #mac #editing #base #finding #address

macext

Crate for editing mac process memory and finding pid, base address, etc

12 releases

0.2.1 Mar 7, 2024
0.2.0 Mar 7, 2024
0.1.9 Feb 27, 2024
0.1.4 Jan 19, 2024

#44 in macOS and iOS APIs

Download history 6/week @ 2024-01-16 64/week @ 2024-02-20 639/week @ 2024-02-27 302/week @ 2024-03-05 95/week @ 2024-03-12 14/week @ 2024-03-26 60/week @ 2024-04-02

74 downloads per month

MIT license

13KB
216 lines

github crates.io downloads docs.rs build status

MacExt

Mac memory management made simple through rust

Usage

use macext::*;

fn main() {
    let pid = get_pid("your_program");
    let base_address = get_base_address(pid);
    // Using fullprep:
    // let (pid, base_address) = fullprep("your_program")
    let offsets = vec![0x1d9ef0, 0x0, 0x418]; // Example offsets
    let mut value: u64 = 0; // To store the value found at address
    let final_value: u64 = 9999; // The value to write to address

    // Usage of read and patch
    value = read(&offsets, base_address, pid); // Returns a u64
    patch(&offsets, base_address, pid, final_value); // Must patch in a u64
}

Running

To access process memory, you must run the program as root.

sudo cargo run

Installation

Add the following to your Cargo.toml file:

[dependencies]
macext = "0.2.0"

Or run the following command:

cargo add macext

Dependencies

~0.8–27MB
~360K SLoC