Progress?
This commit is contained in:
34
Teaser/decode.py
Normal file → Executable file
34
Teaser/decode.py
Normal file → Executable file
@@ -25,23 +25,31 @@ im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data2.pn
|
||||
# rushed by ...
|
||||
|
||||
# HACKvent 2018
|
||||
# pdf file name: ZOoxjUSe1OVB7OPoVrsX
|
||||
# .... ...- .---- ---.. -....- --. --- .-. .. -....- --.. .-. ... -... -....- ..- ..-. .- . -....- - ... -.... -.-. -....- -.-. ...- - -
|
||||
# Morse code: HV18-GORI-ZRSB-UFAE-TS6C-CVTT
|
||||
im = Image.open('pdf_data.png')
|
||||
pix = im.load()
|
||||
size = im.size
|
||||
|
||||
# pixels = []
|
||||
#
|
||||
# for x in range(size[0]):
|
||||
# for y in range(size[1]):
|
||||
#
|
||||
# if pix[x,y] not in pixels:
|
||||
# pixels.append(pix[x,y])
|
||||
#
|
||||
# r = 255 - pix[x,y][0]
|
||||
# g = 255 - pix[x,y][1]
|
||||
# b = 255 - pix[x,y][2]
|
||||
# pix[x,y] = (r,g,b,255)
|
||||
# Count Pixel types
|
||||
pixels = []
|
||||
for x in range(size[0]):
|
||||
for y in range(size[1]):
|
||||
|
||||
# im.save('pdf_data_decrypted.png')
|
||||
p = pix[x,y]
|
||||
if p not in pixels:
|
||||
pixels.append(p)
|
||||
|
||||
print(pixels)
|
||||
|
||||
# Filter
|
||||
# for p in pixels:
|
||||
# im = Image.open('pdf_data.png')
|
||||
# pix = im.load()
|
||||
# for x in range(size[0]):
|
||||
# for y in range(size[1]):
|
||||
# if p != pix[x,y]:
|
||||
# pix[x,y] = (255,255,255,255)
|
||||
#
|
||||
# im.save('pdf_data_decrypted_%d-%d-%d.png' % (p[0], p[1], p[2]))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 MiB |
BIN
Teaser/pdf_decrypted.png
Normal file
BIN
Teaser/pdf_decrypted.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 724 KiB |
BIN
Teaser/pdf_overlay.bmp
Normal file
BIN
Teaser/pdf_overlay.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
Reference in New Issue
Block a user