Advertisement
UZUNDZ

Joomla Finder.

Aug 21st, 2014
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.03 KB | None | 0 0
  1. <h3>Joomla</h3>  
  2.  
  3. <?php  
  4. # [c] UzunDz @ Sec4ever.com
  5. echo '  
  6. <form method="post" action="" enctype="multipart/form-data">  
  7. <input type="text" name="ip" value="" placeholder="Extract From ip" size="15"> <input type=submit name=get value=Get />  
  8. <br />  
  9. <textarea name="sites" cols="40" rows="13">';  
  10. if(isset($_POST['get']) && $_POST['ip'] != ""){  
  11.         $target = $_POST['ip'];  
  12.         $sites = mbing("ip:$target index.php?option=com");  
  13.         if(!empty($sites)){  
  14.         $targets = implode("\n",cln_arr(array_map("jos_site",$sites)));  
  15.         echo $targets;  
  16.         }else{  
  17.             echo "No Joomla Found.";  
  18.         }  
  19. }  
  20. echo '</textarea>';  
  21.  
  22. function mbing($what){  
  23.     for($i = 1; $i <= 2000; $i += 10){  
  24.         $ch = curl_init();  
  25.         curl_setopt ($ch, CURLOPT_URL, "http://www.bing.com/search?q=".str_replace(" ","+", $what)."&first=$i");  
  26.         curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16");  
  27.         curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);      
  28.         curl_setopt ($ch, CURLOPT_COOKIEFILE,getcwd().'/cookie.txt');  
  29.         curl_setopt ($ch, CURLOPT_COOKIEJAR, getcwd().'/cookie.txt');  
  30.         curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);  
  31.         curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);  
  32.         $data = curl_exec($ch);  
  33.         preg_match_all('#<h2 class="sb_h3 cttl"><a href="(https?://.*?)" _ctf="rdr_T"#',$data, $links);  
  34.         foreach($links[1] as $link){  
  35.             $allLinks[] = $link;  
  36.         }  
  37.         if(!preg_match('#class="sb_pagN"#',$data)) break;  
  38.     }  
  39.      
  40.     if(!empty($allLinks) && is_array($allLinks)){  
  41.         return array_unique($allLinks);  
  42.     }  
  43. }  
  44.  
  45. function cln_arr($array){  
  46.     return @array_filter(@array_unique($array));  
  47. }  
  48. function jos_site($site){  
  49.     return (preg_match("/option/",$site)) ? preg_replace("#(.*?)/index(.*)|(.*?)/?option(.*)#","$1/",$site):false;  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement