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 55 0
作者:Kyrie-Lrving
41
提交0
收入相关WriteUP
-
SusCTF2017-Crack Zip
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 3年前
-
SusCTF2017-misc1 Writeup
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 3年前
-
一张含有信息的图片
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 1年前
-
traffic
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 1年前
-
Xp0intCTF-2017-重重flag背后隐藏的秘密
***收费WriteUP请购买后查看,VIP用户可免费查看***
- MISC
- 1年前