CSC2023 - [Forensics] - RecoverQR

You,CSC2023Forensics

Challenge Description

Team RootxRAN made a basic challenge. I don't think you can solve this challenge

Solution

Extract 0 -1 0 -1 part from the file

Alt text

Clean the data by remove 0 -1 0 -1 parts

After cleaning the data you would have 69 74 parts

Alt text

Recover Script

from PIL import Image  
 
width = 220
height = 220
 
img  = Image.new( mode = "RGB", size = (width, height) )
 
white = (255, 255, 255)
black = (0, 0, 0)
 
image_text = []
 
with open("./rawdata", "r") as f:
        for line in f.readlines():
                line = line.rstrip()
                image_text.append(line.split(" "))
 
for i in range(220):
        for k in range(220):
                if image_text[i][k] == "74":
                        img.putpixel((i, k), white)
                else:
                        img.putpixel((i, k), black)
 
img.show()

QR Image

Alt text

Flag

CSC{Y0u_R3c0v3r3d_M3}

Writeups 2023 © RootxRAN.