I am unable to repack it to a bin file after I'm done with it
You aren't packing the output. You are sprintfing it to hex; which is just a text representation.
If you want the output (re)packed, use pack. (And don't forget to binmod your output file.)
In reply to Re: pack/unpack binary file
by BrowserUk
in thread pack/unpack binary file
by mark4444az
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |