Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

What's wrong with my code??


ghost's Avatar
0 0

       $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...

ghost's Avatar
0 0

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?


ghost's Avatar
0 0

no i'm not…

coz there are no curl on local ;((


ghost's Avatar
0 0

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.