0

a binary dump file is like a hex dump file except that it is in binary form instead of hex

now I've got a binary dump file looks like this:

01101110 01101100 01000001 01000001 01000001 00101011 00110001 01011010
01001000 00110100 01110011 01001001 01000001 01000011 01001010 01001011
...

and I know the original file was a normal text file, so how can I revert or say recover it from the dump file?

chrisyue
  • 195
  • 1
  • 9

2 Answers2

0

based on: http://www.unix.com/programming/8680-binary-text-format-conversion.html

sounds like uuencode is your friend :) I checked it and on my Fedora 17 package is called: perl-Convert-UU

Peter Butkovic
  • 11,143
  • 10
  • 57
  • 81
0

you can use python, something like this:

import re
f = open('dump', 'r')
token= re.split(r'[ \n]', f.read())
map (lambda (t):  chr(int(t, 2)), token)
iabdalkader
  • 17,009
  • 4
  • 47
  • 74
  • I don't know python and the code doesn't work on my machine (re is not defined), but I've got your point and wrote a php script to do the same thing – chrisyue Nov 11 '12 at 03:52
  • @chrisyue great, if you want the python code to work too, `import re` first – iabdalkader Nov 11 '12 at 17:27