Stuck at level 91? (Server fault?)
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
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
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.
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.
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.
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.
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?
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?
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();
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();
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...
Code: Select all
curl --request POST -d "name=laz0r&password=abcde&lvl=106&sol=000111..." "http://www.hacker.org/cross/index.php"
Last edited by laz0r on Wed Jul 06, 2011 6:57 am, edited 1 time in total.
There is no spoon.
Bizarrely, it works fine for level 105, but for 106, I get "The answer is too long. It should be 4 characters long."Zeta wrote:@laz0r: This should work. Analyze the server response.
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.
- MyNameIsAlreadyTaken
- Posts: 31
- Joined: Sun Oct 17, 2010 10:21 am
- Location: Germany
I tried your command and it worked for me .
Maybe it works with my script:
Maybe it works with my script:
Code: Select all
#!/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 :)"