GitHub LinkedIn PGP CV

The Second Puzzle: I Love Ironman

Opening the second puzzle we are greeted with this beautiful Web 1.0 site.

Puzzle 2 site

After we bask in the glow of this site for a few minutes we remember that this is a puzzle hunt and start looking for clues.

The links in the headers are mostly red herrings, although we can see in the guestbook traces of other players trying some script injection attacks.

Puzzle 2 guestbook

At the bottom of the page there is some cryptic sounding text.

Jarvis Text

Let’s take a look at the HTML of this website to see if we can read this blocked off area.

Puzzle 2 HTML

That’s a lot of info, In fact it goes on for much longer than I show in that screenshot, there is over 700,000 characters of HTML in the hidden div on this site.

Let’s unhide it by removing the display:none attribute of the surrounding div.

Puzzle 2 Unhidden

Ok… This is not helpful.

Let’s take a closer look at the HTML, here’s some random samples.

<b class="llusthatthetargetyoupaidu" style="position:fixed;bottom:25px;">
<div style="position:fixed;top:791px;left:36px;">ht.Youareaveryrare</div>

Immediately we can see that the class names and text elements seem to be substrings of larger sentences. With a lot of Googling we can piece together that they are all excerpts from the script for Iron Man 1.

Unfortunately for us, this is another red herring, I wasted several hours collecting the script for Iron Man 1 and trying to form some sort of connection between the order that the substrings appear in the HTML and the script.
If for some reason you would like the entire script of Iron Man 1 compressed and stripped of special characters, you can get the fruits of my labour here.

The Solution

If we look back at the text on the original site we can see that it says

I bet Jarvis was just a bunch of IF statements strung together
Honestly if we could just untangle the internal workings we can find small bits of information
Like one character words?

Originally I thought this referred to the fact that all the HTML tags in the hidden HTML have single character names, a,b,c etc. There’s even a consistent mapping of class names to single character class names. But again, it turns out to be further distractions. As a last ditch effort I decided to see if I could find single character text elements in the HTML.

To my surprise, I found quite a few. Printing them out in-order of the HTML tree gave me this output

Thatwaseasy?Hereistheanswer.WithSPACES!ALLLOWERCAS flynn while moving

Great! There’s our answer, putting “flynn while moving” into the guesseract solves our second puzzle.

Side-note

I had written a Go application to parse the HTML file when I was trying all the different ideas I was having about class names, Iron Man 1 scripts, etc. I then used this to generate the final answer.

However if you thought of trying the real solution and didn’t want to write/use a HTML parser, you can solve this question with some linux primitives

grep -o '>.<' site.html | cut -c2-2 | tr -d '\n'

Outputs

Thatwaseasy?Hereistheanswer.WithSPACES!ALLLOWERCAS flynn while moving }E{

Let’s move onto puzzle 3