题目:http://ctf5.shiyanbar.com/stega/bestwing12345678.bmp
1.用winhex查看图片,可以发现少了文件头
winhex直接编辑加上:
424D360C3000000000003600000028000000560500000003000001001800000000000000000000000000000000000000000000000000
或者用py脚本增加,以下为code:
def generate_bmp():
bmp_header = b'\x42\x4d\x36\x0c\x30\x00\x00\x00\x00\x00' \
b'\x36\x00\x00\x00\x28\x00\x00\x00\x56\x05\x00' \
b'\x00\x00\x03\x00\x00\x01\x00\x18\x00\x00\x00' \
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
new_bmp = b''
with open('bestwing12345678.bmp', mode='rb')as f:
new_bmp=f.read()
with open('bmp.bmp', mode='wb') as f1:
f1.write(bmp_header +