Module pelite::pe32::scanner [−][src]
Pattern Scanner.
See the pattern
module for more information about patterns.
Examples
use pelite::pe64::{Pe, PeFile}; use pelite::pattern as pat; fn example(file: PeFile<'_>, pat: &[pat::Atom]) { // Gets the pattern scanner interface let scanner = file.scanner(); // Capture references in the pattern in a save array let mut save = [0; 8]; // Finds a singular code match if scanner.finds_code(pat, &mut save) { println!("{:x?}", save); } // Finds all the code matches for the pattern let mut matches = scanner.matches_code(pat); while matches.next(&mut save) { println!("{:x?}", save); } }
Structs
Matches |
An iterator over the matches of a pattern. |
Scanner |
Pattern scanner. |