2024网鼎杯-青龙组

Fc04dB Lv4

# MISC03

wireshark 打开数据包

全局搜索响应码为 200 的包第三步:经过很多尝试找出正确 ip:

下面记事本是赛题下线之前的记录,重新上线后一个一个尝试发现正确 flag

image-20241029225758471

也可以通过脚本提取所有 ip 然后一个一个试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from scapy.all import rdpcap

# 读取 pcap 文件
packets = rdpcap('D:\\123\\3\\c.pcap')

# 存储唯一的 IP 地址
ip_addresses = set()

for packet in packets:
if packet.haslayer('IP'):
ip_addresses.add(packet['IP'].src)
ip_addresses.add(packet['IP'].dst)

# 打印所有唯一的 IP 地址
for ip in ip_addresses:
print(ip)

image-20241029225913816

image-20241029225947528

# MISC04

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from PIL import Image
from tqdm import tqdm

def peano(n):
if n == 0:
return [[0,0]]
else:
in_lst = peano(n - 1)
lst = in_lst.copy()
px,py = lst[-1]
lst.extend([px - i[0], py + 1 + i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px + i[0], py + 1 + i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px + 1 + i[0], py - i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px - i[0], py - 1 - i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px + i[0], py - 1 - i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px + 1 + i[0], py + i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px - i[0], py + 1 + i[1]] for i in in_lst)
px,py = lst[-1]
lst.extend([px + i[0], py + 1 + i[1]] for i in in_lst)
return lst

order = peano(6)

img = Image.open(r"D:\\123\\4\\1.png")

width, height = img.size

block_width = width # // 3
block_height = height # // 3

new_image = Image.new("RGB", (width, height))

for i, (x, y) in tqdm(enumerate(order)):
# 根据列表顺序获取新的坐标
new_x, new_y = i % width, i // width
# 获取原图像素
pixel = img.getpixel((x, height - 1 - y))
# 在新图像中放置像素
new_image.putpixel((new_x, new_y), pixel)

new_image.save("D:\\123\\4\\2.png")
  • Title: 2024网鼎杯-青龙组
  • Author: Fc04dB
  • Created at : 2024-10-29 22:55:33
  • Updated at : 2024-10-29 23:00:23
  • Link: https://redefine.ohevan.com/2024/10/29/2024网鼎杯-青龙组/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
2024网鼎杯-青龙组