图片隐写:
1、将图片里的数据转换成二维码:
用linux下的信息提取工具Binwalk看一下: [email protected]:~/Desktop# binwalk 图片名 DECIMAL HEXADECIMAL DESCRIPTION -------------------------------------------------------------------------------- 0 0x0 PNG image, 1000 x 562, 8-bit/color RGBA, non-interlaced 91 0x5B Zlib compressed data, compressed 3526 0xDC6 Zlib compressed data, best compression 1421307 0x15AFFB Zlib compressed data, default compression后面是Zlib压缩的数据,写个脚本解压一下:
python提取脚本 from PIL import Image from zlib import * data = open(‘图片名‘,‘rb‘).read()[0x15AFFB:] data = decompress(data) img = Image.new(‘1‘, (25,25)) d = img.load() for n,i in enumerate(data): d[(n%25,n/25)] = int(i)*255 f = open(‘flag.png‘,‘wb‘) img.save(f)
时间: 2024-11-11 11:08:46