(in general - a patcher with simple byte replacing at fix address)
the most patchers are search&replace in all combinations.
but that wasnt wanted, moreover they need a source/target file.
(vpatch wasnt uselful same way)
so i found aPatch
this patcher works with a script which can be written from nsis.
easy way:
start(word can be text or hexstrings)
open <file>
search <old_word>
write <new_word>
quit
end
(use fileopen/filewrite/filewritebyte0D0A/fileclose)
the the script must be compiled
"apatch.exe script.aps"
(apatch.exe need to be included in nsis-package /pluginsdir)
(File /oname=$PLUGINSDIR\apatch.exe "apatch.exe")
it generates a simple patch.exe.
unfortunaltely it has a GUI with a textfiled and two
buttons: "Patch" and "Quit"
but is is the only me known one:
1) freeware
2) script-based
3) very easy (hand full of commands)
In my case easy as simple
- in nsis: get word, get file (io)
- write apatch-script
- compile with apatch
- start patch (execwait)
- remove all temp-files
- done
part of my script:
start(open file, check filesize, goto offset, write text/hexstrings, quit)
open <file>
size 1227776
onerror goto error
backup on
offset 933125
write <new_text>
print "Success"
goto done
error:
print "Failed"
done:
quit
end
Use NSIS to write the filename, old_text, new_text, custom
errormessages aso.
aPatch is recognized from PEid, so it contains specific
bytes as a exe-packer - and "patch.exe" is packed with this
method - so you cant disassemble it to get rid of the GUI.
feel free to post other soulutions this way - if you have
one without GUI - write it here pls.
btw, i tried "fileseek #", but then i got 933125 00-bytes
and then my text. so nsis can only work on textfiles !?