Skip to content

Instantly share code, notes, and snippets.

@zorix
Created June 29, 2017 20:01
Show Gist options
  • Select an option

  • Save zorix/10a24e3599fde0a1cac0b6501f311425 to your computer and use it in GitHub Desktop.

Select an option

Save zorix/10a24e3599fde0a1cac0b6501f311425 to your computer and use it in GitHub Desktop.
import codecs
txt = 'c5c2c3c4c9c34082a89382a84086819195a8408784a882a84082a893409396878983a995a84b40c1938540958985409185a2a34b'.decode('hex')
unkWords = txt.split(chr(0x40)) # 0x40 - guessed space
out = []
for u in unkWords:
w = codecs.decode(u, "cp500") # EBCDIC
out.append(w)
print ' '.join(out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment