Skip to content

Instantly share code, notes, and snippets.

@drincruz
Created July 25, 2013 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drincruz/6079922 to your computer and use it in GitHub Desktop.
Save drincruz/6079922 to your computer and use it in GitHub Desktop.
Reads stdin hex and outputs ascii. Youtube posted on google+, so I wrote this quickly. https://plus.google.com/u/0/+youtube/posts/TWvnTtEgz8L
#!/usr/bin/env python
import sys
def main():
for line in sys.stdin:
print("%s\n" % bytes.fromhex(line.replace(' ', '').strip()).decode('utf-8'))
if '__main__' == __name__:
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment