Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- error_reporting(0);
- $options=getopt('j:w:');
- if(isset($options['j'])){
- echo"\r\n\t\tJoomla S3RV3R SC4NN3R\r\n";
- $ch=curl_init();
- foreach(joom_bing($options['j']) as $link){
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,$link.'/administrator/');
- curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
- curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- $data=curl_exec($ch);
- if(preg_match('/Joomla!/',$data)){
- echo"\r\n-Link:\n";
- echo"\t$link\n";
- echo"-Composent:\n";
- if(count(jos_composent($link))>0){
- foreach(jos_composent($link) as $com){
- if(ask_exploit($com) == true){
- echo"\t$com =\t./Infected\r\n";
- $f=fopen($com.'.txt', 'ab');
- fwrite($f, $link."\r\n");
- fclose($f);
- }else{
- echo"\t$com\r\n";
- }
- }
- }else{
- echo"\tThere is No Composent\n";
- }
- }
- }
- curl_close($ch);
- }else if(isset($options['w'])){
- echo"\r\n\t\tWordpress S3RV3R GR4BB3R\r\n\n";
- $ch=curl_init();
- foreach(wp_bing($options['w']) as $link){
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,$link.'/wp-login.php');
- curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
- curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- $data=curl_exec($ch);
- if(preg_match('/wp_attempt_focus/',$data)){
- echo"$link ...OK!\r\n";
- $f=fopen($options['w'].'-wp.txt', 'ab');
- fwrite($f, $link."\r\n");
- fclose($f);
- }
- }
- curl_close($ch);
- }else{
- echo"\r\n\t[!] Usage ex: php $argv[0] -(j,w) 127.0.0.1\r\n";
- }
- function joom_bing($ip){
- $ch=curl_init();
- $i=1;
- while($i){
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,"http://www.bing.com/search?q=".urlencode("ip:$ip index.php?option=com")."&first=$i");
- curl_setopt($ch,CURLOPT_COOKIEFILE,'cookie.txt');
- curl_setopt($ch,CURLOPT_COOKIEJAR,'cookie.txt');
- curl_setopt($ch,CURLOPT_USERAGENT,"SamsungI8910/SymbianOS/9.1 Series60/3.0");
- $data=curl_exec($ch);
- preg_match_all('#<h2 class="sb_h3 cttl"><a href="(.*?)"#i',$data,$matches);
- foreach($matches[1] as $link){
- if(preg_match('/option/',$link)){
- $parse=pathinfo($link);
- $alllinks[]=$parse['dirname'];
- }
- }
- if(!preg_match('#class="sb_pagN"#i',$data)) break;
- $i+=10;
- }
- curl_close($ch);
- if(!empty($alllinks) && is_array($alllinks)){
- return array_filter(array_unique($alllinks));
- }
- }
- function jos_composent($link){
- $ch=curl_init();
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,$link.'/');
- curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
- curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- $data=curl_exec($ch);
- curl_close($ch);
- preg_match_all('{option,(.*?)/}i',$data,$f);
- preg_match_all('{option=(.*?)(&|&|")}i',$data,$f2);
- preg_match_all('{/components/(.*?)/}i',$data,$f3);
- return array_filter(array_unique(array_merge($f2[1],$f[1],$f3[1])));
- }
- function ask_exploit($com){
- $ch=curl_init();
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,'http://joomlaexploit.com/');
- $data=curl_exec($ch);
- curl_close($ch);
- if(preg_match("#$com#",$data)){ return true;
- }else{ return false; }
- }
- function wp_bing($ip){
- $ch=curl_init();
- $i=1;
- while($i){
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,"http://www.bing.com/search?q=".urlencode("ip:$ip /?page_id=")."&first=$i");
- curl_setopt($ch,CURLOPT_COOKIEFILE,'cookie.txt');
- curl_setopt($ch,CURLOPT_COOKIEJAR,'cookie.txt');
- curl_setopt($ch,CURLOPT_USERAGENT,"SamsungI8910/SymbianOS/9.1 Series60/3.0");
- $data=curl_exec($ch);
- preg_match_all('#<h2 class="sb_h3 cttl"><a href="(.*?)"#i',$data,$matches);
- foreach($matches[1] as $link){
- if(preg_match('/page_id=/',$link)){
- $parse=pathinfo($link);
- $alllinks[]=$parse['dirname'];
- }
- }
- if(!preg_match('#class="sb_pagN"#i',$data)) break;
- $i+=10;
- }
- curl_close($ch);
- if(!empty($alllinks) && is_array($alllinks)){
- return array_filter(array_unique($alllinks));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment