huge commit
This commit is contained in:
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/00103872.bmp
Normal file
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/00103872.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/00104770.bmp
Normal file
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/00104770.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/00146504.bmp
Normal file
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/00146504.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 576 KiB |
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/armory.bmp
Normal file
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/armory.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 576 KiB |
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/decrypt.bmp
Normal file
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/decrypt.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 576 KiB |
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/outfile.bin
Normal file
BIN
2026/srdnlen_quals/forensic/chapter2/output/bmp/outfile.bin
Normal file
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 576 KiB |
37
2026/srdnlen_quals/forensic/chapter2/output/bmp/xor_bmp.py
Normal file
37
2026/srdnlen_quals/forensic/chapter2/output/bmp/xor_bmp.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import os
|
||||
from PIL import Image
|
||||
import numpy as np
|
||||
|
||||
# Find all BMP files in the current directory
|
||||
bmps = [f for f in os.listdir('.') if f.endswith('.bmp')]
|
||||
print(bmps)
|
||||
images = {}
|
||||
|
||||
for b in bmps:
|
||||
try:
|
||||
img = np.array(Image.open(b))
|
||||
shape = img.shape
|
||||
# Group images by their exact pixel dimensions
|
||||
if shape not in images:
|
||||
images[shape] = []
|
||||
images[shape].append((b, img))
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
print(images.items())
|
||||
|
||||
# Find the pair of relics and XOR them
|
||||
for shape, imgs in images.items():
|
||||
print(len(imgs))
|
||||
if len(imgs) == 2:
|
||||
|
||||
print(f"[+] Found matching relics: {imgs[0][0]} and {imgs[1][0]}")
|
||||
|
||||
# This is the "remember to XOR"
|
||||
result = np.bitwise_xor(imgs[0][1], imgs[1][1])
|
||||
|
||||
out_name = f"final_armory_{imgs[0][0]}.png"
|
||||
Image.fromarray(result).save(out_name)
|
||||
print(f"[!] The forge is lit. Open {out_name} to claim the flag.")
|
||||
else:
|
||||
print("found no pairs")
|
||||
Reference in New Issue
Block a user