Posts Tagged ‘day 7’

Advent Of Code: Day 7

08 Dec 2015
CTF: Advent Of Code
Link to challenge:
Date Completed: 07 December 2015



Wow this one was fun! I decided to use Z3Py, a theorem prover module for python. My solution essentially parses each command using regexp and adds the various boolean rules to a solver object. Finally, the theorem solver checks all possible values and prints out the results of every ‘wire’. Determining the answer is then very simple. To solve part 2 I simply changed the value of b in my input.txt to the answer from part a and reran the script.


No Comments

Posted in Advent Of Code


HACKvent 2015: Day 7

07 Dec 2015
CTF: Hackvent 2015
Link to challenge:
Date Completed: 07 December 2015



This challenge was very easy to solve as I had completed the teaser earlier.

First I convert the hexadecimal number provided (as it starts with 0x) to binary.
The result is 625 bits (which does not divide nicely by 8 so it is probably not an ASCII message).

However, its likely to be a QR code version 2 which is 25×25 = 625 pixels large.
In this case, every 1 corresponds to a black pixel and every 0 corresponds to a white pixel.
This is obvious by arranging the bits into a 25 by 25 grid and adding some spacing :

I use the same script I used in the teaser (link) to generate a QR code.
This is the QR code generated (enlarged to 350px * 350px):

Day 7 QR Solution

We scan the QR code using a really clever online scanner (link) that has some extra error correcting capabilities (compared to other QR readers).
We get the flag:  HV15-aFsf-4ea1-2eGg-Llr4-pB5A


Posted in Hackvent 2015