Username: 
Password: 
Restrict session to IP 

Problem with this chall ?  Go to the Training: Programming 1 challenge

1 2 3 4
Global Rank: 56
Totalscore: 251188
Posts: 58
Thanks: 68
UpVotes: 58
Registered: 15y 325d
hds`s Avatar






The User is Offline
Problem with this chall ?
Google/translate1Thank You!1Good Post!0Bad Post! link
It's a common error set the header connection to keep-alive in this type of challenges. Look at the httpclient.php and then search for in both methods (GET and POST)
GeSHi`ed php code
1
2
3
4
 
//...
$header.="Connection: keep-alive";
 


And then, set it to close:
GeSHi`ed php code
1
2
3
4
 
//...
$header.="Connection: Close";
 


Maybe, if you change that, the server won't wait the keep-alive timeout, and the result will send in less seconds.
Global Rank: 1851
Totalscore: 13881
Posts: 17
Thanks: 20
UpVotes: 16
Registered: 15y 176d

Last Seen: 116d 20h
The User is Offline
Problem with this chall ?
Google/translate1Thank You!1Good Post!0Bad Post! link
I looked at general HTTP traffic and almost every time a keep-alive header is sent.
It kept waiting even when i set the socket timeout to 1 second.
I've coded and recoded the script without success but this was the cause of all problems. Thank you HaDeS !
Quote from WeChall
<div class="message">Congratulations, you solved this challenge.</div>
Global Rank: 56
Totalscore: 251188
Posts: 58
Thanks: 68
UpVotes: 58
Registered: 15y 325d
hds`s Avatar






The User is Offline
Problem with this chall ?
Google/translate1Thank You!1Good Post!0Bad Post! link
Quote from BjornR1989

...
It kept waiting even when i set the socket timeout to 1 second.
...


The timeout in fsockopen in PHP refers to the time that the script waits until there is a succesful connection, if the server takes too long to accept the conection, then we talk about timeout.
For that reason, there is a big difference between timeout on fsockopen and timeout specified in the request header.
I'm happy that you've made the challenge.
Global Rank: 1048
Totalscore: 24114
Posts: 1
Thanks: 1
UpVotes: 1
Registered: 15y 120d


Last Seen: 249d 12h
The User is Offline
RE: Problem with this chall ?
Google/translate1Thank You!1Good Post!0Bad Post! link
I'm definately messing up somehow, I can't login properly Drool I'm trying to do it with pycurl and I have this rule: c.setopt(pycurl.COOKIE, "WC4_SID=...") or am I forgetting something?
Global Rank: 4966
Totalscore: 3187
Posts: 7
Thanks: 10
UpVotes: 11
Registered: 12y 71d
Last Seen: 5y 151d
The User is Offline
RE: Problem with this chall ?
Google/translate2Thank You!2Good Post!0Bad Post! link
I used a javascript/greasemonkey combo to solve it, but it keeps on getting times slightly than 1.337 (nice leet) ..
Any suggestions ?
Script is very very basic :
GeSHi`ed javascript code
1
2
3
4
5
 
var pgcode = document.getElementById("page").innerHTML;
var redirurl = "http://www.wechall.net/challenge/training/programming1/index.php?answer="+pgcode;
window.location = redirurl;
 

I'm very new to PHP.. haven't tried doing it by that method yet.. (also a bit clueless how I could do it that way Drool)
Global Rank: 253
Totalscore: 87267
Posts: 1636
Thanks: 1338
UpVotes: 886
Registered: 16y 64d




Last Seen: 15h 53m
The User is Offline
RE: Problem with this chall ?
Google/translate1Thank You!1Good Post!0Bad Post! link
The new server is quite slow, and 1.337 seconds might be quite hard for locations far away from the server...
You might want to try "&ajax=1" added to your request to skip generation of some headers and sidebar.
Maybe it helps Smile

Good luck
gizmore
The geeks shall inherit the properties and methods of object earth.
Global Rank: 4966
Totalscore: 3187
Posts: 7
Thanks: 10
UpVotes: 11
Registered: 12y 71d
Last Seen: 5y 151d
The User is Offline
RE: Problem with this chall ?
Google/translate2Thank You!2Good Post!0Bad Post! link
The "&ajax=1" didn't drastically reduce the time, although I'm now averaging at around 1.9 secs.
Anyways, will try something else. I'm inside a proxy network, so that's not helping either.
Thanks for the quick reply Smile
Global Rank: 543
Totalscore: 46340
Posts: 220
Thanks: 205
UpVotes: 214
Registered: 13y 125d
space`s Avatar
The User is Offline
RE: Problem with this chall ?
Google/translate2Thank You!2Good Post!0Bad Post! link
maybe temporerly add $time -= $new_server_time_difference...
Contact only via c3BhY2VAd2VjaGFsbC5uZXQ= or PM...
Windows can be secure... but only if you don't use it Happy
Global Rank: 536
Totalscore: 47146
Posts: 37
Thanks: 21
UpVotes: 24
Registered: 11y 196d
stormsurfer`s Avatar



Last Seen: 6y 306d
The User is Offline
RE: Problem with this chall ?
Google/translate0Thank You!0Good Post!0Bad Post! link
I'm stuck. I've read the thread and it seems my way should have been working. I'm using curl in php
I've set:

GeSHi`ed Plaintext code
1
2
3
4
 
$setcookie = 'WC=<cookie value from my browser>; domain=.wechall.net; path=/';
curl_setopt($curl, CURLOPT_COOKIE, $setcookie);
 


and it's still telling me "Please login by sending your cookies in the HTTP Header"

I've added

GeSHi`ed Plaintext code
1
2
3
4
 
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_STDERR, $f);
 


and I can see in the file created:
Host: www.wechall.net
Accept: */*
Cookie: WC=<my cookie value>; domain=.wechall.net; path=/

but still no joy.

in this thread there was mentioning of PHPSESSID, however it's not set in my browser cookie, is it needed or was changed to WC?
am I missing something? Is the challenge working?
Global Rank: 536
Totalscore: 47146
Posts: 37
Thanks: 21
UpVotes: 24
Registered: 11y 196d
stormsurfer`s Avatar



Last Seen: 6y 306d
The User is Offline
RE: Problem with this chall ?
Google/translate0Thank You!0Good Post!0Bad Post! link
solved. Problem was I logged in with restrict to ip.
1 2 3 4
quangntenemy, BjornR1989, Redknee, bballMalory, tunelko, silenttrack, n0tHappy, vs4vijay, Kruptein, stormsurfer, TheHiveMind, Z, balicocat, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, JanLitwin17, SwolloW, dangarbri have subscribed to this thread and receive emails on new posts.
1 people are watching the thread at the moment.
This thread has been viewed 56083 times.