上sublime txt
每一行的长短对应一个二进制位,长空格是1
,短空格是0
,全部替换掉得到
上python脚本
import binascii
with open('attachment_5.txt', 'r') as file:
lines = file.readlines() # 逐行读取文本内容
output = '' # 初始化输出字符串
# 遍历每一行
for line in lines:
if len(line) > 7: # 判断行的长度,根据需要设定长短的阈值
output += '1' # 长的设为1
else:
output += '0' # 短的设为0
print(output) # 输出连接后的结果
print(binascii.unhexlify(hex(int(output,2))[2:]))
wctf2020{h3re_1s_y0ur_fl@g_s1x_s1x_s1x}
flag{h3re_1s_y0ur_fl@g_s1x_s1x_s1x}