#memory #pattern #reverse-engineering #game-hacking

lightningscanner

A lightning-fast memory pattern scanner, capable of scanning gigabytes of data per second

3 stable releases

1.0.2 Nov 12, 2023
1.0.1 Nov 11, 2023

#2301 in Algorithms

39 downloads per month
Used in aob_common

MIT license

22KB
313 lines

LightningScanner

A lightning-fast memory pattern scanner, capable of scanning gigabytes of data per second.

Installation

cargo add lightningscanner

Examples

Here's an example of how to find an IDA-style memory pattern inside of a binary.


use lightningscanner::Scanner;

fn main() {
    let binary = [0xab, 0xec, 0x48, 0x89, 0x5c, 0x24, 0xee, 0x48, 0x89, 0x6c];

    let scanner = Scanner::new("48 89 5c 24 ?? 48 89 6c");
    let result = scanner.find(None, &binary);

    println!("{:?}", result);
}


lib.rs:

LightningScanner

A lightning-fast memory pattern scanner, capable of scanning gigabytes of data per second.

Example

use lightningscanner::Scanner;

let binary = [0xab, 0xec, 0x48, 0x89, 0x5c, 0x24, 0xee, 0x48, 0x89, 0x6c];

let scanner = Scanner::new("48 89 5c 24 ?? 48 89 6c");
let result = unsafe { scanner.find(None, binary.as_ptr(), binary.len()) };

println!("{:?}", result);

Dependencies