Skip to content

Instantly share code, notes, and snippets.

@JoooostB
Created July 5, 2019 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoooostB/ce4cc4b935e6c3a2bc2de6de33e65f62 to your computer and use it in GitHub Desktop.
Save JoooostB/ce4cc4b935e6c3a2bc2de6de33e65f62 to your computer and use it in GitHub Desktop.
Polybius Square Decryptor - Copenhagen Security Summer Camp - KEA
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