binfind − search for a byte sequence in binary files |
binfind OPTIONS [ FILE... ] |
binfind searches the named files (or standard input if no files are named, or the file name − is given) for a byte sequence (called the ’pattern’) specified in OPTIONS. binfind uses the Boyer−Moore algorithm and is able to search large files without using a lot of memory. (Note that the pattern, however, is placed in core memory, so do not expect good performance with huge patterns.) For each occurence of the pattern binfind prints a line containing the offset of the occurence in the searched file. If more than one file was specified binfind prints the filename and a colon before the offset. |
binfind returns 0 if the pattern was found, 1 otherwise. If an error occurs binfind returns 2. |
−a ASCII |
Append an ASCII string to the pattern. |
−x HEX |
Append hexadecimal values to the pattern. HEX consists of one or more hexadecimal numbers separated by spaces, TABs or commas. Each value must have an even number of digits and may start with ’0x’. Values longer than a byte are converted using the current endianness setting. |
−f FILE |
Append contents of FILE to the pattern. If FILE is ’−’ stdin is read. |
−o, −−offset−radix RADIX |
Set radix for offset output. RADIX may be ’d’ for decimal or ’x’ for hexadecimal. The default is decimal. |
−L, −−little−endian |
Interpret subsequent −x options as little−endian. |
−B, −−big−endian |
Interpret subsequent −x options as big−endian. This is the default. |
−h, −−no−filename |
Do not print filenames (and colons). |
−H, −−with−filename |
Print filenames, even if only one file is searched. |
−−help |
Print usage summary and exit. |
−−version |
Print binfind version and exit. |
Please report any bugs you find to the author (see below). |
Edwin Steiner <edwin.steiner@gmx.net> Please include the word ’binfind’ in the subject line when contacting me. |