This commit is contained in:
Roman Hergenreder
2018-12-07 13:52:13 +01:00
parent 1b071a46e8
commit aa56104b3f
54 changed files with 684 additions and 1086 deletions

View File

@@ -1,914 +0,0 @@
/Artifact <</Attached [/Bottom]/Type/Pagination/Subtype/Footer>> BDC /GS6 gs
q
-0.000005282 0.00024414 595.32 841.92 re
W* n
662.3 0 0 225.65 -29.35 1.5479 cm
/Image5 Do Q
EMC /Artifact <</Attached [/Top]/Type/Pagination/Subtype/Header>> BDC q
0.000008871 0 595.32 841.92 re
W* n
BT
/F1 11.04 Tf
1 0 0 1 70.944 796.08 Tm
0 g
/GS9 gs
0 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
Q
EMC /Artifact <</Attached [/Bottom]/Type/Pagination/Subtype/Footer>> BDC q
0.000008871 0 595.32 841.92 re
W* n
BT
/F1 11.04 Tf
1 0 0 1 70.944 38.4 Tm
0 g
0 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
Q
EMC /P <</MCID 0>> BDC 1 g
70.9 268.58 464.2 463.15 re
f*
0.75 w
0 G
70.9 268.58 464.2 463.15 re
S
EMC q
71.304 268.82 463.54 462.55 re
W* n
/P <</MCID 1>> BDC q
71.304 268.82 463.54 462.55 re
W* n
BT
/F1 11.04 Tf
1 0 0 1 537.84 264.74 Tm
0 g
0 G
[( )] TJ
ET
Q
Q
EMC /P <</MCID 2>> BDC q
71.28 268.92 463.44 462.48 re
W* n
463.15 0 0 463.15 72.75 266.72 cm
/Image10 Do Q
q
71.34 268.86 463.44 462.48 re
W* n
2 w
1 j
71.75 265.72 465.15 465.15 re
S
Q
EMC /P <</MCID 3>> BDC q
0.000008871 0 595.32 841.92 re
W* n
BT
/F2 20.04 Tf
1 0 0 1 211.49 749.02 Tm
0 g
0 G
[(HACKven)5(t )5(20)5(18)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F1 20.04 Tf
1 0 0 1 383.83 749.02 Tm
0 g
0 G
[( )] TJ
ET
Q
EMC /P <</MCID 4>> BDC q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 70.944 254.66 Tm
1 g
1 G
[(.... ...)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 94.944 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 98.904 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 101.9 254.66 Tm
1 g
1 G
[(.)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 104.9 254.66 Tm
1 g
1 G
[(--)6(-)-6(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 120.86 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 123.86 254.66 Tm
1 g
1 G
-0.036 Tc[(---)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 135.74 254.66 Tm
1 g
1 G
[(.. )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 144.86 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 148.82 254.66 Tm
1 g
1 G
[(....)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 160.82 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 164.78 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 167.78 254.66 Tm
1 g
1 G
0.084 Tc[(--)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 175.85 254.66 Tm
1 g
1 G
[(. )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 181.85 254.66 Tm
1 g
1 G
[(--)-3(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 193.85 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 196.85 254.66 Tm
1 g
1 G
[(.)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 199.85 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 203.81 254.66 Tm
1 g
1 G
[(. .. )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 218.81 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 222.77 254.66 Tm
1 g
1 G
[(....)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 234.77 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 238.73 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 241.85 254.66 Tm
1 g
1 G
-0.036 Tc[(--)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 249.77 254.66 Tm
1 g
1 G
[(.. .)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 261.77 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 265.73 254.66 Tm
1 g
1 G
[(. ... )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 283.73 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 287.71 254.66 Tm
1 g
1 G
[(... )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 299.83 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 303.79 254.66 Tm
1 g
1 G
[(..)-9(..)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 315.91 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 319.87 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 322.87 254.66 Tm
1 g
1 G
[(..)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 328.87 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 332.83 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 335.83 254.66 Tm
1 g
1 G
[(..)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 341.83 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 345.79 254.66 Tm
1 g
1 G
[(. .)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 354.79 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 358.75 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 361.75 254.66 Tm
1 g
1 G
[(. )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 367.87 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 371.83 254.66 Tm
1 g
1 G
[(....)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 383.83 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 387.79 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 390.79 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 394.75 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 397.75 254.66 Tm
1 g
1 G
[(... )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 409.78 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 413.74 254.66 Tm
1 g
1 G
[(.... )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 428.86 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 432.82 254.66 Tm
1 g
1 G
[(.)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 435.82 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 439.78 254.66 Tm
1 g
1 G
[(. )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 445.78 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 449.74 254.66 Tm
1 g
1 G
[(....)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 461.74 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 465.7 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 468.82 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 472.78 254.66 Tm
1 g
1 G
[(.)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 475.78 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 479.74 254.66 Tm
1 g
1 G
[(. ...)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 494.74 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 498.7 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 501.7 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 505.66 254.66 Tm
1 g
1 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 508.78 254.66 Tm
1 g
1 G
[(-)] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 512.74 254.66 Tm
0 g
0 G
[( )] TJ
ET
Q
q
0.000008871 0 595.32 841.92 re
W* n
BT
/F3 12 Tf
1 0 0 1 515.88 254.66 Tm
0 g
0 G
[( )] TJ
ET
Q
EMC /P <</MCID 5>> BDC q
0.000008871 0 595.32 841.92 re
W* n
BT
/F1 11.04 Tf
1 0 0 1 70.944 227.54 Tm
0 g
0 G
[( )] TJ
ET
Q
EMC /P <</MCID 6>> BDC q
0.000008871 0 595.32 841.92 re
W* n
BT
/F1 11.04 Tf
1 0 0 1 70.944 205.1 Tm
0 g
0 G
[( )] TJ
ET
Q
EMC /P <</MCID 7>> BDC 79.4 277.67 447 444.85 re
f*
1.5 w
79.4 277.67 447 444.85 re
S
EMC q
80.184 281.93 445.54 436.25 re
W* n
/P <</MCID 8>> BDC q
80.184 281.93 445.54 436.25 re
W* n
BT
/F1 11.04 Tf
1 0 0 1 525.84 279.77 Tm
0 g
0 G
[( )] TJ
ET
Q
Q
EMC /P <</MCID 9>> BDC q
87.36 282 431.04 436.2 re
W* n
438.4 0 0 438.4 87.35 279.77 cm
/Image15 Do Q
EMC

View File

Binary file not shown.

View File

@@ -1,18 +0,0 @@
22 0 26 51 27 107 25 158 28 227 30 283 31 334 29 390 32 459 33 515 34 566 35 617 21 668 17 771 18 862 19 1098 20 1121 23 1136 <</P 21 0 R/S/P/Type/StructElem/K[ 3] /Pg 3 0 R>>
<</P 25 0 R/S/Figure/Type/StructElem/K[ 7] /Pg 3 0 R>>
<</P 25 0 R/S/P/Type/StructElem/K[ 8] /Pg 3 0 R>>
<</P 21 0 R/S/Textbox/Type/StructElem/K[ 26 0 R 27 0 R] /Pg 3 0 R>>
<</P 21 0 R/S/Figure/Type/StructElem/K[ 9] /Pg 3 0 R>>
<</P 29 0 R/S/P/Type/StructElem/K[ 1] /Pg 3 0 R>>
<</P 29 0 R/S/Figure/Type/StructElem/K[ 0] /Pg 3 0 R>>
<</P 21 0 R/S/Textbox/Type/StructElem/K[ 30 0 R 31 0 R] /Pg 3 0 R>>
<</P 21 0 R/S/Figure/Type/StructElem/K[ 2] /Pg 3 0 R>>
<</P 21 0 R/S/P/Type/StructElem/K[ 4] /Pg 3 0 R>>
<</P 21 0 R/S/P/Type/StructElem/K[ 5] /Pg 3 0 R>>
<</P 21 0 R/S/P/Type/StructElem/K[ 6] /Pg 3 0 R>>
<</P 17 0 R/S/Document/Type/StructElem/K[ 22 0 R 25 0 R 28 0 R 29 0 R 32 0 R 33 0 R 34 0 R 35 0 R] >>
<</Type/StructTreeRoot/RoleMap 18 0 R/ParentTree 19 0 R/K[ 21 0 R] /ParentTreeNextKey 1>>
<</Footnote/Note/Endnote/Note/Textbox/Sect/Header/Sect/Footer/Sect/InlineShape/Sect/Annotation/Sect/Artifact/Sect/Workbook/Document/Worksheet/Part/Macrosheet/Part/Chartsheet/Part/Dialogsheet/Part/Slide/Part/Chart/Sect/Diagram/Figure>>
<</Nums[ 0 23 0 R] >>
<</Names[] >>
[ 31 0 R 30 0 R 32 0 R 22 0 R 33 0 R 34 0 R 35 0 R 26 0 R 27 0 R 28 0 R]

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,55 +0,0 @@
#!/usr/bin/python
from PIL import Image
from qrtools import QR
import itertools
img = Image.open('QR3C.png')
pixels_orig = img.load()
(w,h)=img.size
outimg = Image.new( 'RGB', (23,23), "white")
pixels_out = outimg.load()
for i in range(0,h,6):
for j in range(0,w,6):
(r,g,b) = pixels_orig[j,i]
if((r,g,b)==(255,255,255)):
pixels_out[j/13,i/13]=(255,255,255)
elif((r,g,b)==(0,0,0) or r>0 ):
pixels_out[j/13,i/13]=(0,0,0)
# bruteforce missing section until readable
count=0
for i in itertools.product('01', repeat=60):
count+=1
if count%1000 ==0:
print count
for x in range(1,12):
for y in range (10,14):
if( i[((y-10)%4)*11 + x] == '0' ):
pixels_out[x,y]=(0,0,0)
outimg=outimg.resize((300,300))
outimg.save("dec17_out.png","png")
# read qr code
nugget=''
myCode = QR(filename="dec17_out.png")
if myCode.decode():
nugget=myCode.data_to_string()
print nugget
break
#else:
# print "could not decode"
#break

View File

@@ -1,91 +0,0 @@
#!/usr/bin/python
from PIL import Image
def invert(value):
return ''.join(["1" if x == "0" else "0" for x in value])
# Load Image
im = Image.open('QR3C_cropped.png')
# im.crop((33, 34, 264, 265)).save("QR3C_cropped.png")
pix = im.load()
tiles = 21
tileSize = im.size[0] // tiles
version = (tiles - 17) // 4
data = [[0 for x in range(tiles)] for y in range(tiles)]
print("tiles=%d tileSize=%d version=%d" % (tiles, tileSize, version))
for x in range(tiles):
for y in range(tiles):
x_mid = x * tileSize + 0.5 * tileSize
y_mid = y * tileSize + 0.5 * tileSize
color = pix[x_mid, y_mid]
# print(x, y, x_mid, y_mid, color)
data[x][y] = invert("%d%d%d" % ( color[0] // 255, color[1] // 255, color[2] // 255 ))
# print(data)
def blackWhiteValue(string):
new_value = ""
if len(string) % 3 != 0:
print("Cannot return black white value of", string)
return new_value
for i in range(len(string) // 3):
new_value += string[i * 3]
return new_value
mask1 = [data[8][18], data[8][17], data[8][16]]
mask2 = [data[2][8], data[3][8], data[4][8]]
if mask1 != mask2:
print("masks do not match")
exit()
# mask = [mask1[0][0] + mask1[1][0] + mask[2][0],]
mask = [''.join(mask1[i][j] for i in range(3)) for j in range(3)]
print("Mask:", mask)
def apply_mask(x, y, bit, mask):
doInvert = False
if mask == "111":
doInvert = x % 3 == 0
elif mask == "110":
doInvert = (x + y) % 3 == 0
elif mask == "101":
doInvert = (x + y) % 2 == 0
elif mask == "100":
doInvert = y % 2 == 0
elif mask == "000":
doInvert = ((x*y) % 2) + ((x + y) % 3) == 0
return invert(bit) if doInvert else bit
def get_masked_value(x, y):
return ''.join([apply_mask(x, y, data[x][y][i], mask[i]) for i in range(3)])
def read_block(x, y, orientation):
indizes = []
if orientation == "UP":
indizes = [[0,0], [-1,0], [0,-1], [-1,-1], [0,-2], [-1,-2], [0, -3], [-1, -3]]
elif orientation == "LEFT":
indizes = [[0,0], [-1,0], [0,-1], [-1,-1], [-2,-1], [-3,-1], [-2, 0], [-3, 0]]
return ''.join([get_masked_value(x + offset[0], y + offset[1]) for offset in reversed(indizes)])
encoding = blackWhiteValue(data[20][20] + data[19][20] + data[20][19] + data[19][19])
print("Encoding:", encoding)
# Alphanumeric? 11 bits per 2 character
# for y in range(tiles):
# print(''.join(data[y]))
block1 = read_block(20, 14, "UP")
block2 = read_block(20, 10, "LEFT")
print(block1, len(block1))
print(block2, len(block2))

View File

File diff suppressed because one or more lines are too long

View File

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -7,13 +7,24 @@ However, his team's memory capacity is limited and so he can only use
their names (Dasher, Dancer, Prancer, Vixen, Comet, Cupid, Donder and
Blitzen) as keys.
Dasher
Dancer
Prancer
Vixen
Comet
Cupid
Donder
Blitzen
Where is the team headed to?
STTYN YATLOEP DNEA ONBL TGNTO MHEHH EISTIARIB FHSRA LD IIONA NL HERUV LN17-PTAA-RTON-RDOE-MCTN-AHCO
XXXXX XXXXXXX XXXX XXXX XXXXX XXXXX XXXXXXXXX XXXXX XX XXXXX XX XXXXX HV18-XXXX-XXXX-XXXX-XXXX-XXXX
DDPVCCDB
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
L -> H
N -> V
STTYN YATLOEP DNEA ONBL TGNTO MHEHH EISTIARIB FHSRA LD IIONA NL HERUV LN17-PTAA-RTON-RDOE-MCTN-AHCO
-4 +8 +0 +1
6 I A B
W I A B
5 H 9 A
-0100 +1000 +0000 +0001

View File

@@ -0,0 +1,147 @@
#!/usr/bin/python
from PIL import Image
def invert(value):
return ''.join(["1" if x == "0" else "0" for x in value])
# Load Image
im = Image.open('QR3C_cropped.png')
pix = im.load()
tiles = 21
tileSize = im.size[0] // tiles
version = (tiles - 17) // 4
print("tiles=%d tileSize=%d version=%d" % (tiles, tileSize, version))
# Data Array
data = [[0 for x in range(tiles)] for y in range(tiles)]
# Fill data
# Black -> 111
# White -> 000
# Blue -> 110 ...
for y in range(tiles):
for x in range(tiles):
x_mid = x * tileSize + 0.5 * tileSize
y_mid = y * tileSize + 0.5 * tileSize
color = pix[x_mid, y_mid]
data[x][y] = invert("%d%d%d" % ( color[0] // 255, color[1] // 255, color[2] // 255 ))
def blackWhiteValue(string):
new_value = ""
if len(string) % 3 != 0:
print("Cannot return black white value of", string)
return new_value
for i in range(len(string) // 3):
new_value += string[i * 3]
return new_value
mask1 = [data[8][18], data[8][17], data[8][16]]
mask2 = [data[2][8], data[3][8], data[4][8]]
if mask1 != mask2:
print("masks do not match")
exit()
mask = [''.join(mask1[i][j] for i in range(3)) for j in range(3)]
print("Mask:", mask)
def apply_mask(x, y, bit, mask):
doInvert = False
if mask == "111":
doInvert = x % 3 == 0
elif mask == "110":
doInvert = (x + y) % 3 == 0
elif mask == "101":
doInvert = (x + y) % 2 == 0
elif mask == "100":
doInvert = y % 2 == 0
elif mask == "000":
doInvert = ((x*y) % 2) + ((x + y) % 3) == 0
return invert(bit) if doInvert else bit
def get_masked_value(x, y):
return ''.join([apply_mask(x, y, data[x][y][i], mask[i]) for i in range(3)])
def read_block(x, y, orientation):
indizes = []
if orientation == "UP":
indizes = [[0,0], [-1,0], [0,-1], [-1,-1], [0,-2], [-1,-2], [0, -3], [-1, -3]]
elif orientation == "LEFT_TOP":
indizes = [[0,0], [-1,0], [0,-1], [-1,-1], [-2,-1], [-3,-1], [-2, 0], [-3, 0]]
elif orientation == "DOWN":
indizes = [[0,0], [-1,0], [0,1], [-1,1], [0,2], [-1,2], [0, 3], [-1, 3]]
elif orientation == "LEFT_BOTTOM":
indizes = [[0,0], [-1,0], [0,1], [-1,1], [-2,1], [-3,1], [-2, 0], [-3, 0]]
return (''.join([get_masked_value(x + offset[0], y + offset[1]) for offset in indizes]))
def map_alphanumeric(x):
if x < 10:
return chr(ord('0') + x)
elif x < 36:
return chr(ord('A') + x - 10)
else:
special = { 36: " ", 37: "$", 38: "%", 39: "*", 40: "+", 41: "-", 42: ".", 43: "/", 44: ":" }
if x in special:
return special[x]
else:
print("unknown special character:", x)
return "?"
def decode_alphanumeric(x):
a = x // 45
b = x % 45
return map_alphanumeric(a) + map_alphanumeric(b)
encoding = blackWhiteValue(data[20][20] + data[19][20] + data[20][19] + data[19][19])
# encoding = data[20][20] + data[19][20] + data[20][19] + data[19][19]
# encoding = [get_masked_value(20, 20), get_masked_value(19, 20), get_masked_value(20, 19), get_masked_value(19, 19)]
print("Encoding:", encoding)
len_block = read_block(20, 18, "UP")
print("Length:", int(len_block, 2))
# 19 Blocks
blocks = ''.join([
read_block(20, 14, "UP"),
read_block(20, 10, "LEFT_TOP"),
read_block(18, 11, "DOWN"),
read_block(18, 15, "DOWN"),
read_block(18, 19, "LEFT_BOTTOM"),
read_block(16, 18, "UP"),
read_block(16, 14, "UP"),
read_block(16, 10, "LEFT_TOP"),
read_block(14, 11, "DOWN"),
read_block(14, 15, "DOWN")
])
channels = ["", "", ""]
blockSize = 3
for i in range(len(blocks) // blockSize):
channels[0] += blocks[i*3]
channels[1] += blocks[i*3+1]
channels[2] += blocks[i*3+2]
# chunk = int(blocks[blockSize*i:blockSize*i+blockSize],2)
# string += chr(chunk)
# string += decode_alphanumeric(chunk)
line = ""
for c in channels:
for i in range(len(c) // 8):
line += chr(int(c[i*8:i*8+8], 2))
print(line)
# print(len(blocks) /8)
# print(''.join(blocks))
# for x in range(tiles):
# print(''.join(data[x]))

View File

Before

Width:  |  Height:  |  Size: 514 KiB

After

Width:  |  Height:  |  Size: 514 KiB

View File

@@ -1 +0,0 @@
ZOoxjUSe1OVB7OPoVrsX.pdf