吾的字节_1
解压拿到一个二维码
直接扫码提示flag is no here, see the QRcode clearly!

那就仔细看看,发现二维码上有一些多余的点 写脚本把他提取出来
300*300像素的图片 PS确认二维码有效范围开始于(5,5),每隔十个像素点出现一次,白色像素转化为0,黑色像素转化为1
from PIL import Image
import numpy as np
# 读图
img = Image.open("D:\桌面\workbench\\tempdir\MISC附件\\five.png").convert("L")
arr = np.array(img)
binary = (arr < 128).astype(int)
# 从(5,5)开始,每隔10像素取一次
sampled = binary[5:300:10, 5:300:10]
# 转换为字符串形式
sampled_str = ["".join(map(str, row)) for row in sampled]
# 打印前10行
for line in sampled_str[:30]:
print(line)
001000011010000001001001100011
001010010000011001001101110000
000111111111001001101000000100
011101100001001000010010010000
101000001110000001001100100001
011100001111100000010010001111
011001100010011011000010000011
001010010010000101000000100100
001100110010000000010101001100
000111000000110110000110000011
100100010010000000011001000001
110100101000011101101010000100
000111001010110101000001111001
000011000000100011001100000100
110111011111111001001101101111
111110011010000000111101110111
100101110011111001000010111100
000110101010000001001010111000
001110010010100000111111000001
001000110111000001110110001001
001001000010100001100010100100
101101001000011011100000100100
000110110001001001001000010100
000010010001101100100001111010
001000011000101001000101100111
110111000011111100001101100011
111110001111011000111111101101
110111011111111111100000111011
101011111100110100001101100011
110001111100011111000000100010
联系题目描述写的五字节编码

博多码解密

Infinite_transformation
压缩包爆破密码121144

Autopsy挂载 得到flag.txt hint.txt ctf.png



Steg 777通道 提取图片 联系题目描述和hint 猜测为猫变换


爆破猫变换的三个参数得到flag1
import os
import cv2
import numpy as np
def de_arnold(img, shuffle_time, a, b):
r, c, d = img.shape
dp = np.zeros(img.shape, np.uint8)
for s in range(shuffle_time):
for i in range(r):
for j in range(c):
x = ((a * b + 1) * i - b * j) % r
y = (-a * i + j) % c
dp[x, y, :] = img[i, j, :]
img = np.copy(dp)
return img
# 参数设置
a, b = 15, 16 # Arnold变换的参数
max_attempts = 4 # 爆破的最大尝试次数
output_dir = "D:\\1111" # 输出文件夹
os.makedirs(output_dir, exist_ok=True)
# 读取加密图片
img_en = cv2.imread("D:\\1111\\11.png")
if img_en is None:
raise FileNotFoundError("加密图片未找到,请检查路径和文件名是否正确。")
# 开始爆破
for shuffle_time in range(1, max_attempts + 1):
img_decrypted = de_arnold(img_en, shuffle_time, a, b)
output_path = os.path.join(output_dir, f"flag_{shuffle_time}.png")
cv2.imwrite(output_path, img_decrypted)
print(f"解密图片已保存: {output_path}")
print(f"爆破完成,共生成 {max_attempts} 张解密图片,保存在文件夹: {output_dir}")

Flag2 tupper自指公式画图


1023

被折叠的 条评论
为什么被折叠?



