Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import base64
- def Vigenere(string):
- final = ""
- xorchars = [50,54,51,54,52]
- for i in range(len(string)):
- final+=chr(ord(string[i])^xorchars[i%5])
- return final
- def DecodePassword(password):
- x = base64.b64decode(password.encode()).decode()
- return Vigenere(x)
- while 1:
- pw = input("Write password to decode: ")
- print(DecodePassword(pw))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement