当前位置:网站首页>[MRCTF2020]千层套路
[MRCTF2020]千层套路
2022-06-24 06:43:00 【[mzq]】
[MRCTF2020]千层套路
题目地址 : https://buuoj.cn/challenges#[MRCTF2020]%E5%8D%83%E5%B1%82%E5%A5%97%E8%B7%AF
解压压缩包,发现是密码竟然是压缩包名称,再根据题目,tnnd又是套娃题

import zipfile
file_path = input('path : ')#压缩包路径
path = "/Users/mzq/Desktop/ctf/buuctf/misc/[MRCTF2020]千层套路/"
# path = file_path[0:len(file_path)-len(file_path.split('//')[-1])]
print(path)
n = 0
s2 = ""
def extract():
i = file_path.split('\\')[-1]#递归解压压缩包名称
print(i)
str1 = ''
for x in range(1000):
ss = i[:i.find(".")]
print(ss)
zpf = zipfile.ZipFile( path+ss + ".zip")
list = zpf.namelist()
#print(list)
print(x + 1)
for f in list:
#print(f)
passwd = ss
#passwd = f.split('.')[0]#压缩包密码
#print(passwd)
zpf.extract(f, path, bytes(passwd.encode('utf-8')))
if 'zip' in f:
print(path, passwd)
i = str(f)
extract()

最后解出来了一个qr.zip
qr.zip解压后得到qr.txt ,里面都是一些像素值,或者是坐标值

使用脚本拼图
from PIL import Image
file=open('qr.txt')
MAX=200
picture=Image.new("RGB",(MAX,MAX))
for y in range(MAX):
for x in range(MAX):
string =file.readline()
picture.putpixel([x,y],eval(string)) #直接使用eval()可以转为元组
picture.show()

MRCTF{ta01uyout1nreet1n0usandtimes}
边栏推荐
- [problem solving] the connection to the server localhost:8080 was referred
- 华为云图引擎服务
- 【问题解决】虚拟机配置静态ip
- Why use lock [readonly] object? Why not lock (this)?
- Laravel文档阅读笔记-Laravel Str slug() Function Example
- On update current in MySQL_ TIMESTAMP
- 学会使用楼宇控制系统BACnet网关没那么难
- Fine! Storage knowledge is a must for network engineers!
- What is the OSI seven layer model? What is the role of each layer?
- The third session of freshman engineering education seminar is under registration
猜你喜欢

内网学习笔记(4)

Huawei cloud image engine service

Decryption of the original divine square stone mechanism

MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等

Spark project Packaging Optimization Practice

基因检测,如何帮助患者对抗疾病?

【均衡器】LS均衡器,DEF均衡器以及LMMSE均衡器的误码率性能对比仿真

Canal installation configuration

JVM调试工具-jmap

Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
随机推荐
Arduino raised $32million to enter the enterprise market
【愚公系列】2022年6月 ASP.NET Core下CellReport报表工具基本介绍和使用
Become TD hero, a superhero who changes the world with Technology | invitation from tdengine community
关于取模数据序号定位的说明 区码定位是指GBK编码
【图像融合】基于方向离散余弦变换和主成分分析的图像融合附matlab代码
Another double win! Tencent's three security achievements were selected into the 2021 wechat independent innovation achievements recommendation manual
Are internal consultants and external consultants in SAP implementation projects difficult or successful? [English version]
Deploy loglistener in tke container to collect logs to CLS
1. go deep into tidb: see tidb for the first time
Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
Outils de débogage JVM - Arthas
Clickhouse source code note 6: exploring the sorting of columnar storage systems
One year since joining Tencent
Vmware tools still exist after normal uninstallation for many times. How to solve it
NVIDIA control panel does not open what is NVIDIA control panel
JVM debugging tool -jvisualvm
Win11笔记本省电模式怎么开启?Win11电脑节电模式打开方法
Smart space 𞓜 visualization of operation of digital twin cargo spacecraft
JVM debugging tool -arthas
Spark累加器和廣播變量