Created
July 5, 2019 09:37
-
-
Save JoooostB/ce4cc4b935e6c3a2bc2de6de33e65f62 to your computer and use it in GitHub Desktop.
Polybius Square Decryptor - Copenhagen Security Summer Camp - KEA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
encrypted = 'ENCODED THINGY HERE' | |
# Change the cipher accordingly | |
dict = { | |
"13": "E", | |
"33": "T", | |
"21": "O", | |
"53": "N", | |
"11": "A", | |
"24": "I", | |
"22": "S", | |
"55": "H", | |
"45": "R", | |
"54": "L", | |
"51": "D", | |
"23": "U", | |
"34": "Y", | |
"31": "C", | |
"42": "G", | |
"52": "W", | |
"35": "F", | |
"41": "M", | |
"15": "P", | |
"43": "B", | |
"25": "V", | |
"14": "X", | |
"32": "K" | |
} | |
s = '' | |
l = re.findall('..', encrypted) | |
for letter in l: | |
s += dict[letter] | |
print(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment