Caesar
Caesar
打开.txt:
oknqdbqmoq{kag_tmhq_xqmdzqp_omqemd_qzodkbfuaz}
根据题目判断是凯撒密码,flag前头是cyberpeace{},可以得到偏移量是12.
所以:
cyberpeace{you_have_learned_caesar_encryption}
下面是我找的关于凯撒密码的解密脚本
cs= "oknqdbqmoq{kag_tmhq_xqmdzqp_omqemd_qzodkbfuaz}"
b='abcdefghijklmnopqrstuvwxyz'
for key in range(26):
flag = ''
for i in cs:
if i in b:
num = b.find(i)
num = num - key
if num<0:
num = num + len(b)
flag = flag + b[num]
else:
flag = flag + i
print('key %s :%s'%(key,flag))
-------------------------------------------------------------
key 0 :oknqdbqmoq{kag_tmhq_xqmdzqp_omqemd_qzodkbfuaz}
key 1 :njmpcaplnp{jzf_slgp_wplcypo_nlpdlc_pyncjaetzy}
key 2 :milobzokmo{iye_rkfo_vokbxon_mkockb_oxmbizdsyx}
key 3 :lhknaynjln{hxd_qjen_unjawnm_ljnbja_nwlahycrxw}
key 4 :kgjmzxmikm{gwc_pidm_tmizvml_kimaiz_mvkzgxbqwv}
key 5 :jfilywlhjl{fvb_ohcl_slhyulk_jhlzhy_lujyfwapvu}
key 6 :iehkxvkgik{eua_ngbk_rkgxtkj_igkygx_ktixevzout}
key 7 :hdgjwujfhj{dtz_mfaj_qjfwsji_hfjxfw_jshwduynts}
key 8 :gcfivtiegi{csy_lezi_pievrih_geiwev_irgvctxmsr}
key 9 :fbehushdfh{brx_kdyh_ohduqhg_fdhvdu_hqfubswlrq}
key 10 :eadgtrgceg{aqw_jcxg_ngctpgf_ecguct_gpetarvkqp}
key 11 :dzcfsqfbdf{zpv_ibwf_mfbsofe_dbftbs_fodszqujpo}
#key 12 是答案。
key 12 :cyberpeace{you_have_learned_caesar_encryption}
key 13 :bxadqodzbd{xnt_gzud_kdzqmdc_bzdrzq_dmbqxoshnm}
key 14 :awzcpncyac{wms_fytc_jcyplcb_aycqyp_clapwnrgml}
key 15 :zvybombxzb{vlr_exsb_ibxokba_zxbpxo_bkzovmqflk}
key 16 :yuxanlawya{ukq_dwra_hawnjaz_ywaown_ajynulpekj}
key 17 :xtwzmkzvxz{tjp_cvqz_gzvmizy_xvznvm_zixmtkodji}
key 18 :wsvyljyuwy{sio_bupy_fyulhyx_wuymul_yhwlsjncih}
key 19 :vruxkixtvx{rhn_atox_extkgxw_vtxltk_xgvkrimbhg}
key 20 :uqtwjhwsuw{qgm_zsnw_dwsjfwv_uswksj_wfujqhlagf}
key 21 :tpsvigvrtv{pfl_yrmv_cvrievu_trvjri_vetipgkzfe}
key 22 :soruhfuqsu{oek_xqlu_buqhdut_squiqh_udshofjyed}
key 23 :rnqtgetprt{ndj_wpkt_atpgcts_rpthpg_tcrgneixdc}
key 24 :qmpsfdsoqs{mci_vojs_zsofbsr_qosgof_sbqfmdhwcb}
key 25 :plorecrnpr{lbh_unir_yrnearq_pnrfne_rapelcgvba}
#不知道的话挨个提交,最后12是对的。