Username: 
Password: 
Restrict session to IP 

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

1 2 3 4
Global Rank: 58
Totalscore: 251041
Posts: 58
Thanks: 69
UpVotes: 59
Registered: 16y 272d
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: 1896
Totalscore: 13892
Posts: 17
Thanks: 20
UpVotes: 16
Registered: 16y 124d

Last Seen: 1y 64d
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: 58
Totalscore: 251041
Posts: 58
Thanks: 69
UpVotes: 59
Registered: 16y 272d
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: 1074
Totalscore: 24085
Posts: 1
Thanks: 1
UpVotes: 1
Registered: 16y 68d


Last Seen: 1y 196d
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: 5095
Totalscore: 3182
Posts: 7
Thanks: 10
UpVotes: 11
Registered: 13y 19d
Last Seen: 6y 98d
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: 228
Totalscore: 94570
Posts: 1695
Thanks: 1365
UpVotes: 929
Registered: 17y 11d




Last Seen: 3d 6h
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: 5095
Totalscore: 3182
Posts: 7
Thanks: 10
UpVotes: 11
Registered: 13y 19d
Last Seen: 6y 98d
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: 550
Totalscore: 46179
Posts: 224
Thanks: 212
UpVotes: 222
Registered: 14y 73d
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: 543
Totalscore: 47145
Posts: 37
Thanks: 21
UpVotes: 24
Registered: 12y 143d
stormsurfer`s Avatar



Last Seen: 7y 254d
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: 543
Totalscore: 47145
Posts: 37
Thanks: 21
UpVotes: 24
Registered: 12y 143d
stormsurfer`s Avatar



Last Seen: 7y 254d
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, nonfungiblesecurity, vs4vijay, Kruptein, stormsurfer, TheHiveMind, Z, balicocat, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, SwolloW, dangarbri, csuquvq 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 58388 times.