Automation

Post Reply
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Automation

Post 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
troy7519
Posts: 1
Joined: Sat Oct 04, 2008 5:01 am

Post by troy7519 »

What is an http request?
burnpanck
Posts: 5
Joined: Mon Sep 14, 2009 6:32 pm

HTTP Error 414: Request-URI Too Large

Post 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?)
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post 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!
burnpanck
Posts: 5
Joined: Mon Sep 14, 2009 6:32 pm

Post 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:
User avatar
baha'a
Posts: 88
Joined: Sat Jan 02, 2010 12:51 am

Post 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
User avatar
baha'a
Posts: 88
Joined: Sat Jan 02, 2010 12:51 am

Post 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
User avatar
baha'a
Posts: 88
Joined: Sat Jan 02, 2010 12:51 am

Post by baha'a »

I posted one

I didn't know that I have to write the username and password without the tags "<>"
MrTerry
Posts: 34
Joined: Tue Jan 26, 2010 11:44 am

Post 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
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

Indexing starts at 0,0 which is in the top left corner
Tron
Posts: 30
Joined: Fri Oct 22, 2010 6:59 pm

Post 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.
User avatar
LudemeGames
Posts: 6
Joined: Fri Dec 04, 2015 9:11 pm
Location: Austin, TX
Contact:

Post 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.
Post Reply