QRazy CSV

Kyrie-Lrving 2024-11-04 11:36:01 55 0


from PIL import Image
import csv

def decode_coordinate(coord):
    x, y = map(int, coord.split(','))
    return (x, y)

def decode_coordinates(encoded_coordinates):
    return [decode_coordinate(coord) for coord in encoded_coordinates]

# Read the black pixel coordinates from the CSV file
with open("secret.csv", "r") as f:
    reader = csv.reader(f)
    next(reader) # Skip the header row
    encoded_coordinates = [row[0] for row in reader]

decoded_coordinates = decode_coordinates(encoded_coordinates)

# Recreate the QR code image
image = Image.new("1", (100, 100), color=255)
for x, y in decoded_coordinates:
    image.putpixel((x, y), 0)

image.save("recreated_qr_code.png")

n00bz{qr_c0d3_1n_4_csv_f1l3_w0w!!!}

分类:MISC
image
作者:Kyrie-Lrving

41

提交

0

收入

相关WriteUP

问题反馈