Commit 80155626 authored by Dominik Rosiek's avatar Dominik Rosiek

substitution cipher flag

parent ddacfff7
#!/usr/bin/python
from random import shuffle
alphabet = [i for i in 'QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm']
keys = alphabet[:]
shuffle(keys)
cb = dict(zip(keys, alphabet))
message = "Ahjo, tym razem masz do rozszyfrowania prosty szyfr podstawieniowy, elo, a flaga to AGH{PodstawSieANieDajSie}"
result = ""
for letter in message:
if letter in alphabet:
result += cb[letter]
else:
result += letter
print result
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment