Page 1 of 1

Automation

Posted: Thu May 10, 2007 9:59 pm
by adum
Like all our puzzles, this is designed to be solved by a computer past a certain point.

Accessing your current level
The URL for the puzzle is http://www.hacker.org/coil/index.php
The URL will accept parameters in the query part of the URL that correspond to your registered account:
name=<username>
password=<password>

Just making a normal HTTP request to the above URL with your name and password will retrieve the current puzzle. To parse this information, look for the line that says FlashVars="...". inside the quotes are params separated by ampersands. he board parameter is the map, where an X is a blocked spot and a dot is an empty one. It's all one string, but you can break it up knowing boardX. (The first boardX characters make the first row, etc.)



Submit a Solution via an HTTP GET:


To submit a solution, use the following parameter:
path=<moves>
x=<starting x coordinate>
y=<starting y coordinate>
where the moves are a list of 'D', 'R', 'U', or 'L' for down, right, up, or left.
For example, to submit a solution where your solution went {down, right, up} from one square over and two down, you would do an HTTP GET on the following URL:

Code: Select all

http://www.hacker.org/coil/index.php?name=<username>&password=<password>&path=DRU&x=1&y=2

Posted: Sat Oct 04, 2008 5:46 am
by troy7519
What is an http request?

HTTP Error 414: Request-URI Too Large

Posted: Tue Oct 13, 2009 2:19 pm
by burnpanck
At the higher levels I am unable to submit a solution with the method described here, as the path gets rather long, too long for a GET. The server answers with "HTTP Error 414: Request-URI Too Large". If I send my solution as a POST, it gets just silently ignored. (Note: I identify myself using the forum cookie, not by name=<username>&password=<password>, is this a problem?)

Posted: Tue Oct 13, 2009 10:10 pm
by adum
hi, you probably can't use the forum cookie when submitting with POST. try sending your name and pw with the solution, or use name + spw for more security.

by the way, nice job getting so far so fast!

Posted: Wed Oct 14, 2009 1:14 am
by burnpanck
Thank you!
That was it indeed. I thought I had tried with normal user and password, however I realise there I did send the cookie as well. Very embarassing, one would suppose a hacker would find that on his own.. :oops:

Posted: Sat Jan 09, 2010 9:45 am
by baha'a
hi

I really realize that how much fun is that

I don't know (still) how to do all these stuff but I hope I will soon

I tried to send a false solution just to test the method but the browser says "invalid user"

I tried to put %27 instead of ' in my user name but it didn't work

Posted: Sun Jan 10, 2010 9:50 am
by baha'a
well never mind

I'm sorry I thought http request was made just by typing these stuff (user name,password,path) in the URL bar in my browser.

but I realized that it's made by a programming language (well this makes more sense :? )

I'm sorry I'm subscribed to a hacker community and I'm still not close to be called a hacker

so I'll keep silence for sometime till I gain the knowledge

thanks

Posted: Mon Jan 11, 2010 5:57 am
by baha'a
I posted one

I didn't know that I have to write the username and password without the tags "<>"

Posted: Thu Apr 29, 2010 2:59 pm
by MrTerry
hi @ all

two simple questions :

the position is in range 0-? or 1-? ?

and

where is 0.0? (or 1.1?) upper left?

btw really thnx for this awesone site.... it took my life (by now) nearly about half a year away.... but that was it worth :D

Posted: Thu Apr 29, 2010 4:55 pm
by CodeX
Indexing starts at 0,0 which is in the top left corner

Posted: Tue Aug 16, 2011 7:27 am
by Tron
There is an alternative form for the answer, which is about factor five shorter. Instead of sending every direction change, you only send direction changes at T-crossings and leave them out for corners. This is mandatory from level 1171 onwards, because the web server drops answers longer than 1.000.000 bytes. The variable name is "qpath" instead of "path".
Here's an example:
adum wrote:

Code: Select all

XXXXXX
X....X
X.X..X
X....X
XXXXXX
the solution would be x=2&y=3&qpath=L
since there are no choices after the first move.

Posted: Tue Apr 05, 2016 11:16 pm
by LudemeGames
One small note about qpath - The first direction is required, regardless of whether or not the solution has a choice.

For example, level 12 is
Puzzle: "x=7&y=7&board=.............X....X...XX.......X.......XX...X...."
Solution: "&x=6&y=0&qpath=LU"
The qpath formatted solution requires L even though the start point only has one adjacent cell.