Skip to content

A CLI utility to search arbitrary bytes in files, by leveraging the power of regex crate in Rust.

License

Notifications You must be signed in to change notification settings

yestyle/hexsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexsearch

A CLI utility to search arbitrary bytes in files, by leveraging the power of regex crate in Rust.

Install

This crate has been published onto crates.io, so you can use the following command to install hexsearch executable to ~/.cargo/bin directory:

cargo install hexsearch

Usage

hexsearch [OPTIONS] <bytes> <files>

The bytes to be searched can be in one of two formats:

  • individual bytes in hexadecimal separated by space: 1f 8b 08
  • hexadecimal value in one word prefixed with 0x: 0x1f8b08. This format will respect the --endian argument and it's big-endian by default

Multiple files can be searched in one go by passing in paths separated by space.

The search result will be printed in a style similar to hexdump(1) and you can set the line width by --width argument (default width: 16).

You can also print some extra lines before and after the search result by setting --context argument.

See hexsearch --help for full usage.

License

This project is licensed under MIT license.

About

A CLI utility to search arbitrary bytes in files, by leveraging the power of regex crate in Rust.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages