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")
QRazy CSV
Kyrie-Lrving 2024-11-04 11:36:01 12 0
作者:Kyrie-Lrving
40
提交0
收入相关WriteUP
-
SusCTF2017-Crack Zip
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 3年前
-
SusCTF2017-misc1 Writeup
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 3年前
-
2018-网鼎杯-mirror
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 1年前
-
强网先锋打野
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 1年前
-
被加密的生产流量
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 1年前