/bgrep

Binary Grep

Primary LanguageC

I'm terribly annoyed by the fact that grep(1) cannot look for binary
strings. I'm even more annoyed by the fact that a simple search for 
"binary grep" doesn't yield a tool which could do that. So I wrote one.

Feel free to modify, branch, fork, improve. Re-licenses as BSD.

To install:

curl -L 'https://github.com/tmbinc/bgrep/raw/master/bgrep.c' | gcc -O2 -x c -o $HOME/.local/bin/bgrep -

usage:

bgrep [-B bytes] [-A bytes] [-C bytes] <hex> [<path> [...]]

-B: bytes_before
-A: bytes_after
-C: bytes_before and bytes_after