48 lines
1.2 KiB
Python
48 lines
1.2 KiB
Python
|
#!/usr/bin/python
|
||
|
|
||
|
|
||
|
from PIL import Image
|
||
|
|
||
|
# Load Image
|
||
|
im = Image.open('Teaser.png')
|
||
|
offsetX = 154
|
||
|
offsetY = 183
|
||
|
imageSize = 180
|
||
|
|
||
|
# Crop Image
|
||
|
im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data.png")
|
||
|
|
||
|
# Braillecode
|
||
|
string = "http://bit.ly/2TJvxHt"
|
||
|
# forwared to https://hackvent.hacking-lab.com/T34s3r_MMXVIII/index.php?flag=UI18-GAUa-lXhq-htyV-w2Wr-0yiV
|
||
|
# decoded ROT13: https://hackvent.hacking-lab.com/T34s3r_MMXVIII/index.php?flag=HV18-TNHn-yKud-uglI-j2Je-0lvI
|
||
|
|
||
|
# Second Image
|
||
|
im = Image.open('Teaser2.png')
|
||
|
im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data2.png")
|
||
|
|
||
|
# follow the white rabbit ...
|
||
|
# rushed by ...
|
||
|
|
||
|
# HACKvent 2018
|
||
|
# .... ...- .---- ---.. -....- --. --- .-. .. -....- --.. .-. ... -... -....- ..- ..-. .- . -....- - ... -.... -.-. -....- -.-. ...- - -
|
||
|
# 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)
|
||
|
|
||
|
# im.save('pdf_data_decrypted.png')
|