DRG Online Challenge December 2013
How DRG Constructed the Challenge
A Perl CGI form was presented at the following URL:
http[s]://dragonresearchgroup.org/cgi-bin/201312.cgi
An initial loading of that page presents a simple text input form with
the preceding text instructions:
Use F(n) and tell me F(n+1):
Upon a correct form submission the challenge will be solved.
Viewing the page source code will show one significant clue. In the
page source code, the following comment will be available:
Math geeks may recognize this as the start of a Fibonacci sequence.
Once you realize Fibonacci numbers play a role in this challenge, it
is a matter of interpreting what is being asked in the form. The form
tells the player to "use" and "tell" the solutions to two functions,
where one value is based on the unknown variable n and the other on
n plus one. In this context, to "use" a number is to set the source
port when accessing the page to one of the fibonacci numbers and enter
the next fibonnaci number into the form. Since a source port is a
limited interger number, the pair of Fibonacci numbers that this could
be is limited. In this case, n is 46368 and n+1 is 75025.
Just knowing these two values is only part of the challenge, you must
somehow use a particular source port while at the same time, entering
specific value into the form. There are a few ways this can be
accomplished. One easy way is to use a utility like curl that allows
you to set the source port value in the client connection, while
specifying the form input on the command line. The full command might
therefore look like this:
curl --local-port 46368 'https://dragonresearchgroup.org/cgi-bin/201312.cgi?input=75025&Submit=Submit&.action=check_input'
The source code for the CGI can be found here:
$Id: drg.txt,v 1.1 2014/02/03 19:57:42 root Exp $