Crates.io | binfarce |
lib.rs | binfarce |
version | 0.2.1 |
source | src |
created_at | 2020-08-11 14:33:14.004802 |
updated_at | 2021-07-03 13:43:08.680656 |
description | Extremely minimal parser for ELF, Mach-O, PE and ar. |
homepage | |
repository | https://github.com/Shnatsel/binfarce |
max_upload_size | |
id | 275369 |
size | 95,917 |
Extremely minimal parser for ELF/PE/Mach-o/ar.
This crate is used mostly for sharing code between cargo-bloat
and auditable-extract
crates. It implements just enough features for those tools to work. If you're looking for a fully-featured parser, see goblin
.
Goals:
Non-goals:
Header parsing and section extraction are used by both tools. They are zero-allocation and hardened against untrusted inputs.
#[forbid(unsafe_code)]
ensures absence of code execution vulnerabilities. Absence of heap allocations ensures that it can't exhaust RAM. Static analysis via opt-in Clippy lints and fuzzing are used to ensure absence of panics.
Symbol extraction is used by cargo-bloat
only. It allocates unbounded amounts of memory on the heap and may panic given an untrusted input.
PRs with functionality required for your own tool are welcome as long as they adhere to the above goals and keep existing tools working. However, you should consider using the full-featured goblin
crate instead.
This project was briefly known as "kuduk".