Problem: [NSSRound#27 Team]27262524
27262524
前言:因为出题的时候27轮海报没有出,就用了26轮海报做素材.
爆破密码得到272727

解压文件
还是压缩包,
再爆破得到262626

压缩包需要解27次
密码有规律
272727
262626
252525
import os import pyzipper def decompress_and_decrypt(compressed_file, output_path, password): with pyzipper.AESZipFile(compressed_file) as zf: zf.setpassword(password.encode()) zf.extractall(path=output_path) def main(): # 解压路径,确保该目录存在或根据需要创建它 extract_to = '.' if not os.path.exists(extract_to): os.makedirs(extract_to) previous_extracted = None for i in range(27, 0, -1): # 从26到1反向解压 number_str = str(i).zfill(2) # 确保数字是两位数,如26, 25... password = number_str * 3 # 创建密码,如262626 compressed_file = f'{number_str}.zip' # 每次解压都输出到extract_to目录下 decompress_and_decrypt(compressed_file, extract_to, password) print(f'Decompressed and decrypted: {compressed_file} with password {password}') # 更新previous_extracted为当前解压后的文件夹,以便处理嵌套的ZIP文件 previous_extracted = os.path.join(extract_to, os.path.splitext(os.path.basename(compressed_file))[0]) # 最终解压出来的应该是原始文件,如果所有ZIP都是单个文件的话 final_extracted_file = os.listdir(extract_to)[0] if os.listdir(extract_to) else None print(f'Final extracted file: {final_extracted_file}') if __name__ == '__main__': main()
将27.zip放当前路径解压得到

foremost文件分离得到两张图

二维码反色
在线图像反相/反色工具 - UU在线工具 (uutool.cn)

得到flag
NSSCTF{The_competition_has_so_far_held_26_rounds}
