Skip to content

Instantly share code, notes, and snippets.

@samduy
Created December 31, 2017 13:27
Show Gist options
  • Save samduy/b99927cc42b8ad0f114cdd1c8b1e759d to your computer and use it in GitHub Desktop.
Save samduy/b99927cc42b8ad0f114cdd1c8b1e759d to your computer and use it in GitHub Desktop.
Convert Windows registry hex format to readable ASCII
import binascii, sys, string
dataFormatHex = binascii.a2b_hex(sys.argv[1])
output = ""
for char in dataFormatHex:
if char in string.printable: output += char
else: output += "."
print "\n" + output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment