Guest User

Untitled

a guest
May 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import optparse
  2.  
  3. (options, args) = optparse.OptionParser().parse_args()
  4.  
  5. word = args[0]
  6. if len(args) > 1:
  7.     offset = int(args[1], 16)
  8. else:
  9.     offset = 0x1d4ea
  10.  
  11. string = ""
  12. for char in word:
  13.     if ord(char) == 32:
  14.         char = ' '
  15.     else:
  16.         char = ord(char) - 65
  17.         char = char + offset
  18.         char = unichr(char)
  19.         char = char.encode('utf-8')
  20.     string = "%s%s" % (string, char)
  21. print string
Add Comment
Please, Sign In to add comment