-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript3.py
25 lines (24 loc) · 1.06 KB
/
script3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
key_table = {'A':'D9', 'B':'X', 'C':'S', 'D':'F', 'E':'Z721', 'F':'E', 'G':'H', 'H':'C', 'I':'V3',
'J':'I', 'K':'T', 'L':'P', 'M':'G', 'N':'A5', 'O':'Q0', 'P':'L', 'Q':'K', 'R':'J', 'S':'R4', 'T':'6U',
'U':'O', 'V':'W', 'W':'M', 'X':'Y', 'Y':'B', 'Z':'N', 'a':'d(', 'b':'x', 'c': 's', 'd':'f', 'e':'z&@!',
'f':'e', 'g':'h', 'h':'c', 'i':'v#', 'j':'i', 'k':'t', 'l':'p', 'm':'g', 'n':'a%', 'o':'q)', 'p':'l',
'q':'k', 'r':'j','s':'r$', 't':'^u', 'u':'o', 'v':'w', 'w':'m', 'x':'y', 'y':'b', 'z':'n'}
def decryption(txt):
flag = 1
words = txt.split(" ")
try:
for item in words: lst += item + " "
for letter in lst:
if letter == " ": dec_text += " "
else:
for item in key_table:
flag = 1
if letter in key_table[item]:
dec_text += item
flag = 0
break
if flag == 1: dec_text += letter
return dec_text
except:
return "Last One to debug!!"
print(decryption("cf.uk"))