peview
A minimal and fast zero-copy parser for the PE32+ file format.
Goal
This project aims to offer a more light weight and easier to use alternative to fully featured binary parsing libraries when it comes to parsing the PE32+ file format. It does so by:
- Taking a zero-copy approach. Everything is a reference to the original data
- Parsing on demand. Basic parsing is done at the beginning, the rest is opt-in
- Not focusing on endianness. The parsed buffer is assumed to be in LE
- Strong validation of native structures
Usage
Example of printing the RVA's and names of imported symbols
// Read target file into buffer
let mut buf = Vecnew;
open?.read_to_end?;
// Initialize the parser, does basic validation
let pe = parse?;
// Iterate over modules in the import table
for m in pe.imports?
Installation
Add the following line to your Cargo.toml file:
[]
# ...
= "0.1.0"