Created
November 13, 2019 04:31
-
-
Save SimonTheCoder/90221aebf75281c553870b3d50f099cf to your computer and use it in GitHub Desktop.
deocde some string
This file contains 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
#!/usr/bin/env python | |
target_string = "ZW PFL NREK KF CVRIE DFIV RSFLK TIPGKFXIRGYP Z IVTFDDVBU RE FECZEV TFLIJV ZEJKILTKVU SP GIFWVJJFI URE SFEVY WIFD JKREWFIU LEZMVIJZKP ALJK JVRITY TIPGKFXIRGYP RK TFLIJVIR.FIX" | |
my_dict = { | |
"A":"j", | |
"B":"n", | |
"C":"l", | |
"D":"m", | |
"E":"n", | |
"F":"o", | |
"G":"p", | |
"I":"r", | |
"J":"s", | |
"K":"t", | |
"L":"u", | |
"M":"v", | |
"N":"w", | |
"P":"y", | |
"R":"a", | |
"S":"b", | |
"T":"c", | |
"U":"d", | |
"V":"e", | |
"W":"f", | |
"X":"g", | |
"Y":"h", | |
"Z":"i", | |
".":"." | |
} | |
for i in target_string: | |
t = i | |
try: | |
t = my_dict[i] | |
except: | |
t = i | |
print t, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment