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?
You can use these functions:
fopento open file,fseekto desired positions andfwriteyour data.