https://github.com/bigbuildbench/casualx_pelite

https://github.com/bigbuildbench/casualx_pelite

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: BigBuildBench
  • License: mit
  • Language: Rust
  • Default Branch: master
  • Size: 2.22 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

readme.md

PeLite

MIT License crates.io docs.rs Changelog Build status Build Status

Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.

Design

The purpose of this library is inspecting PE binaries (whether on disk or already loaded in memory).

A trade-off was made to not unify the 32-bit (PE32) and 64-bit (PE32+) formats for two reasons:

  • There are small but incompatible differences, which would add overhead by requiring constant matching even if at source code level the match arms look identical.

  • Most of the time you know (at build time) what format you're working with anyway.

This makes it rather awkward to work with both formats together transparently.

Note that while the correct name is PE32+, the name PE64 is used as it is a valid identifier; they are otherwise synonymous.

Tools

Included are bins showing some uses for the library, try them out on the demos!

Library

This library is available on crates.io.

Documentation can be found on docs.rs.

In your Cargo.toml, put

[dependencies] pelite = "0.8"

Examples

Try this example: cargo run --example readme.

```rust use pelite::FileMap; use pelite::pe64::{Pe, PeFile};

fn main() { // Load the desired file into memory let filemap = FileMap::open("demo/Demo64.dll").unwrap(); // Process the image file dlldeps(filemap.asref()).unwrap(); }

fn dlldeps(image: &[u8]) -> pelite::Result<()> { // Interpret the bytes as a PE32+ executable let file = PeFile::frombytes(image)?;

// Let's read the DLL dependencies
let imports = file.imports()?;
for desc in imports {
    // Get the DLL name being imported from
    let dll_name = desc.dll_name()?;
    // Get the number of imports for this dll
    let iat = desc.iat()?;
    println!("imported {} functions from {}", iat.len(), dll_name);
}

Ok(())

} ```

License

Licensed under MIT License, see license.txt.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

Owner

  • Name: BigBuildBench
  • Login: BigBuildBench
  • Kind: organization

abbr. B3, benchmarking the repo-level understanding capability of your LLMs by reconstructing project build-file.

GitHub Events

Total
  • Create event: 4
Last Year
  • Create event: 4

Dependencies

.github/workflows/ci.yml actions
  • actions-rs/cargo v1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
Cargo.toml cargo
  • format_xml 0.2 development
  • lde 0.3 development
  • rand 0.5 development
src/proc-macros/Cargo.toml cargo
wasm/Cargo.toml cargo