Reputation: 129
I have a tool in PHP that I made to automate the process of generating some hex, which I then manually place in a file using a hex editor.
I have 1 byte which goes to offset 0x345, and a much larger section of varying length which goes to 0x560. I use Paste > Write so that the hex I generated replaces what is in it's way rather then increase the size of the file.
Is there a way I can automate this with fopen();
so that I can skip the manual pasting?
Upvotes: 0
Views: 191
Reputation: 1471
You can use these functions: fopen
to open file, fseek
to desired positions and fwrite
your data.
Upvotes: 1