plot的使用

例题

  1. CTF练习:BugkuCTF杂项题:图穷匕见,给出详细的解题过程。

1730291359338-073b0c39-d7e3-4874-ae09-701dbe1d904e.png

1730291366965-87b4c5dd-e770-451e-b894-2536a3efb423.png

去括号脚本

读取文件

with open(“1.txt”, “r”) as infile:
lines = infile.readlines()

处理每一行,去掉括号和逗号,数字之间用空格分隔

processed_lines = []
for line in lines:
# 去掉括号和逗号,并去除首尾的空白字符
new_line = line.replace(“(“, “”).replace(“)”, “”).replace(“,”, “ “).strip()
processed_lines.append(new_line)

将修改后的内容写入新文件

with open(“output.txt”, “w”) as outfile:
for processed_line in processed_lines:
outfile.write(processed_line + “\n”)

print(“已成功转换,结果保存在 output.txt 文件中”)

扫码得到flag

1730291448189-9067c8bf-c436-4c82-a71f-11ac8bf28cd1.png

更新: 2024-10-30 20:31:31
原文: https://www.yuque.com/chaye-apqbl/vsc85q/tgpgp9tv3ub5tc6w


http://example.com/2026/01/19/MISC/照片/plot的使用/
Author
chaye
Posted on
January 19, 2026
Licensed under