Archive: hexadecimal delete and insert


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.


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


Thanks n_baua, I think that system plugin can help me too, but I have no idea how to do it in this case.


Why not use VPatch? Is the file contents not constant?


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.


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.


Thanks, I will try it.