binsig 0.1.0

Provides an easy way to deal with searching for byte patterns using partial byte signatures
Documentation
  • Coverage
  • 0%
    0 out of 21 items documented0 out of 11 items with examples
  • Size
  • Source code size: 14.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.25 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • emesare/binsig
    1 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • emesare

About binsig

This crate provides an easy way to deal with searching for byte patterns using partial byte signatures.

Usage

use binsig::Pattern;

let haystack = &[
    0x11, 0x22, 0x33, 0x0, 0x0, 0x11, 0x22, 0x33, 0x11, 0x0, 0x33,
];
let pattern = Pattern::from_ida("11 ?? 33").expect("Should be valid signature");
for (pos, view) in pattern.scan(haystack) {
    println!("found needle at {} with bytes {:?}!", pos, view);
}

Output

found needle at 0 with bytes [17, 34, 51]!
found needle at 5 with bytes [17, 34, 51]!
found needle at 8 with bytes [17, 0, 51]!