Username: 
Password: 
Restrict session to IP 

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

1 2 3 4
Global Rank: 43
Totalscore: 254166
Posts: 58
Thanks: 64
UpVotes: 53
Registered: 11y 111d
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: 1758
Totalscore: 11852
Posts: 17
Thanks: 20
UpVotes: 16
Registered: 10y 328d

Last Seen: 5y 119d
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: 43
Totalscore: 254166
Posts: 58
Thanks: 64
UpVotes: 53
Registered: 11y 111d
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: 940
Totalscore: 23977
Posts: 1
Thanks: 1
UpVotes: 1
Registered: 10y 272d


Last Seen: 182d 11h
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: 4038
Totalscore: 3056
Posts: 7
Thanks: 10
UpVotes: 11
Registered: 7y 223d
Last Seen: 303d 2h
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: 238
Totalscore: 84572
Posts: 1339
Thanks: 1194
UpVotes: 706
Registered: 11y 216d




Last Seen: 5d 12h
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: 4038
Totalscore: 3056
Posts: 7
Thanks: 10
UpVotes: 11
Registered: 7y 223d
Last Seen: 303d 2h
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: 484
Totalscore: 46556
Posts: 200
Thanks: 175
UpVotes: 173
Registered: 8y 277d
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: 480
Totalscore: 46977
Posts: 37
Thanks: 20
UpVotes: 21
Registered: 6y 347d
stormsurfer`s Avatar



Last Seen: 2y 93d
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: 480
Totalscore: 46977
Posts: 37
Thanks: 20
UpVotes: 21
Registered: 6y 347d
stormsurfer`s Avatar



Last Seen: 2y 93d
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
BjornR1989, Redknee, bballMalory, tunelko, silenttrack, qdxy, vs4vijay, Kruptein, stormsurfer, TheHiveMind, Z, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89 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 44928 times.