zeeh3
15th November 2006 10:17 UTC
hexadecimal delete and insert
I wonder how to delete data in the middle of a binary or unicode file and insert other data in that place. For example: 0A 00 00 00 44 4F 53 57 49 4E 2E 58 than remove 44 4F 53 57 and insert 31 08 44 E7 F5 so result would be 0A 00 00 00 31 08 44 E7 F5 49 4E 2E 58. Thanks.
n_baua
16th November 2006 13:35 UTC
Hello,
I guess you will have to include a command line hex editor with setup with the installation.
Extract that to temp dir and
use the find replace ...
I am not sure weather this will help you.
However this is the place where you can find the nice hex editor which is meant for find replace in HEX
http://www.funduc.com/fshexedit.htm
zeeh3
16th November 2006 14:24 UTC
Thanks n_baua, I think that system plugin can help me too, but I have no idea how to do it in this case.
kichik
16th November 2006 20:37 UTC
Why not use VPatch? Is the file contents not constant?
zeeh3
17th November 2006 08:28 UTC
Yes, kichik. The files´ contents are not constant. They share a common structure, but the text is in different language (and size) for each file.
kichik
17th November 2006 12:12 UTC
Then you can use FileReadByte to read it byte by byte until you get to the right location and then change what you need to change using FileWriteByte. You'll have to open a second file to which you'll copy the bytes, your change and the rest of the bytes. Then you'll need to copy over the new file.
zeeh3
17th November 2006 18:53 UTC
Thanks, I will try it.