bugku-杂项-很普通的数独(ISCCCTF)(01转换、画二维码)

开始以为是让把这个数独完成才能得到下一步线索,于是在把图片拖到PowerPoint里,背景色设为透明,找了几个合适的图片叠了起来,得到了完整的数独的答案:

bugku-杂项-很普通的数独(ISCCCTF)(01转换、画二维码)_第1张图片

 谁知道并没有什么卵用,只有看别人的wp了。正确方法是把这25个图片按5×5排列,然后把有数字的格记为数字1(代表黑色),没有的记为0(代表白色),再把得到的数字用python画出二维码。

1.png,5.png,21.png仔细看看就是是二维码的定位形状,三个角上的方形块,但是按排列的画,这三个图的顺序不对,需要将图片1.png,5.png,21.png重命名成:5.png,21.png,1.png,然后把01提取出来:

111111101010101000101000001111110000101111111
100000101100111101010011101100011001001000001
101110101110011111010011111101000101001011101
101110101101100010001010000011110001101011101
101110100011100100001111101111111011101011101
100000101100100000011000100001110100001000001
111111101010101010101010101010101011101111111
000000000011001101001000110100110011100000000
110011100100100001111111100100101000000101111
101001001011111111101110101011110101101001100
100000111100100100000110001101001101010001010
001100010011010001010011000100000010110010000
010110101010001111110100011101001110101101111
100011000100011100111011101101100101101110001
001100110100000000010010000111100101101011010
101000001011010111110011011111101001110100011
110111110111011001101100010100001110000100000
110101000010101000011101101101110101101001100
010011111110001011111010001000011011101101100
011001011001010101100011110101001100001010010
010111111111101011111111101101101111111111100
011110001100000100001000101000100100100011110
111110101110011100111010110100110100101010010
110010001011101011101000111100000011100010000
101011111011100111101111111100001010111110010
110100011000111000100111101101111101000100010
111101111110001001000011010110001111110111110
011001010101000110010100010001000101101010001
011101110101101101100100001101101000111101001
110110001001101100010101101111110100101100110
000011100111000000000100001010101111100010010
111010010011110011101110010100001011111010010
101001100010111111110100000100001010101010100
000010011001001101110101001111100101111101101
000010111101110001101011000001000101110100110
011110011010100010100000011011000001110010000
100110100100001101111111101100101110111110011
000000001111110101101000101011100100100011010
111111100011111011011010101101110011101011110
100000101110101101101000111110010001100010001
101110101011100001111111101101001000111111011
101110100110111101101000001001101100011101101
101110100000011101100001101010110010010010001
100000101011001011111011001011000011010110000
111111101010101001111011110101101110000101101

然后写脚本把图画出来:

from PIL import Image
x = 45
y = 45

im = Image.new('RGB', (x, y))
white = (255, 255, 255)
black = (0, 0, 0)

with open('file.txt') as f:
    for i in range(x):
        ff = f.readline()
        for j in range(y):
            if ff[j] == '1':
                im.putpixel((i, j), black)
            else:
                im.putpixel((i, j), white)
im.save("1.jpg")

二维码:

 扫出来是:Vm0xd1NtUXlWa1pPVldoVFlUSlNjRlJVVGtOamJGWnlWMjFHVlUxV1ZqTldNakZIWVcxS1IxTnNhRmhoTVZweVdWUkdXbVZHWkhOWGJGcHBWa1paZWxaclpEUmhNVXBYVW14V2FHVnFRVGs9

是个多层的base64,解密拿到flag。

你可能感兴趣的:(Bugku)