Crates.io | grep_bin |
lib.rs | grep_bin |
version | 2.0.0 |
source | src |
created_at | 2021-08-03 23:07:15.381017 |
updated_at | 2022-03-02 19:42:02.350004 |
description | Searches recursively a directory or multiple files for a sequence of bytes or ASCII string. |
homepage | https://github.com/LaBatata101/grep_bin |
repository | https://github.com/LaBatata101/grep_bin |
max_upload_size | |
id | 431245 |
size | 25,056 |
grep_bin
can search recursively a directory or multiple files for a sequence of bytes or ascii string.
$ grep_bin fffe test.bin
$ grep_bin FFFE ~/Downloads
$ grep_bin -f mp3 FFfe0000 ~/Downloads
$ grep_bin '"Hello World"' test.bin
Search for an ASCII string with quotes included: $ grep_bin '"This is a \"quote\""' test.bin
$ grep_bin fFFe test1.bin test2.bin
$ grep_bin -c 32 "information" README.md
Output:
README.md 00000320: 73 20 68 65 6C 70 20 69 6E 66 6F 72 6D 61 74 69 6F 6E 0A 0A 20 20 20 20 2D 56 2C 20 2D 2D 76 65 |s help information.. -V, --ve| 00000360: 73 69 6F 6E 20 69 6E 66 6F 72 6D 61 74 69 6F 6E 0A 0A 0A 4F 50 54 49 4F 4E 53 3A 0A 20 20 20 20 |sion information...OPTIONS:. |
$ grep_bin -h
grep_bin 2.0.0
LaBatata101 <labatata101@linuxmail.org>
Searches recursively a directory or multiple files for a sequence of bytes or ASCII string.
USAGE:
grep_bin [OPTIONS] <PATTERN> <FILE>...
ARGS:
<PATTERN> Ascii strings should be passed inside quotes like so '"This is a string"'
Escaping quotes '"This is a \"quoted string\""'
All of these byte sequence are valid: f9b4ca, F9B4CA and f9B4Ca
<FILE>... The filepath
OPTIONS:
-c <context_bytes_size> Defines the number of bytes that will be printed in each line.
[default: 16]
-f <filetype> Filter the search by the file extensions.
Examples of input: jpg, mp3, exe
-h, --help Print help information
-o, --print-offset Prints only the offsets of the match.
-p, --print-only Prints only the filename that contais the match.
-s, --skip-bytes <n> Skip n bytes before searching. [default: 0]
-V, --version Print version information
$ git clone https://github.com/LaBatata101/grep_bin
$ cd grep_bin/
$ cargo build --release
The final binary will be in target/release/
cargo install grep_bin