Skip to main content

Binary files search utility

Project description

hrep

grep for binary files.

Examples

TODO add some...

Usage

usage: hrep [-h] [-x HEX] [-a ASCII] [-e REGEX] [-r] [--chunk-size CHUNK_SIZE]
            [-d] [-X] [-w DUMP_WIDTH] [-s] [-A AFTER] [-B BEFORE] [-C CONTEXT]
            [-I INCLUDE] [-E EXCLUDE] [-L] [-l] [-c] [-m NUM] [-p]
            [--no-color] [--monochrome]
            [HEX] [filename [filename ...]]

Search for binary sequences in files

positional arguments:
  HEX                   Hex encoded binary sequence to search for
  filename              List of files to search in

optional arguments:
  -h, --help            show this help message and exit
  -x HEX, --hex HEX     Search for a hexadecimal pattern('?' matches a single
                        nibble, '*' matches any number of bytes)
  -a ASCII, --ascii ASCII
                        Search for an ASCII string
  -e REGEX, --regex REGEX
                        Search for a regular expression
  -r, --recursive       Recursively search in directories
  --chunk-size CHUNK_SIZE
                        Override default buffer size
  -d, --decimal-offset  Output decimal file offsets (by default prints hex)
  -X, --no-hexdump      Disable hex dump
  -w DUMP_WIDTH, --dump-width DUMP_WIDTH
                        Width of hex dump
  -s, --summary         Print summary at the end
  -A AFTER, --after AFTER
                        Number of additional bytes to display after match
  -B BEFORE, --before BEFORE
                        Number of additional bytes to display before match
  -C CONTEXT, --context CONTEXT
                        Number of additional bytes to display before and after
                        match
  -I INCLUDE, --include INCLUDE
                        Filename pattern to include
  -E EXCLUDE, --exclude EXCLUDE
                        Filename pattern to exclude
  -L, --files-without-match
                        Only output unmatching filenames
  -l, --files-with-match
                        Only output matching filenames
  -c, --count           Only output number of matches for each input file
  -m NUM, --max-count NUM
                        Stop searching after NUM matches.
  -p, --progress        Enable progress display
  --no-color            Disable color output
  --monochrome          Use monochrome color scheme

Unless one of --files-with(out)-match, --count is specified, each output line
corresponds to a match in the format: `<filename>:<offset>:<match>'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

hrep-0.4.0a0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file hrep-0.4.0a0-py3-none-any.whl.

File metadata

  • Download URL: hrep-0.4.0a0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

File hashes

Hashes for hrep-0.4.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 078f96e18b04e03c35a8f71eda6059ef93a04642bcb63b0e47272e3aabd26d1a
MD5 769e54e7df70ce1fdc0ae21371413dea
BLAKE2b-256 c18ee122f7eba64e3e37e50a458cf7100f25b4048c9720f00c25c5f908588977

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page