Author |
Message |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
Bizarre - the exact same command works fine on my friend's computer, just not on mine I'll try the script and see what happens.
EDIT - nope, the CURL command still fails, telling me that I need the solution to be 4 characters long... I'm now having this problem with all the levels, not just 106 onwards 
_________________ There is no spoon. |
|
Fri Jul 08, 2011 8:40 am |
|
 |
uws8505
Joined: 23 Jan 2011 Posts: 32
|
|
|
|
I suspect you have some login session problem or something similar.
"The answer is 4 characters long" possibly means that level 0 is loaded, and "The answer is 1024 characters long" should be the proper length for 106.
My method for puzzle automation is to log in to the forum first and then load the puzzle page.
|
|
Fri Jul 08, 2011 4:26 pm |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
I've tried that ah well - might just be a problem with my cURL (not the latest version) - I'll update it and see.
_________________ There is no spoon. |
|
Fri Jul 08, 2011 7:41 pm |
|
 |
Naprecks
Joined: 12 Aug 2009 Posts: 1
|
|
|
|
Try to use gotolevel instead of lvl for submitting the solution.
The server doesn't seem to care about the lvl parameter.
|
|
Fri Jul 08, 2011 9:08 pm |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
 |
 |
Try to use gotolevel instead of lvl for submitting the solution.
The server doesn't seem to care about the lvl parameter. |
Still nothing - the ContentLength is correct, all the data are marked by cURL as going out correctly (adding the --trace option shows that the entire solution is actually submitted) - yet it works fine on a different computer :/ Problem is that my solver is in Mathematica, calling cURL on the command line; I can't use the Mathematica solver on another computer because it's a one-person license 
_________________ There is no spoon. |
|
Sat Jul 09, 2011 8:36 am |
|
 |
portal
Joined: 22 Jul 2007 Posts: 19
|
|
|
|
have you tried using something different to send your solution, like wget?
Not that it makes much sense, but it may be some strange bug involving curl and your local configuration...
|
|
Sat Jul 09, 2011 11:20 am |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
 |
 |
have you tried using something different to send your solution, like wget?
Not that it makes much sense, but it may be some strange bug involving curl and your local configuration... |
Bizarrely, wget works fine thanks for the help, people!
_________________ There is no spoon. |
|
Sat Jul 09, 2011 9:14 pm |
|
 |
compudemon
Joined: 13 Aug 2011 Posts: 33
|
|
|
|
i got stuck at 91 too, then i changed my code to use post rather then get
 |
 |
private void go() throws Exception {
URL u;
BufferedReader rd;
String enc="UTF-8";
u = new URL("http://www.hacker.org:80/cross/index.php");
URLConnection conn=u.openConnection();
conn.setDoOutput(true);
conn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
try (OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream())) {
if (sol.isEmpty()) {
writer.write("name=" + URLEncoder.encode(name, enc) +
"&password=" + URLEncoder.encode(pw, enc));
} else {
writer.write("name=" + URLEncoder.encode(name, enc) +
"&password=" + URLEncoder.encode(pw, enc) +
"&sol=" + sol);
}
writer.flush();
rd = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
input2level(rd);
}
rd.close();
System.out.println(this);
solve();
System.out.println("Sol: "+sol);
}
|
|
|
Sat Aug 27, 2011 11:29 pm |
|
 |
pjgblt
Joined: 05 Oct 2011 Posts: 2
|
|
|
|
I also got up to lvl 91. Now the solution is too long for get and I don't know how I can implement a post submission, Can someone give me an example how to submit the result with post rather than get.
Thanks,
pjgblt
|
|
Tue Dec 06, 2011 3:26 pm |
|
 |
MyNameIsAlreadyTaken

Joined: 17 Oct 2010 Posts: 31 Location: Germany |
|
|
|
In this Thread, there is one Solution using Java and one using Bash - just use one of these.
|
|
Tue Dec 06, 2011 4:18 pm |
|
 |
pjgblt
Joined: 05 Oct 2011 Posts: 2
|
|
|
|
I am looking for a way in c or c++, cause I coded my bot iin c++. I have never programmed sth. like this before, so is there anyone who can help me?
|
|
Wed Dec 07, 2011 3:55 pm |
|
 |
camel
Joined: 26 Dec 2007 Posts: 50 Location: Austria |
|
|
|
people know about matrix manipulation stuff but fail with such a primitive thing as a http_post request? serious facepalm.
|
|
Mon Oct 22, 2012 7:28 pm |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
 |
 |
people know about matrix manipulation stuff but fail with such a primitive thing as a http_post request? serious facepalm. |
Post isn't very primitive - matrix manipulation can be worked out with pencil and paper, while Post can't.
_________________ There is no spoon. |
|
Wed Oct 24, 2012 2:27 pm |
|
 |
tompko
Joined: 25 Feb 2011 Posts: 11 Location: London, UK |
|
|
|
 |
 |
I am looking for a way in c or c++, cause I coded my bot iin c++. I have never programmed sth. like this before, so is there anyone who can help me? |
If you're using C/C++ for this then you probably want to check out the Curl library. Unfortunately I haven't used it myself so I can do little more than point you in its direction.
|
|
Thu Oct 25, 2012 11:14 am |
|
 |
camel
Joined: 26 Dec 2007 Posts: 50 Location: Austria |
|
|
|
 |
 |
 |
 |
people know about matrix manipulation stuff but fail with such a primitive thing as a http_post request? serious facepalm. |
Post isn't very primitive - matrix manipulation can be worked out with pencil and paper, while Post can't. |
actually you should almost be able to do a http_post request via telnet only. you need it everywhere ... from benchmarking, manipulating online games, automating stuff on the web, programming apps, using rest/oauth/etc. apis, writing a webspider, writing pentest tools, debuging websites, etc. ... it is hard for me to acceppt that anyone playing "hacker.org" games would not know how to do something primitive as this. i am not meaning to be rude it just sounds weird to me. it is like you are writing new software for your car's ECU not knowing how to change tires.
|
|
Fri Oct 26, 2012 2:50 pm |
|
 |
|