# SecuInside CTF Quals 2k14: Reversing - yayaya (100 points)


# xdotool getmouselocation
# while [ True ]; do import -window root -delay 0 -crop 400x388-0+112 `date +%d%m%y%H%M%S`-$RANDOM.png; sleep 0.1; done
# cat blend-point.py
from PIL import Image
from glob import glob

i2 = None

for f in glob('*.png'):
    i1 = Image.open(f).point(lambda i: 255 if i > 0 else i)
    if i2 is None:
    i2 = i1
    i2 = Image.blend(i1, i2, 0.5).point(lambda i: 255 if i > 0 else i)

#i2.show()
i2.save('result.png')
# convert -crop 330x70+0+0 result.png flag.png
# xxd -p flag.png | tr -d '\n'
89504e470d0a1a0a0000000d494844520000014a00000046010000000082e7e0670000000467414d410000b18f0bfc6105000000017352474200aece1ce9000000206348524d00007a26000080840000fa00000080e8000075300000ea6000003a98000017709cba513c00000002624b47440001dd8a13a4000000097048597300000048000000480046c96b3e0000000976704167000001900000018400f0ee97860000009e4944415448c7ed93410a42310c440772805ea890ab077aa11e2010271111dde842f9b5fe218b69fb3633a4c05724310c1deae8e2aba32606218ede5fc53a1a850e63b4f146acc3d18c25a362d12f8f3294715d7265d6464f9dfa45694c3814cd6422c2ae266f38e536479bf14aa67ab39cf209d451ff0105821c6ecf34111c6f5128ddee682e4716846aa78ac34359d81dcd0f734725ec795df6473faa0b51cd2729b92be3540000002574455874646174653a63726561746500323031342d30362d30355431393a35383a31332b30323a3030ee0ccf6a0000002574455874646174653a6d6f6469667900323031342d30362d30355431393a35383a31332b30323a30309f5177d60000000049454e44ae426082

No comments: