buuctf_梅花香自苦寒来

题目链接 : https://buuoj.cn/challenges#%E6%A2%85%E8%8A%B1%E9%A6%99%E4%B9%8B%E8%8B%A6%E5%AF%92%E6%9D%A5

EOF bad, 上 010 看到一堆十六进制数据

另存为 txt 文件, 用脚本转换成 ascii 码

with open('hex.txt', 'r') as h:
    h = h.read()
with open('./ascii.txt', 'a') as a:
    for i in range(0, len(h), 2):
        tmp = '0x'+h[i]+h[i+1]
        tmp = int(tmp, base=16)
        if chr(tmp) != '(' and chr(tmp) != ')':
            a.write(chr(tmp))

输出 ascii.txt, 里面是一些坐标数据

用 matplotlib 绘图得到二维码

import matplotlib.pyplot as plt
import numpy as np

x, y = np.loadtxt('./ascii.txt', delimiter=',', unpack=True)
plt.plot(x, y, '.')
plt.show()

扫码得 flag

flag{40fc0a979f759c8892f4dc045e28b820}

这题脑洞过大然后我全程搜索啥都没学到