Advertisement
UZUNDZ

Wordpress Finder.

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