HTTP Proxy Finder

来源:互联网 发布:通达信boll指标源码 编辑:程序博客网 时间:2024/06/05 15:32
  1. <form method="POST" action="">
  2.   <h3 align="center">Proxy Finder</h3>
  3.   <p align="center"><font color="#999999">(Input the address range below and
  4.   press the Find button)</font></p>
  5.   <p align="center">&nbsp;</p>
  6.   <p align="center">&nbsp;</p>
  7.   <h3 align="center">From <!--webbot bot="Validation" S-Data-Type="Integer"
  8.   S-Number-Separators="." B-Value-Required="TRUE" I-Minimum-Length="1"
  9.   I-Maximum-Length="3" --> <input type="text" name="A1" size="3" maxlength="3">.<!--webbot
  10.   bot="Validation" S-Data-Type="Integer" S-Number-Separators="."
  11.   B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="3" --><input type="text" name="A2" size="3" maxlength="3">.<!--webbot
  12.   bot="Validation" S-Data-Type="Integer" S-Number-Separators="."
  13.   B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="3" --><input type="text" name="A3" size="3" maxlength="3">.<!--webbot
  14.   bot="Validation" S-Data-Type="Integer" S-Number-Separators="."
  15.   B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="3" --><input type="text" name="A4" size="3" maxlength="3">&nbsp;
  16.   to&nbsp; <!--webbot bot="Validation" S-Data-Type="Integer"
  17.   S-Number-Separators="." B-Value-Required="TRUE" I-Minimum-Length="1"
  18.   I-Maximum-Length="3" --><input type="text" name="B1" size="3" maxlength="3"></h3>
  19.   <p align="center"><font color="#999999">(e.g. &quot;From <i>192.168.1.1</i> to
  20.   <i>100</i>&quot; this will scan all the addresses from 192.168.1.1 to
  21.   192.168.1.100)</font></p>
  22.   <h3 align="center"><input type="submit" value="Find"></h3>
  23. </form>
  24. <br><br>
  25. <?
  26. set_time_limit(0);
  27. if ((!$A1) || (!$A2) || (!$A3) || (!$A4) || (!$B1)) {
  28. exit;
  29. }
  30. $proxiuri[]="";
  31. $proxiuri=array();
  32. for($i=$A4;$i<$B1;$i++) {
  33.    $proxiuri[] = ($A1 . "." . $A2 . "." . $A3 . "." . $i);
  34.    }
  35. $total=0;
  36. $gasite=0;
  37. foreach($proxiuri as $proxy) {
  38.     if(strstr($proxy,".")) {
  39.         $total=$total+1;
  40.     }
  41. }
  42. echo "Number of IPs to scan: " . $total ."<br><br>";
  43. echo "Found: <br>";
  44. foreach($proxiuri as $proxy) {
  45.     if(strstr($proxy,".")) {
  46.     $gasit=0;
  47.     $fp = fsockopen($proxy, 80, $errno, $errstr, 7);
  48.     if ($fp) {
  49.     echo $proxy . "<b>:80</b> PROXY ";
  50.         flush();
  51.         $gasit=1;
  52.           fclose ($fp);
  53.     }
  54.    $fp = fsockopen($proxy, 3128, $errno, $errstr, 7);
  55.    if ($fp) {
  56.       echo $proxy . "<b>:3128</b> PROXY ";
  57.       flush();
  58.       $gasit=1;
  59.       fclose ($fp);
  60.       }
  61.    $fp = fsockopen($proxy, 8080, $errno, $errstr, 7);
  62.    if ($fp) {
  63.       echo $proxy . "<b>:8080</b> PROXY ";
  64.       flush();
  65.       $gasit=1;
  66.       fclose ($fp);
  67.       }
  68.    if ($gasit) {
  69.     $gasite++;
  70.     echo "<br>";
  71.       }
  72. }
  73. }
  74. echo "Found Proxies: " . $gasite;
  75. ?>
原创粉丝点击