bsdiff
and bspatch
are a pair of tools for building and applying patches to binary files. Originally created by Colin Percival.
This repo is a somewhat maintained forks of bsdiff and bspatch utilities (with a few pre-built binaries for less mainstream platforms).
Original author: Colin Percival.
Original paper: Naïve Differences of Executable Code.
Author's website: http://www.daemonology.net/bsdiff/.
LICENSE: BSD 2-clause
Repo maintainer: Sayem Shafayet
Linux: Kernel 2.6.23 or above is required.
MacOS: Build error regarding u_char
/<uchar.h>
not supported.
BSD: Not tested, but should work as expected as it was the original target.
Windows: Not tested yet.
You will need a C compiler. Following is an example with gcc
for Amazon Linux 2.
sudo yum groupinstall "Development Tools"
Then simply run in the repo's root directory.
make
bsdiff oldfile newfile patchfile
This will compare newfile
with oldfile
and store the patch in patchfile
.
patchfile
wll be overwritten if already exists.
bspatch oldfile newfile patchfile
This will apply patch in patchfile
on top of oldfile
and will create newfile
.
newfile
wll be overwritten if already exists.