Author |
Message |
paulw1128
Joined: 17 Dec 2010 Posts: 4
|
|
Stuck at level 91? (Server fault?) |
|
My new solver was just running through Crossflip and has gotten stuck at level 91.
I have a solution (529 characters long), but when I submit it, instead of getting back the page for level 92, I get level 91 again
If I try to warp to level 92 it tells me I can't, which suggests that my solution has been rejected either because it's wrong, or because of a problem server side.
My impression is that the server-side stuff is failing, because both these cases fail:
- a solution of all ones doesn't get the 'You can't click at (x,y)!' message
- a solution of all zeroes doesn't get the 'You didn't turn on the light at (x,y)!' message.
However the length check on the solution is working fine.
Has anyone else seen this problem?
Thanks,
Paul
|
|
Fri Mar 18, 2011 11:54 pm |
|
 |
helly0d
Joined: 13 Feb 2009 Posts: 29 Location: Iasi Romania |
|
|
|
Nope my algorithm is still running, slow for the 390's but still running
|
|
Sat Mar 19, 2011 10:18 pm |
|
 |
paulw1128
Joined: 17 Dec 2010 Posts: 4
|
|
|
|
Ok, thanks. I guess it's time to write an answer checker, and try to work out how it got this one wrong!
|
|
Mon Mar 21, 2011 11:37 am |
|
 |
paulw1128
Joined: 17 Dec 2010 Posts: 4
|
|
|
|
Update: Made an answer validation routine - it said my answer was correct.
So, to check that I wasn't going mad, I entered it by hand. Thankfully level 91 is only 23x23 so it didn't take too long!
Anyway, having submitted my answer manually, i've now moved on to level 92. This is doing the same thing, so I think I'll update my solver to use HTTP POST instead of GET, to see if that solves the problem. I'm using spw, so the URL for level 91 was >600 characters. Hopefully this is the cause of the problem.
UPDATED: POST works fine. I guess there's some problem with long GET args.
|
|
Wed Mar 23, 2011 10:46 pm |
|
 |
helly0d
Joined: 13 Feb 2009 Posts: 29 Location: Iasi Romania |
|
|
|
I didin't had problems with long gets untill level 223 but that's good you made the change form the beggining.
What method are you using to solve the puzzle ?
|
|
Thu Mar 24, 2011 7:45 am |
|
 |
paulw1128
Joined: 17 Dec 2010 Posts: 4
|
|
|
|
I'm using a Gauss-Jordan style elimination in python, with NumPy arrays of bool types. It's not very quick
I'll probably move over to C soon, and then look into cache-friendly blocking stuff for the elimination, although the way this is scaling I don't expect that to be enough to get through to the top.
|
|
Thu Mar 24, 2011 8:27 am |
|
 |
jagd
Joined: 11 May 2011 Posts: 1
|
|
|
|
stopped at level 91 too, it was because a '\n' (0x0A) on the end of sol=
|
|
Sat May 14, 2011 11:10 pm |
|
 |
Tenebrar
Joined: 13 Jan 2008 Posts: 18
|
|
|
|
I'm stuck at level 92, with the same thing apparently (no messages of error, except for too small). I'm trying to send in my solution using java, but when I try using an InputStream it basically just reloads the page, instead of submitting a solution.
If I try submitting using a POST request using a socket, I get:
<p>The requested URL /cross was not found on this server.</p>
Could someone tell me of a way I can make this work in java?
|
|
Wed Jun 29, 2011 12:17 pm |
|
 |
Tenebrar
Joined: 13 Jan 2008 Posts: 18
|
|
|
|
I got it to work with:
String host = "www.hacker.org";
int port = 80;
String path = "/cross/index.php";
String data = "name=" + $name + "&password=" + $password + "&sol=" + sol;
InetAddress addr = InetAddress.getByName(host);
Socket socket = new Socket(addr, port);
BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), "UTF8"));
wr.write("POST " + path + " HTTP/1.1\r\n");
wr.write("Host: " + host + "\r\n");
wr.write("Content-Length: " + data.length() + "\r\n");
wr.write("Content-Type: application/x-www-form-urlencoded\r\n");
wr.write("\r\n");
wr.write(data);
wr.flush();
// Get response
BufferedReader rd = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
// Process line...
System.out.println(line);
}
wr.close();
rd.close();
|
|
Wed Jun 29, 2011 1:01 pm |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
Sorry for a stupid question (and to break the page!), but I just can't get beyond level 106 even though the solution is definitely correct. Is this CURL usage right? I think it is, but it's not being accepted...
 |
 |
curl --request POST -d "name=laz0r&password=abcde&lvl=106&sol=000111..." "http://www.hacker.org/cross/index.php"
|
_________________ There is no spoon.
Last edited by laz0r on Wed Jul 06, 2011 6:57 am; edited 1 time in total |
|
Tue Jul 05, 2011 9:07 pm |
|
 |
uws8505
Joined: 23 Jan 2011 Posts: 32
|
|
|
|
I don't know anything about CURL, but the page will be better to read if you delete the solution part 
|
|
Wed Jul 06, 2011 1:49 am |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
 |
 |
I don't know anything about CURL, but the page will be better to read if you delete the solution part  |
Your wish is my command... 
_________________ There is no spoon. |
|
Wed Jul 06, 2011 6:57 am |
|
 |
Zeta
Joined: 16 Apr 2009 Posts: 62
|
|
|
|
@laz0r: This should work. Analyze the server response.
|
|
Wed Jul 06, 2011 9:22 am |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
 |
 |
@laz0r: This should work. Analyze the server response. |
Bizarrely, it works fine for level 105, but for 106, I get "The answer is too long. It should be 4 characters long."
When I submit something four characters long as the sol parameter, I get 'The answer is too short. It should be 1024 characters long."
Specifying where to store cookies has not done anything.
_________________ There is no spoon. |
|
Wed Jul 06, 2011 4:36 pm |
|
 |
MyNameIsAlreadyTaken

Joined: 17 Oct 2010 Posts: 31 Location: Germany |
|
|
|
I tried your command and it worked for me [I only changed the password to the secret password].
Maybe it works with my script:
 |
 |
#!/bin/bash
for lvl in {1..643}
do
echo -n "Receiving sourcecode for lvl "${lvl}"... "
code=`lynx -source "http://www.hacker.org/cross/index.php?gotolevel="${lvl}"&go=Go+To+Level&name=[your_name]&spw=[your_spw]" | grep var\ boardinit`
echo "Done"
numbers=`echo ${code} | sed s/level\ =\ [0-9]*// | sed s/[^0-9,]//g`
if [ -z ${numbers} ]
then
echo "No correct Levelcode received"
notify-send Crossflip "Error occured"
exit 1
fi
echo -n "Calculating Solution... "
solution=`./crossflip ${numbers}`
echo "Done"
echo "Solution is "${solution}
echo -n "Submiting solution... "
curl http://www.hacker.org/cross/ -s -d "lvl="${lvl}"&sol="${solution}"&name=[your_name]&spw=[your_spw]" -o ret.txt
echo "Done"
echo
done
notify-send Crossflip "Done :)" |
|
|
Thu Jul 07, 2011 10:38 pm |
|
 |
|