What's wrong with my code??
$header = array();
$header[] = "REFERER: http://hellboundhackers.org/challenges/timed/timed1/index.php";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,"http://www.hellboundhackers.org/challenges/timed/timed1/index.php");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_COOKIE,"fusion_visited=TRUE;PHPSESSID=13128m5r6o36ko6kkom1gctkg7;fusion_user=28617.bf5df2f43ba5409eab809f036bb81fb0;");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; it; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5");
$result = curl_exec ($curl);
echo $result;
?>```
it must print source od timed1 and log me in...
but it's blank ;((
and if i remove COOKIE then it is source but i'm not logged...
I don't think you need to send the header thing. That could be the problem. Try to get rid of the CURLOPT_HTTPHEADER option
This helped me out on the more recent timed challenges when my script stopped working: http://www.hellboundhackers.org/forum/using_curl_on_hbh-69-9730_0.html
Yeah as skater said you dont need:
$header = array();
$header[] = "REFERER: http://hellboundhackers.org/challenges/timed/timed1/index.php";
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
Also, PHPSESSID and fusion_user, will do for the cookie.
Good luck. :)
cueballr.
P.S are you running the script locally?
NuclearHaxor wrote: it must print source od timed1 and log me in…
but it's blank ;((
and if i remove COOKIE then it is source but i'm not logged…
If the PHP page is coming up blank and errors are suppressed, then you should start commenting out lines of your code until it works… that will help you to isolate the problem area. Of course, this is assuming that PHP will work on whatever web server / host you're using.
Re-write the "and if i remove COOKIE then it is source but i'm not logged…" part so that it is more readable. Otherwise, it doesn't help those that are helping you.