RUSTBIN
This is a learning project to understand Rust language and create fairly complex file parsers.
Structure
Rustbin is created as a library which shall add more file parsers.
Every value which is part of a header is wrapped in HeaderField
struct. HeaderField
struct provides 3 values:
- value: The value of the field read from file
- offset: Offset of the the value in file. Structs have same offset as the offset of their first member
- rva: Relative Virtual Address
- Applicable only to PE file format
- Shall be same as offset wherever not applicable
Supported Now
PE (WIP)
Usage:
Note: This example works only if built on Windows OS.
extern crate rustbin;
extern crate serde_json;
use ;
use ;
Parsing:
- DOS Header
- File Header
- Optional Header x64
- Optional Header x86
- Data Directories
- Section Headers
- Imports
- Exports
- Relocations
- Resources
Serialize (Minimal format)
- DOS Header
- File Header
- Optional Header x64
- Optional Header x86
- Data Directories
- Section Headers
- Imports
- Exports
- Relocations
- Resources