image
Documentation https://docs.rs/goblin/ changelog Usage Goblin requires rustc 1.31.1. Add to your Cargo.toml [dependencies] goblin = "0.1" Features awesome crate name zero-copy, cross-platform, endian-aware, ELF64/32 implementation – wow! zero-copy, cross-platform, endian-aware, 32/64 bit Mach-o parser – zoiks! PE 32/64-bit parser – bing! a Unix _ and _ BSD style archive parser (latter courtesy of @willglynn ) – huzzah! many cfg options – it will make your head spin, and make you angry when reading the source! fuzzed – "I am happy to report that goblin withstood 100 million fuzzing runs, 1 million runs each for seed 1~100." – @sanxiyn tests libgoblin aims to be your one-stop shop for binary parsing, loading, and analysis. Use-cases Goblin primarily supports the following important use cases: Core, std-free #[repr(C)] structs, tiny compile time, 32/64 (or both) at your leisure. Type punning. Define a function once on a type, but have it work on 32 or 64-bit variants – without really changing anything, and no macros! See examples/automagic.rs for a basic example. std mode. This throws in read and write impls via Pread and Pwrite , reading from file, convenience allocations, extra methods, etc. This is for clients who can allocate and want to read binaries off disk. Endian_fd . A truly terrible name  this is for binary analysis like in panopticon or falcon which needs to read binaries of foreign…