hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Stuck at level 91? (Server fault?)
Goto page 1, 2, 3  Next
 
Reply to topic    hacker.org Forum Index » Crossflip View previous topic
View next topic
Stuck at level 91? (Server fault?)
Author Message
paulw1128



Joined: 17 Dec 2010
Posts: 4

Post Stuck at level 91? (Server fault?) Reply with quote
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 Sad

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 View user's profile Send private message
helly0d



Joined: 13 Feb 2009
Posts: 29
Location: Iasi Romania

Post Reply with quote
Nope my algorithm is still running, slow for the 390's but still running
Sat Mar 19, 2011 10:18 pm View user's profile Send private message
paulw1128



Joined: 17 Dec 2010
Posts: 4

Post Reply with quote
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 View user's profile Send private message
paulw1128



Joined: 17 Dec 2010
Posts: 4

Post Reply with quote
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 View user's profile Send private message
helly0d



Joined: 13 Feb 2009
Posts: 29
Location: Iasi Romania

Post Reply with quote
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 View user's profile Send private message
paulw1128



Joined: 17 Dec 2010
Posts: 4

Post Reply with quote
I'm using a Gauss-Jordan style elimination in python, with NumPy arrays of bool types. It's not very quick Razz

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 View user's profile Send private message
jagd



Joined: 11 May 2011
Posts: 1

Post Reply with quote
stopped at level 91 too, it was because a '\n' (0x0A) on the end of sol=
Sat May 14, 2011 11:10 pm View user's profile Send private message
Tenebrar



Joined: 13 Jan 2008
Posts: 18

Post Reply with quote
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 View user's profile Send private message
Tenebrar



Joined: 13 Jan 2008
Posts: 18

Post Reply with quote
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 View user's profile Send private message
laz0r



Joined: 04 Feb 2010
Posts: 290
Location: Within the depths of Unix

Post Reply with quote
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:

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 View user's profile Send private message
uws8505



Joined: 23 Jan 2011
Posts: 32

Post Reply with quote
I don't know anything about CURL, but the page will be better to read if you delete the solution part Smile
Wed Jul 06, 2011 1:49 am View user's profile Send private message
laz0r



Joined: 04 Feb 2010
Posts: 290
Location: Within the depths of Unix

Post Reply with quote
uws8505 wrote:
I don't know anything about CURL, but the page will be better to read if you delete the solution part Smile


Your wish is my command... Smile

_________________
There is no spoon.
Wed Jul 06, 2011 6:57 am View user's profile Send private message
Zeta



Joined: 16 Apr 2009
Posts: 62

Post Reply with quote
@laz0r: This should work. Analyze the server response.
Wed Jul 06, 2011 9:22 am View user's profile Send private message
laz0r



Joined: 04 Feb 2010
Posts: 290
Location: Within the depths of Unix

Post Reply with quote
Zeta wrote:
@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 View user's profile Send private message
MyNameIsAlreadyTaken



Joined: 17 Oct 2010
Posts: 31
Location: Germany

Post Reply with quote
I tried your command and it worked for me [I only changed the password to the secret password].


Maybe it works with my script:

Code:
#!/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 View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Crossflip All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.