Advertisement
mgostih

Decode Level Password

Oct 27th, 2016
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import base64
  2. def Vigenere(string):
  3.     final = ""
  4.     xorchars = [50,54,51,54,52]
  5.     for i in range(len(string)):
  6.         final+=chr(ord(string[i])^xorchars[i%5])
  7.     return final
  8.  
  9. def DecodePassword(password):
  10.     x = base64.b64decode(password.encode()).decode()
  11.     return Vigenere(x)
  12.  
  13. while 1:
  14.     pw = input("Write password to decode: ")
  15.     print(DecodePassword(pw))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement