defarnold_transform(image, transform_type, shuffle_times, a, b): #假设图片是方形 transformed_image = np.zeros_like(image) h, w = image.shape[:2] N = h
# 根据变换类型选择不同的变换矩阵 if transform_type == 'encode': deftransform(x, y): return (x + b * y) % N, (a * x + (a * b + 1) * y) % N elif transform_type == 'decode': deftransform(x, y): return ((a * b + 1) * x - b * y) % N, (-a * x + y) % N
for _ inrange(shuffle_times): coords = np.indices((h, w)).reshape(2, -1) new_coords = np.array([transform(x, y) for x, y in coords.T]).T
if score == 180: log_message('ISCC') log_message('ISCC{U2FsdGVkX1+L/wKmHIDfApCg80p+D+QrET/NmTD7QNeRSGbAkJFM}') reached_300 = True
ref(APA): Ron.The Way of Ron.https://www.sujohn-ron.cn. Retrieved 2025/6/28.
找个网站在线解密RC4,由提示想到密码为serpentyearISCC,解码获得Flag:
正正得负:
这里用到是zipCrypto加密以及Store压缩,已知压缩包尾部编码,我们可以爆破压缩包文件尾
使用bkcrack,最少12字节,故我们随意挑选12个:
原始⼤⼩为194,由⽂件尾(共22个字节)固定的字节可以得到偏移172
1 2 3 4 5 6 7 8 9 10 11 12 13
bkcrack.exe -C attachment.zip -c flag.zip -x 172 504B05060000000001000100 -d flag.zip bkcrack 1.7.1 - 2024-12-21 [00:52:54] Z reduction using 4 bytes of known plaintext 100.0 % (4 / 4) [00:52:54] Attack on 1255721 Z values at index 179 Keys: e7f9d150 4e8fc2d9 c333de18 82.6 % (1036642 / 1255721) Found a solution. Stopping. You may resume the attack with the option: --continue-attack 1036642 [01:02:42] Keys e7f9d150 4e8fc2d9 c333de18 [01:02:42] Writing deciphered data flag.zip Wrote deciphered data (not compressed).
在zipCrypto加密中明密⽂互相对应,可以爆破提取出flag,zip:
这里还有一次加密,和上一次一样的zipCrypto加密,Store压缩,包括使用的密钥也是一样的:
1 2 3 4
bkcrack.exe -C flag.zip -c flag.txt -k e7f9d150 4e8fc2d9 c333de18 -d flag.txt bkcrack1.7.1 - 2024-12-21 [01:06:47] Writing deciphered data flag.txt Wrote deciphered data (not compressed).