BugkuCTF-MISC-0和1的故事

    下载附件,一堆0和1代码:

    1. 0000000001110010000000000
    2. 0000000000011110100000000
    3. 0000000001110001000000000
    4. 0000000010111100000000000
    5. 0000000010101010000000000
    6. 0000000001100010100000000
    7. 0000000010101010100000000
    8. 0000000001000001100000000
    9. 1100011101110110100011000
    10. 0001000010110010010010100
    11. 0100111101000011101110011
    12. 0011110100101011001001001
    13. 1000001001100001001101000
    14. 1111000111111011100101000
    15. 1011011111001101111110111
    16. 1000110110010010101101100
    17. 1000111100111111111110111
    18. 0000000010110001100010100
    19. 0000000010010100101010001
    20. 0000000010101010100011001
    21. 0000000000100111111110010
    22. 0000000000011001011110111
    23. 0000000001001100100100001
    24. 0000000011000011011011001
    25. 0000000011010000101110101

    参考Wrtiteup,非黑根据即白,需要转二维码,RoleMee大佬写的Python代码如下:

    from PIL import Image
    MAX = 25
    #二维码大小
    pic = Image.new("RGB",(MAX, MAX))  #这个函数创建一幅给定模式(mode)和尺寸(size)的图片。如果省略 color 参数,则创建的图片被黑色填充满。
    str = """0000000001110010000000000
    0000000000011110100000000
    0000000001110001000000000
    0000000010111100000000000
    0000000010101010000000000
    0000000001100010100000000
    0000000010101010100000000
    0000000001000001100000000
    1100011101110110100011000
    0001000010110010010010100
    0100111101000011101110011
    0011110100101011001001001
    1000001001100001001101000
    1111000111111011100101000
    1011011111001101111110111
    1000110110010010101101100
    1000111100111111111110111
    0000000010110001100010100
    0000000010010100101010001
    0000000010101010100011001
    0000000000100111111110010
    0000000000011001011110111
    0000000001001100100100001
    0000000011000011011011001
    0000000011010000101110101
    """
    # str为获取的01片段
    i=0
    for y in range (0,MAX):
        for x in range (0,MAX):
            if(str[i] == '1'):
                pic.putpixel([x,y],(0, 0, 0))
            else:
                pic.putpixel([x,y],(255,255,255))
            i = i+1
    pic.show()
    pic.save("1.jpg", "JPEG")
    #由于直接预览分辨率太低,所以保存下来观看
    

    运行代码发现图片如下:

    BugkuCTF-MISC-1和0的故事 - 图1

    缺少定位标志,通过编辑补全之后如下图:

    BugkuCTF-MISC-1和0的故事 - 图2

    使用QR Rearch识别二维码获得flag。

    BugkuCTF-MISC-1和0的故事 - 图3