Tags: irc 

Rating:

The player is presented with a website that allows deployment of an IRC bot to any IRC channel on Freenode, with the option to provide a channel password. The bot joins the specified channel, and allows the command "!flag", which takes a single argument.

<span><span>

< indifferent1625> Before you join the future of IRC, you must prove yourself worthy. !flag. This conversation may be <span>monitored.
</span></span><span>< ufurnace> !flag bbb
</span><span>< indifferent6793> You are still too distant from ascending. 12

</span></span><span>For native English speakers, this is an odd way to say "Wrong flag." We also see a number at the end. We try some more junk, and occasionally see different numbers. As it turns out, this number is called "bytewise edit distance" or "levenshtein distance". It represents the number of bytes we need to add, remove, and change to get from one set of bytes to another. Given enough queries, we can learn the secret.

First, we learn the length of the secret and the character set in use by cycling through single characters. The edit distance from a single character can be either the length of the secret minus one (meaning the character appears in the secret) or the exact length of the secret (meaning that the character does not appear in the secret. For various characters, we receive the answers '11' and '12'. As such, the secret must be 12 characters long, with the character set [</span>Fadglrs018].
<span>
We progress to a binary tree algorithm to determine where each character appears in the secret by splitting up the candidate secret into half characters we know appear in the secret and half which do not, narrowing each section until we determine exactly where the character does and does not appear:

</span><span><span><ufurnace> !flag aaaaaabbbbbb
</span><span><indifferent6793> You are still too distant from ascending. 12
</span><span><ufurnace> !flag bbbbbbaaaaaa
</span><span><indifferent6793> You are still too distant from ascending. 11
</span><span><ufurnace> !flag bbbbbbbbbaaa
</span><span><indifferent6793> You are still too distant from ascending. 12
</span><span><ufurnace> !flag bbbbbbaaabbb
</span><span><indifferent6793> You are still too distant from ascending. 11
</span><span><ufurnace> !flag bbbbbbaabbbb
</span><span><indifferent6793> You are still too distant from ascending. 11
</span><span><ufurnace><span> !flag bbbbbbabbbbb
</span></span><span><indifferent6793><span> You are still too distant from ascending. 11
</span></span></span>
Above, we learn that 'a' appears once, in the seventh byte position. Eventually, we learn the full secret and submit it to the bot, which gives us the flag:

<span><span><ufurnace<span>> !flag Fl0r1da1sgr8
</span></span><indifferent1625> Ascension adequate. Your points: sun{internet_relay_meme}</span>