commit dd508a8100062f81228fc1520ae0e45cc2fd172b Author: Roman Hergenreder Date: Tue Dec 4 12:54:01 2018 +0100 Initial Commit diff --git a/Day 1/HV18_Ball_Day1_color.png b/Day 1/HV18_Ball_Day1_color.png new file mode 100644 index 0000000..7faf8c3 Binary files /dev/null and b/Day 1/HV18_Ball_Day1_color.png differ diff --git a/Day 1/data.png b/Day 1/data.png new file mode 100644 index 0000000..b85cc9c Binary files /dev/null and b/Day 1/data.png differ diff --git a/Day 1/decode.py b/Day 1/decode.py new file mode 100644 index 0000000..269a7d8 --- /dev/null +++ b/Day 1/decode.py @@ -0,0 +1,14 @@ +#!/usr/bin/python + +from PIL import Image + +# Load Image +im = Image.open('HV18_Ball_Day1_color.png') +offsetX = 307 +offsetY = 362 +imageSize = 364 + +# Crop Image +im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data.png") + +# Go on https://jabcode.org/scan/ and upload image :] diff --git a/Day 2/decode.py b/Day 2/decode.py new file mode 100644 index 0000000..9ff42c6 --- /dev/null +++ b/Day 2/decode.py @@ -0,0 +1,34 @@ +#!/usr/bin/python + +import urllib.request +import urllib.parse +import base64 + +with open("input.txt", "r") as content_file: + content = content_file.read().replace("\n", "") + data = content.split(" ") + + # Octal Bytes -> Decimal + data_oct = [int(c,8) for c in data] + + # Decimal -> Ascii + string = ''.join(chr(i) for i in data_oct) + + # Ascii -> Base32 + string = base64.b32decode(string, casefold=False).decode("utf-8") + + # Base32 -> 14-Segment-Code + url = "https://kryptografie.de/cgi-bin/MysteryMaster.exe" + params = { + "app": "Kryptografie.de", + "user": "", + "pass": "", + "chiffre": "14-Segment", + "opnum": 2, + "key": "", + "code": string + } + + response = urllib.request.urlopen(url, urllib.parse.urlencode(params, True).encode('utf-8')) + result = response.read().decode('utf-8').replace("%0D%0A", "") + print(result) diff --git a/Day 2/input.txt b/Day 2/input.txt new file mode 100644 index 0000000..f9483db --- /dev/null +++ b/Day 2/input.txt @@ -0,0 +1 @@ +115 112 122 127 113 132 124 110 107 106 124 124 105 111 104 105 115 126 124 103 101 131 124 104 116 111 121 107 103 131 124 104 115 122 123 127 115 132 132 122 115 64 132 103 101 132 132 122 115 64 132 103 101 131 114 113 116 121 121 107 103 131 124 104 115 122 123 127 115 63 112 101 115 106 125 127 131 111 104 103 115 116 123 127 115 132 132 122 115 64 132 103 101 132 132 122 115 64 132 103 101 131 114 103 115 116 123 107 113 111 104 102 115 122 126 107 127 111 104 103 115 116 126 103 101 132 114 107 115 64 131 127 125 63 112 101 115 64 131 127 117 115 122 101 115 106 122 107 107 132 104 106 105 102 123 127 115 132 132 122 116 112 127 123 101 131 114 104 115 122 124 124 105 62 102 101 115 106 122 107 107 132 104 112 116 121 121 107 117 115 114 110 107 111 121 107 103 131 63 105 115 126 124 107 117 115 122 101 115 106 122 107 113 132 124 110 107 106 124 124 105 111 104 102 115 122 123 127 115 132 132 122 115 64 132 103 101 131 114 103 115 116 123 107 117 115 124 112 116 121 121 107 117 115 114 110 107 111 121 107 103 131 63 105 115 126 124 107 117 115 122 101 115 106 122 107 107 132 104 106 105 102 121 127 105 132 114 107 115 64 131 127 117 115 122 101 115 112 122 127 111 132 114 107 105 101 75 75 75 75 75 75 diff --git a/Day 4/decode.py b/Day 4/decode.py new file mode 100644 index 0000000..bd3b520 --- /dev/null +++ b/Day 4/decode.py @@ -0,0 +1,37 @@ +#!/usr/bin/python + +pirates = ['0' for i in range(48)] + +p = ''.join(pirates) +s = '::)"<.vd]!&a{":r>Qyh 7'; +length = len(s) + +f='HV18-'; + +def subnum(i): + return int(p[i*2:i*2+2]) + +for i in range(length): + a = ord(s[i]) + b = subnum(i) + f += chr(a ^ b) + +print(f) + +# indizes: 4, 9, 14, 19 +# xxxx-xxxx-xxxx-xxxx +correctKey = "00000000" +for i in range(4): + pos = 4 + i*5 + key = ord(s[pos]) ^ ord('-') + correctKey += "%02d%s" % (key, "00000000") + +data = [correctKey[i:i+4] for i in range(0, len(correctKey), 4)] + +print(correctKey) +print(data) + +js = "" +for i in range(len(data)): + js += "document.getElementById('pirate%02d').value='%s';\n" % (i + 1, data[i]) +print(js) diff --git a/Teaser/Teaser.png b/Teaser/Teaser.png new file mode 100644 index 0000000..ac1c10e Binary files /dev/null and b/Teaser/Teaser.png differ diff --git a/Teaser/Teaser2.png b/Teaser/Teaser2.png new file mode 100644 index 0000000..f8b08cd Binary files /dev/null and b/Teaser/Teaser2.png differ diff --git a/Teaser/ZOoxjUSe1OVB7OPoVrsX.pdf b/Teaser/ZOoxjUSe1OVB7OPoVrsX.pdf new file mode 100644 index 0000000..77010bc Binary files /dev/null and b/Teaser/ZOoxjUSe1OVB7OPoVrsX.pdf differ diff --git a/Teaser/data.png b/Teaser/data.png new file mode 100644 index 0000000..0d41e45 Binary files /dev/null and b/Teaser/data.png differ diff --git a/Teaser/data2.png b/Teaser/data2.png new file mode 100644 index 0000000..27e7966 Binary files /dev/null and b/Teaser/data2.png differ diff --git a/Teaser/decode.py b/Teaser/decode.py new file mode 100644 index 0000000..ac0e5ed --- /dev/null +++ b/Teaser/decode.py @@ -0,0 +1,47 @@ +#!/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') diff --git a/Teaser/passphrase.txt b/Teaser/passphrase.txt new file mode 100644 index 0000000..d64cce8 --- /dev/null +++ b/Teaser/passphrase.txt @@ -0,0 +1 @@ +ZOoxjUSe1OVB7OPoVrsX.pdf diff --git a/Teaser/pdf_data.png b/Teaser/pdf_data.png new file mode 100644 index 0000000..9335c4e Binary files /dev/null and b/Teaser/pdf_data.png differ diff --git a/Teaser/pdf_data_decrypted.png b/Teaser/pdf_data_decrypted.png new file mode 100644 index 0000000..600e5c3 Binary files /dev/null and b/Teaser/pdf_data_decrypted.png differ diff --git a/Teaser/test.png b/Teaser/test.png new file mode 100644 index 0000000..13d77c1 Binary files /dev/null and b/Teaser/test.png differ