[AFCTF 2018]BASE“循环base”
题目:一个2M的文件

解题:
import re import base64 s=open('flag_encode.txt','rb').read() base16_dic = r'^[A-F0-9=]*$' base32_dic = r'^[A-Z2-7=]*$' base64_dic = r'^[A-Za-z0-9/+=]*$' n= 0 while True: n += 1 t = s.decode() if '{' in t: print(t) break elif re.match(base16_dic, t): s = base64.b16decode(s) print(str(n) + ' base16') elif re.match(base32_dic, t): s = base64.b32decode(s) print(str(n) + ' base32') elif re.match(base64_dic, t): s = base64.b64decode(s) print(str(n) + ' base64')
RSA脚本大多引用自https://lazzzaro.github.io/2020/05/06/crypto-RSA/

浙公网安备 33010602011771号