binpatcher is a command-line tool for searching and replacing binary blocks in files.
binpatcher -i <input_file> -s <search_block_file> -r <replace_block_file> [-o <output_file>]-h: Display this help message and exit.-i <input_file>: Path to the input file.-s <search_block_file>: Path to the binary file containing the block to search for.-r <replace_block_file>: Path to the binary file containing the block to replace with.-o <output_file>: Path to the output file. If not specified, the input file will be overwritten.
To search for a specific binary block in input.bin and replace it with another block from replace.bin, saving the result to output.bin, use:
binpatcher -i input.bin -o output.bin -s search.bin -r replace.binTo search for a specific binary block in input.bin and replace it with another block from replace.bin, overwriting the input file, use:
binpatcher -i input.bin -s search.bin -r replace.bincmake(version 3.10 or higher)gcc(GNU Compiler Collection)
To compile and install binpatcher, follow these steps:
-
Create a build directory:
mkdir build cd build -
Configure the project with CMake:
cmake ..
-
Compile the project:
make
-
Install the executable:
sudo make install
To uninstall:
sudo xargs rm < install_manifest.txtThis software is provided under the terms of the MIT License. You are free to use, modify, and distribute this software, subject to the conditions and limitations of the MIT License. For more details, please see the LICENSE file included with this software.
- Report bugs to: splintergu@gmail.com
- Home page: binpatcher on GitHub