Follow us on Twitter!
Few are those who can see with their own eyes and hear with their own hearts. - Albert Einstein
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 7
Guests Online: 7
Members Online: 0

Registered Members: 82822
Newest Member: TheBunter
Latest Articles
View Thread

HellBound Hackers | Challenges | Realistic

Author

real 2 php script - help needed*Spoilers*


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-04-07 11:54
dudes could someone check out my script and let me know whats wrong casue it just wont run i think it might be the parser and not the code
Code

<?php

function UrlExists($url)
{
    if(strstr($url, "http://")) $url = str_replace("http://", "", $url);
    $fp = @fsockopen($url, 80);
    if($fp == false) return false;// was ===
    return true;
}

bool $PageIsValid = false;
$OriginalUrl="http://www.hellboundhackers.org/challenges/real2/backups/";
$TestedUrl;
for($Month=1;$Month<13;$Month++)
{
   for($Day=1;$Day<32;$Day++)
   {
      for($Hour=0000;$Hour<2400;$Hour+=100)
      {
         if($Hour<1000)
         {
            $TestedUrl=$OriginalUrl."backup_2004-".$Month."-".$Day."_0".$Hour.".sql";
         }
         if($Hour==0)
         {
            $TestedUrl=$OriginalUrl."backup_2004-".$Month."-".$Day."_000".$Hour.".sql";
         }
         $PageIsValid = UrlExists($TestedUrl);
         if($PageIsValid==true)
         {
            echo $TestedUrl;
         }
      }
   }
}
   
?>




thanx in advance:D

Edited by on 08-04-07 11:57
Author

RE: real 2 php script - help needed*Spoilers*


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-04-07 15:57
I don't know much of php so i can't help you that way, but i suggest you to use cUrl...it simplifies a lot.
Google for it...you can use libcurl iside your php script, or you can use a commend line application ( which is the way i did this challenge ).