Binary patched by using various algorithm :

patch

bsdiff:

To install : sudo apt-get install bsdiff
Create Patch : bsdiff old_version_file new_version_file delta_file.bsdiff
Apply Patch : bspatch old_version_fil newfile delta_file.bsdiff
Example by using text file :
bsdiff dog.txt hen.txt hd.diff
bspatch hen.txt dog1.txt hd.diff

xdelta:

To install : sudo apt-get install xdelta3
Create Patch : xdelta3 -9 -S lzma -e -f -s old_version_file new_version_file xdelta_file
Apply Patch : xdelta3 -dfs old_version_file xdelta_file newfile
Example by using text file :
xdelta3 -9 -S lzma -e -f -s dog.txt hen.txt hd.delta
xdelta3 -dfs dog.txt hd.delta dog.txt

How to verify the content after patch using kdiff3:
hexdump old_version_file > myfile1.hex
hexdump new_version_file delta > myfile2.hex
kdiff3 myfile1.hex myfile2.hex : Here we can see the difference
hexdump newfile > myfile3.hex
kdiff3 myfile2.hex myfile2.hex : Here we can see no difference

 

Note: Tried using Ubuntu OS.

Advertisements

1 Comment

  1. will try this bro thanks

    On Thu, Dec 15, 2016 at 11:34 AM, gurudath bn Ruby On Rails wrote:

    > gurudathbn posted: “bsdiff: To install : sudo apt-get install bsdiff > Create Patch : bsdiff old_version_file new_version_file delta_file.bsdiff > Apply Patch : bspatch old_version_fil newfile delta_file.bsdiff Example by > using text file : bsdiff dog.txt hen.txt hd.diff bspatc” >

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s