Crate pe_parser

source ·
Expand description

§pe-parser: Blazing-fast, safe, Portable Executable parsing.

pe-parser provides a safe Rust-y way to parse Portable Executables quickly.

  • Everything parsed to native documented structs
  • Secondary parsing functions raw data into native Rust types
  • Every section can be printed with ease

§Examples

use pe_parser::pe::parse_portable_executable;
 
// Read the binary from a file
let binary = fs::read(path_to_pe)?;
  
// Parse it!
let pe = parse_portable_executable(binary.as_slice())?;
// Print all that technical goodness
print!("{}", pe);

Modules§

  • COFF file header definitions and helper functions
  • Optional header definitions and helper functions
  • Monolith struct containing all the information you will ever need
  • COFF relocation definitions and helper functions
  • Section header definitions and helper functions

Enums§

  • Error parsing a PE binary.