Decompiling a data file
May 27, 2006 10:25 AM   Subscribe

I am trying to reverse-engineer a data file comprised of various integers, strings, floats, and so on. Is there a good Windows tool that will help me group the records and start picking the fields apart? I'd rather not try this in a plain vanilla hex editor.
posted by rolypolyman to Computers & Internet (4 answers total)
I have just read the answer submitted while I was writing this. Great minds think alike! I had written:

I would use the quick and dirty method which lets you see what you are doing -- import the data into an Excel spreadsheet. Just pick Open from the File menu and Excel will try to deduce the fields and records, letting you correct it if it is wrong. If your file really doesn't meet Excel expectations, ordinary Search and Replace in a text editor may massage it into shape (you need a newline character for the end of each record). Further processing can then be done within Excel.

If you are going to be doing this often, then building a tailored solution in a programming language is really not very difficult. You should be able to find useful programs to use as starting points all over the web -- just go to a tutorial site for your favourite language.
posted by Idcoytco at 12:28 PM on May 27, 2006

There's not really any spesific way to tell the diffrence between an int and a double by looking at the binary data You can usually extract strings, but other then that you really have to do it by hand. A hexeditor would help though.

Well, I guess the question is: do you know which feilds are which in the file?
posted by delmoi at 12:34 PM on May 27, 2006

I use winhex.

good general purpose tool. cheap. it'll help find the fields and you can go from there.
posted by FauxScot at 4:14 PM on May 27, 2006

What you want is a fancy hex editor, like Hex Workshop. It lets you define a structure, specifying the data types and lengths and defining names for the fields. It will then overlay that structure on any point of your file, showing you the contents, and you can figure out what data is where and what needs tweaking.
posted by pocams at 12:32 PM on May 28, 2006

« Older Good discussion board software?   |   Paris Hilton's bookmarks Newer »
This thread is closed to new comments.