未知密码破译 Unknown
from my csdn blog
信息安全原理 hw1-3
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF “MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH”
看起来似乎是某某某说过一句怎样的话
先写个程序,用来翻译每个大写字母对应的字母
cipher = 'MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH'
def init_letter(cipher):
''' init the key for cipher'''
key = {' ':' '}
for i in range(ord('A'), ord('A')+26):
key[chr(i)] = '_'
return key
def convert_letter(cipher, key, fr, to):
'''convert the cipher to plaintext with key'''
key[fr] = to
cipher_len = len(cipher)
plainText = ''
for i in range(cipher_len):
plainText += key[cipher[i]]
print(cipher)
print(plainText)
return key
key = init_letter(cipher)
while True:
s = input("OK, let's do some work in the format of 'A b'\n")
fr = s[0]
to = s[2]
key = convert_letter(cipher, key, fr, to)
MAL 如此之多,应该对应 the
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the ________ __ the ______e __ the ___ _h_ ____ the h__he_t _____e__e __ t_ ____ th_t _e __e ________e_ __ ___te__
MAIM 对应 th_t,I应当对应a,MAIM 是 that
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the _a______ __ the ____a_e __ the _a_ _h_ _a__ the h__he_t _____e__e __ t_ ____ that _e a_e ________e_ __ ___te__
先从字母少的单词来,ME 对应 t_,E应当是o
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the _a___o__ __ the ____a_e o_ the _a_ _ho _a__ the h__he_t __o__e__e __ to __o_ that _e a_e ____o___e_ __ ___te__
UAE 对应 _ho,U应当是w
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the _a__wo__ __ the ____a_e o_ the _a_ who _a__ the h__he_t __ow_e__e __ to __ow that we a_e ____o___e_ __ ___te__
IZL 对应 a_e,Z应当为r
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the _a__wor_ __ the __r_a_e o_ the _a_ who _a__ the h__he_t __ow_e__e __ to __ow that we are __rro___e_ __ ___ter_
EX 对应 o_,有好几种可能,of,or不过r已经r有了,X是f
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the _a__wor_ __ the __r_a_e of the _a_ who _a__ the h__he_t __ow_e__e __ to __ow that we are __rro___e_ __ ___ter_
UEZF 对应 wor_ F是d
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the _a__word __ the __r_a_e of the _a_ who _a_d the h__he_t __ow_ed_e __ to __ow that we are __rro__ded __ ___ter_
TIRRUEZF 应当是 password
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password _s the s_r_a_e of the _a_ who sa_d the h__hest __ow_ed_e _s to __ow that we are s_rro__ded __ __ster_
CR _s,C是i
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password is the s_r_a_e of the _a_ who said the hi_hest __ow_ed_e is to __ow that we are s_rro__ded __ __ster_
ACWALRM 对应 hi_hest, W是g
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password is the s_r_a_e of the _a_ who said the highest __ow_edge is to __ow that we are s_rro__ded __ __ster_
DYEUPLFWL 对应 __ow_edge 应当是knowledge
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password is the s_rna_e of the _an who said the highest knowledge is to know that we are s_rro_nded __ __ster_
RKZZEKYFLF s_rro_nded 是surrounded
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password is the surna_e of the _an who said the highest knowledge is to know that we are surrounded __ __ster_
OIY _an 是man
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password is the surname of the man who said the highest knowledge is to know that we are surrounded __ m_ster_
GH 是by, OHRMLZH是mystery
MAL TIRRUEZF CR MAL RKZYIOL EX MAL OIY UAE RICF MAL ACWALRM DYEUPLFWL CR ME DYEU MAIM UL IZL RKZZEKYFLF GH OHRMLZH
the password is the surname of the man who said the highest knowledge is to know that we are surrounded by mystery
大功告成
网友评论