2018 MOCTF欢乐新春赛 部分题解

MOCTF欢乐新春赛。

李华的疑惑.

打开是一大串RGB的颜色值。

1
2
3
4
5
6
7
8
9
10
11
from PIL import Image
x = 280
y = 280
im = Image.new("RGB", (x, y))
file = open('flag.txt')
for i in range(0, x):
for j in range(0, y):
line = file.readline()
rgb = line.split(",")
im.putpixel((i, j), (int(rgb[0]), int(rgb[1]), int(rgb[2])))
im.show()

aes解密得到moctf{D0_You_1ik3_tO_pAinH_wi4h_pi8e1}

一万年的爱有多久

嵌套压缩包解压。

1
2
3
4
5
6
7
8
9
10
import zipfile
zfile = zipfile.ZipFile('KIhn9j7FfG.zip','r')
while(1):
for filename in zfile.namelist():
data = zfile.read(filename)
file = open(filename, 'w+b')
file.write(data)
file.close()
print filename
zfile = zipfile.ZipFile(filename[:],'r')