import base64 from pysm4 import encrypt, decrypt old='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' new='yzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/abcdefghijklmnopqrstuvwx'#修改过的b64表 data=list('1UTAOIkpyOSWGv/mOYFY4R!!') newdata='' result='' for i inrange(0,len(data),2): newdata += data[i + 1] newdata+=data[i] for i inrange(len(newdata)-2): result+=old[new.find(newdata[i])] result+='==' de=base64.b64decode(result) decodedata=list(de) for i in decodedata: print(hex(i)) #0x59d095290df2400614f48d276906874e
flag_int=[] encodedata = 0x59d095290df2400614f48d276906874e key = 0x77686572655f6172655f755f6e6f773f#where_are_u_now? decode = decrypt(encodedata, key) flag=hex(decode)[2:] for i inrange(0,len(flag),2): flag_int.append(int(flag[i]+flag[i+1],16)) print(''.join(chr(j)for j in flag_int ))