BUUCTF_Crypto_[WUSTCTF2020]B@se
作者:互联网
密文:MyLkTaP3FaA7KOWjTmKkVjWjVzKjdeNvTnAjoH9iZOIvTeHbvD==
JASGBWcQPRXEFLbCDIlmnHUVKTYZdMovwipatNOefghq56rs****kxyz012789+/
题目给了一串密文和base64的表,这个一样是自定义的表,但是缺了一点,
爆破出来就好了,脚本:
import base64 import string file=open('C:/Users/25287/Desktop/1.txt','w') str1='MyLkTaP3FaA7KOWjTmKkVjWjVzKjdeNvTnAjoH9iZOIvTeHbvD==' string2='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for i in range(65,122): for j in range(65,122): for k in range(65,122): for l in range(65,122): string1='JASGBWcQPRXEFLbCDIlmnHUVKTYZdMovwipatNOefghq56rs'+chr(i)+chr(j)+chr(k)+chr(l)+'kxyz012789+/' file.write(str(base64.b64decode(str1.translate(str.maketrans(string1,string2))))) string1=''
我把输出存在了文件里,方便查找,在文件的末尾位置得到flag:
flag{base64_1s_v3ry_e@sy_and_fuN}
标签:BUUCTF,122,base64,Crypto,chr,65,range,se,string1 来源: https://www.cnblogs.com/1ucky/p/15840972.html