Advertisement
tobitaz

directoryscan

May 20th, 2021
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. <?php
  2. ini_set('max_execution_time', '0');
  3. set_time_limit(0);
  4.  
  5. echo '<h>Directory Scanner</h><br /><form action="" method="post">
  6. <font class="os">Url:</font><br /><input name="urljom" class="ibtn" value="http://targetsite.com">
  7. <button type="submit" class="rbtn">SCAN</button>
  8. </form>';
  9.  
  10.  
  11.  
  12. $urljom = $_POST["urljom"];
  13.  
  14. if($urljom != null)
  15. {
  16. $comx = file_get_contents("wordlist.txt");
  17.  
  18.   $arrayjom = preg_split('/(\r?\n)+/', $comx);
  19. echo "scanning";
  20.  
  21. foreach($arrayjom as $allcom)
  22. {
  23.  
  24.  $tazjom = curl_init($urljom."/".$allcom);
  25.  
  26. curl_setopt($tazjom, CURLOPT_RETURNTRANSFER, true);
  27.  
  28.  
  29. $tobjom = curl_exec($tazjom);
  30. curl_close($tazjom);
  31.  
  32. if($tobjom === false)
  33. {
  34. die("xbole");
  35. }
  36. else
  37. {
  38.  
  39.  
  40. $ti = strripos($tobjom, "not be found");
  41. $ta = strripos($tobjom, "not exist");
  42. $te = strripos($tobjom, "not found");
  43. $tazz = strripos($tobjom, "404");
  44.  
  45.  
  46. if($ti === false & $ta === false & $te === false & $tazz === false)
  47. {
  48. echo "<br /><font class='os'>found:<font color='red'>".$allcom."</font></font><br />";
  49.  
  50. }
  51. else
  52. {
  53. echo ".";
  54. }
  55. }
  56. }
  57. }
  58.  
  59.  
  60.  
  61.  
  62. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement