Rating:
首先我们看到这个二维码,判断这应该是点被缩小,所以我们将像黑色素点由1x1向周围放大为9x9,Python脚本如下:
```
#!/usr/bin/python
from PIL import Image
def rgb2hex(r, g, b):
return int('{:02x}{:02x}{:02x}'.format(r, g, b), 16)
result = ''
img = Image.open('brain2.png')
if img.mode in ('RGBA', 'LA') or (img.mode == 'P' and 'transparency' in img.info):
pixels = img.convert('RGBA').load()
width, height = img.size
for x in range(width):
for y in range(height):
r, g, b, a = pixels[x, y]
if r != 255:
result += '1'
img.putpixel((x+1, y), (0, 0, 0))
img.putpixel((x+1, y-1), (0, 0, 0))
img.putpixel((x+1, y+1), (0, 0, 0))
img.putpixel((x-1, y+1), (0, 0, 0))
img.putpixel((x-1, y-1), (0, 0, 0))
img.putpixel((x-1, y), (0, 0, 0))
img.putpixel((x, y-1), (0, 0, 0))
img.putpixel((x, y+1), (0, 0, 0))
img.show()
```
然后得到一张图片,扫描二维码得出flag的值。