This is a small utility program which searches a file for a pattern of bytes. It was created for searching for non-ASCII strings in ROMs.
The search works by forming a numerical difference pattern based on the integer values of the string characters relative to the first character in the string. Byte sequences in the file are then compared to this pattern. The address of each matching byte sequence is returned.
g++ bytefinder.cpp -o bytefinder
bytefinder <file> <string>
The wildcard character *
is supported and may be escaped as \*
. Search strings must contain at least two non-wildcard characters.
This program is licensed under the GNU General Public License, version 3. See COPYING for details.