I recently had to extract data from a binary file and I was only provided with two hexadecimal offsets to obtain it with. Simply speaking, I had to pull out some data from an .ISO file (without mounting it…) and this “arbitrary data” would be a new file itself which could be read in other applications properly. Please make sure to backup anything you are throwing into the hex editor as even the slightest change could render an binary file completely unusable in it’s intended applications. This is critical for executables as they will likely break if you make a change.
- Download and install a “hex editor”. I like using Hex Fiend (Mac) as it just small and simple but wxHexEditor is also an attractive one for having lots of features and working across Mac, Windows and Linux. Both are free, open source and appear to be still maintained. The “hex editor” will allow us to manipulate binary data: look inside of a binary (non-ASCII) file and even make changes to it!
- Load up your file in your Hex Editor. I will use the example of “humansportsfestival02.iso” and the offsets that I told to extract are 0x1e1000 to 0x221000
- Using your hex editor, please visit the SECOND offset. In my case, this is 0x221000. I will go right ahead and delete all data AFTER this position. You will do that by selecting the contents of the file (like you would with a Word document) and deleting them.
- Now visit the FIRST offset value, in my case that is 0x1e1000 and select the contents of the file BEFORE this the same way by selecting the contents with your mouse or keyboard and then deleting them.
- Finally save your remaining data to a NEW file name (I chose to name mine: “Final Match Tennis Ladies.pce”) and you done!
The example that I am using is of course very specific but you can apply this to any of your own needs.