Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 771 Bytes

readme.md

File metadata and controls

44 lines (29 loc) · 771 Bytes

bingrep-regex

A grep-like tool for searching binary files with regex

Warning

Warning: Usage is unstable and will change

Build

cargo build --release

Usage

bgr --help

Search

Prints each match start address on new line

Regex

# find location of species in Pokemon Crystal
bgr '\x01.{31}\x02.{31}\x03.{31}\x04.{31}\x05.{31}\x06' pokecrystal.gbc

Context

More details about matches can be displayed with the --context or -c option starting with value 0.

bgr -c 0 '\x01.{31}\x02.{31}\x03.{31}\x04.{31}\x05.{31}\x06' pokecrystal.gbc

Experimental binary syntax with partial regex support

# find location of species in Pokemon Crystal
bgr -b '01 2d [31|32].2d' pokecrystal.gbc