A quick little script for dumping a binary file into a view similar to a hex editor.Why not just *use* a hex editor, you say? Well, this allows me to carve up and document a binary file in word (or notepad+) as i try to parse its format from some limited documentation. Anyway, here it is: bytes = File.read("some-binary-file") while bytes line = bytes[0,16] bytes = bytes[16,bytes.length] d='' line.each_byte{|i| d+="%02X "%i} d+=" "*(16-line.length) d+=' ' line.each_byte{|i| d+=(0x20

Thanks for reading! And if you want to get in touch, I'd love to hear from you: chris.hulbert at gmail.

Chris Hulbert

(Comp Sci, Hons - UTS)

iOS Developer in Sydney.

I have worked at places such as Google, Cochlear, News Corp, Fox Sports, NineMSN, FetchTV, Woolworths, and Westpac, among others. If you're looking for a good iOS developer, drop me a line!

Get in touch:
[email protected]
github.com/chrishulbert
linkedin
my resume



 Subscribe via RSS