Patching EXEs
- Posted by "Bruce M. Axtens" <lpcd at CYBER.NET.PK> Jan 30, 2001
- 499 views
--B_3063705641_457461 George Henry said a while back something about patching EXEs. Attached are two programs which achieve this. GENPATCH.EX takes two files, the old one and the new one and produces a patch file >GENPATCH old.exe new.exe patch.dat The patch file was produced using print.e so isn't space-saving at all. Perhaps one could come up with a binary form, e.g. OFFSET 1 x DWORD NUMBER_OF_BYTES 1 x WORD BYTES NUMBER_OF_BYTES x BYTE PATCHIT.EX takes the patch data, the old file and produces a new file >PATCHIT patch.dat old.exe new.exe Initial tests work ok but, of course, if it trashes your life's work, sad. The code is very raw and took about an hour and a half to figure out. I'd really appreciate some constructive criticism -- how I could have done it better, faster, tighter etc. Bruce M. Axtens -- "Who of us is mature enough for offspring before the offspring themselves arrive? The value of marriage is not that adults produce children but that children produce adults" -- Peter de Vries ____________________________________________________________ T O P I C A -- Learn More. Surf Less. Newsletters, Tips and Discussions on Topics You Choose. http://www.topica.com/partner/tag01 --B_3063705641_457461 x-mac-creator="646F7361"; x-mac-type="54455854"