Inconnu-Dz

Server Users Finder From WordPress

May 7th, 2016
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.77 KB | None | 0 0
  1. <pre><center>
  2. Server Users Finder From WordPress
  3.  
  4. <form method='get' action=''>
  5. IP : <input type=text name=ip><input type=submit value='Get P:'>
  6. </form>
  7. <?
  8.  
  9. error_reporting(0);
  10.  
  11. if($_GET['ip']){
  12.  
  13. $search = new ss_bing();
  14.  
  15. $wp_sites = $search->search("ip:".$_GET['ip']." /page_id=",0);
  16.  
  17.  
  18.  
  19. foreach($wp_sites as $wp){
  20.  
  21. if(eregi('page_id',$wp)){ $cs[]=wp($wp); }
  22.  
  23. }
  24.  
  25. if(count($cs) == 0){
  26.  
  27. echo "Nothing Found !";
  28.  
  29. die();
  30.  
  31. }
  32.  
  33. $all_clean_wp = array_unique($cs);
  34.  
  35. echo "<table border=1 align=center width=50%>";
  36. echo "<tr><td colspan=2 align=center># Extract : [ ".count($all_clean_wp)." Site ]</td><tr>";
  37. echo "<tr><td align=center>wpSite</td><td align=center>User</td></tr>";
  38.  
  39. foreach($all_clean_wp as $swp){
  40.  
  41. echo "<tr><td>$swp</td><td>".wp_get_user($swp)."</td></tr>";
  42.  
  43. }
  44.  
  45. echo "</table>\n\n";
  46.  
  47. }
  48.  
  49. # Class & Funcs ..
  50.  
  51. function wp($site){ preg_match_all("#(.*?)?page_id#",$site,$res); return str_replace("?","",$res[1][0]); }  
  52.  
  53. function wp_get_user($wp){
  54.  
  55. $source = @implode(@file($wp.'wp-settings.php'));
  56.  
  57. if($source){ preg_match_all("#/home/(.*?)/public_html/#",$source,$res); }
  58.  
  59. if($res[1][0]){ return $res[1][0];}else{ return "n0t_Found"; }
  60.  
  61. }
  62.  
  63. class ss_bing{
  64.  
  65.   public function search($wht,$url_mode){ // $wht = > search  , $url_mode=1 => clean url (http://site.tld/) $url_mode=0 => not clean (http://site.tdl/page=google)
  66.  
  67.   $wht = str_replace(" ","+",$wht);
  68.   $npages = 50000;
  69.   $npage = 1;
  70.   $allLinks = array();
  71.  
  72.   while($npage <= $npages)
  73.   {
  74.     $ch = curl_init();
  75.                                
  76.     curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q='.$wht.'&first='.$npage);
  77.     curl_setopt($ch, CURLOPT_HEADER, 1);
  78.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  79.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  80.     curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');
  81.     curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
  82.  
  83.     $result['EXE'] = curl_exec($ch);
  84.     $result['ERR'] = curl_error($ch);
  85.  
  86.     curl_close($ch);
  87.  
  88.     if (!$result['ERR'])
  89.     {
  90.         preg_match_all('(<div class="sb_tlst">.*<h3>.*<a href="(.*)".*>(.*)</a>.*</h3>.*</div>)siU', $result['EXE'], $findlink);
  91.        
  92.         for ($i = 0; $i < count($findlink[1]); $i++)
  93.        
  94.         $mode = ($url_mode == 1) ? $allLinks[] = $this->clean_url($findlink[1][$i]) : $allLinks[] = $findlink[1][$i];
  95.  
  96.         $npage = $npage + 10;
  97.         if (preg_match('(first=' . $npage . '&amp)siU', $result['EXE'], $linksuiv) == 0)
  98.             break;             
  99.     }
  100.     else
  101.         break;
  102.     }
  103.  
  104.     foreach ($allLinks as $kk => $vv){ $allDmns[] = $vv; }
  105.  
  106.     return array_unique($allDmns);
  107.    
  108.     }
  109.        
  110.     public function clean_url($x){ $z=parse_url($x); return $z['scheme']."://".$z['host']."/";; }
  111.    
  112.     }
  113.  
  114. ?>
  115. Coded By <font color=red>Inconnu Dz</font>
Add Comment
Please, Sign In to add comment