CTFHub_2017-赛客夏令营-Misc-简单隐写(base64解码,base32解码,16进制转换10进制,ascii码转换)
下载附件后,发现是一张图片
使用notepad++打开查看,发现末尾base64数据
base64解码
base32解码
得到16进制数据
取出每两个前面加上0x,转换成int(0xaa,base=16)型,然后chr
# __author__ = Zhengna string = "666C61677B37656535653934343735636665376131333432383330393631393439646462337D" count=0 a = "0x" flag="" for i in string: count += 1 if count == 1: a += i elif count == 2: a += i b = chr(int(a,base=16)) flag += b count=0 a = "0x" print(flag)
成功拿到flag