Advertisement
tobitaz

Localdomainpath

Oct 27th, 2013
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.24 KB | None | 0 0
  1.  <center><font style="font-size:40px">Local domain path scanner</font><br /><br />
  2. <form action="" method="post">
  3. Path to scan:<input name="path" value="/assets/uploadify/old/"><br />
  4. <input type="submit">
  5. </form>
  6. <?php
  7. error_reporting(0);
  8. set_time_limit(0);
  9. ini_set('max_execution_time', 0);
  10.  
  11.  
  12. $path = $_POST["path"];
  13. if($path != null)
  14. {
  15.  
  16. $domi = implode(file("/etc/named.conf"));
  17.  if(!$domi)
  18. {
  19. die("web ni xleh bca list domain");
  20. }
  21. preg_match_all("#named/(.*?).db#",$domi ,$anu);
  22. $phcc = array_unique($anu[1]);
  23.  
  24. echo "Loading";
  25.  
  26. foreach($phcc as $phc)
  27. {
  28.  
  29. //detektor page
  30.    
  31.  
  32.  
  33. $cj = curl_init("http://".$phc."/".$path);
  34.          curl_setopt($cj, CURLOPT_RETURNTRANSFER, 1);
  35.          curl_setopt($cj, CURLOPT_TIMEOUT, 5);
  36.      $res = curl_exec($cj);
  37.  
  38.  
  39.  if($res === false)
  40. {
  41.  
  42. echo "<br /><a href='http://".$phc."/".$path."'>".$phc."/".$path."</a>:[<font style='color:grey;'>xde bro]</font><br />Loading";
  43.    
  44. }
  45. else
  46. {
  47.  
  48.        $che = strripos($res, "403");
  49.    $che2 = strripos($res, "404");
  50.    $che3 = strripos($res, "method not allowed");
  51.    $che4 = strripos($res, "Webmaster please contact");
  52.    $che5 = strripos($res, "Not found");
  53.    $che6 = strripos($res, "Account Suspended");
  54.  
  55.  
  56.  
  57.         if($che or $che2 or $che3 or $che4 or $che5 or $che6 > 1)
  58.     {
  59.  
  60.  
  61.                        $cr = curl_init();
  62.             curl_setopt($cr, CURLOPT_URL, "http://".$phc."/".$path);    
  63.                   curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
  64.                 curl_setopt($cr, CURLOPT_TIMEOUT, 5);
  65.                   $respons = curl_exec($cr);
  66.                       $errno = curl_errno($cr);
  67.                       $error = curl_error($cr);
  68.                $response = $response;
  69.                         $info = curl_getinfo($cr);
  70.                       $chek = $info['http_code'];
  71.                         curl_close($cr);
  72.  
  73.    
  74.                   if($chek < 400)
  75.                        {
  76.            echo "<br /><a href='http://".$phc."/".$path."'>".$phc."/".$path."</a>:[<font style='color:red;'>mungkin ada]</font><br />Loading";
  77.                       }
  78.                      else
  79.                       {
  80.                      echo ".";
  81.                      }
  82.  
  83. //end detektor page
  84.      }
  85. }
  86.    
  87. }
  88. }
  89.  
  90. ?>
  91. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement