memreader

Crates.iomemreader
lib.rsmemreader
version0.1.1
sourcesrc
created_at2017-02-27 00:36:56.05079
updated_at2017-02-27 00:44:33.564641
descriptionA library crate designed to read memory from other processes
homepage
repositoryhttps://github.com/jkcclemens/memreader
max_upload_size
id8706
size27,219
Anna (anna-is-cute)

documentation

https://docs.rs/crate/memreader

README

memreader

memreader is a library written in Rust, designed to read memory from other processes.

extern crate memreader;

use memreader::{MemReader, ProvidesSlices};

use std::env::args;

fn main() {
  let args: Vec<String> = args().skip(1).collect();
  if args.len() < 3 {
    return;
  }
  let pid: u32 = args[0].parse().unwrap();
  let addr: usize = args[1].parse().unwrap();
  let n: usize = args[2].parse().unwrap();

  let reader = MemReader::new(pid).unwrap();

  let mut buf = vec![0; n];

  reader.address_slice_len(addr, n).read_exact(&mut buf).unwrap();

  println!("{} bytes at location {} in process {}'s memory: {:?}", n, addr, pid, buf);
}
Commit count: 30

cargo fmt