Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1.  
  2. help = """ ==============
  3. = Hexbuster =
  4. ==============
  5.  
  6. This program decodes hex messages
  7. for you. :)
  8.  
  9. - By: Nite
  10.  
  11. Arguments: hexbuster [--help] FILE
  12.  
  13. FILE The hex codes are stored in a file, line
  14. by line. This is the filename of it. Make sure
  15. to put how many codes in the file at the start.
  16.  
  17.  
  18.  
  19. --help Displays this help message.
  20. """
  21.  
  22.  
  23.  
  24. import sys
  25. import string
  26.  
  27. if sys.argv[1] == '--help':
  28. print help
  29. exit()
  30.  
  31. hex = sys.argv[1]
  32. buster = open('./'+hex, 'r')
  33. NumHex = buster.readline()
  34. r = range(1, NumHex)
  35. for i in r:
  36. HexCode = buster.readline()
  37. OutChar = chr(HexCode)
  38. print OutChar
  39.  
  40.  
  41. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement