!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/phpMyAdmin/libraries/import/   drwxr-xr-x
Free 52.33 GB of 127.8 GB (40.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     xlsx.php (4.1 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Microsoft Office Excel 2007 XLSX import plugin for phpMyAdmin
 *
 * @todo    Pretty much everything
 * @package phpMyAdmin-Import
 */

if (! defined('PHPMYADMIN')) {
    exit;
}

/**
 * The possible scopes for $plugin_param are: 'table', 'database', and 'server'
 */

if (isset($plugin_list)) {
    
$plugin_list['xlsx'] = array(
        
'text' => __('Excel 2007 XLSX Workbook'),
        
'extension' => 'xlsx',
        
'options' => array(
                array(
'type' => 'begin_group''name' => 'general_opts'),
                array(
'type' => 'bool''name' => 'col_names''text' => __('The first line of the file contains the table column names <i>(if this is unchecked, the first line will become part of the data)</i>')),
                array(
'type' => 'end_group')
            ),
        
'options_text' => __('Options'),
        );
    
/* We do not define function when plugin is just queried for information above */
    
return;
}

ini_set('memory_limit''256M');
set_time_limit(120);

/* Append the PHPExcel directory to the include path variable */
set_include_path(get_include_path() . PATH_SEPARATOR getcwd() . '/libraries/PHPExcel/');

require_once 
'./libraries/PHPExcel/PHPExcel.php';
require_once 
'./libraries/PHPExcel/PHPExcel/Reader/Excel2007.php';

$objReader = new PHPExcel_Reader_Excel2007();
$objReader->setReadDataOnly(true);
$objReader->setLoadAllSheets();
$objPHPExcel $objReader->load($import_file);

$sheet_names $objPHPExcel->getSheetNames();
$num_sheets count($sheet_names);

$tables = array();
$tempRow = array();
$rows = array();
$col_names = array();

for (
$s 0$s $num_sheets; ++$s) {
    
$current_sheet $objPHPExcel->getSheet($s);
    
    
$num_rows $current_sheet->getHighestRow();
    
$num_cols PMA_getColumnNumberFromName($current_sheet->getHighestColumn());
    
    if (
$num_rows != && $num_cols != 1) {
        for (
$r 1$r <= $num_rows; ++$r) {
            for (
$c 0$c $num_cols; ++$c) {
                
$cell $current_sheet->getCellByColumnAndRow($c$r)->getCalculatedValue();
                
                if (! 
strcmp($cell'')) {
                    
$cell 'NULL';
                }
                
                
$tempRow[] = $cell;
            }
            
            
$rows[] = $tempRow;
            
$tempRow = array();
        }
        
        if (
$_REQUEST['xlsx_col_names']) {
            
$col_names array_splice($rows01);
            
$col_names $col_names[0];
            for (
$j 0$j $num_cols; ++$j) {
                if (! 
strcmp('NULL'$col_names[$j])) {
                    
$col_names[$j] = PMA_getColumnAlphaName($j 1);
                }
            }
        } else {
            for (
$n 0$n $num_cols; ++$n) {
                
$col_names[] = PMA_getColumnAlphaName($n 1);
            }
        }
        
        
$tables[] = array($sheet_names[$s], $col_names$rows);
        
        
$col_names = array();
        
$rows = array();
    }
}

unset(
$objPHPExcel);
unset(
$objReader);
unset(
$rows);
unset(
$tempRow);
unset(
$col_names);

/* Obtain the best-fit MySQL types for each column */
$analyses = array();

$len count($tables);
for (
$i 0$i $len; ++$i) {
    
$analyses[] = PMA_analyzeTable($tables[$i]);
}

/**
 * string $db_name (no backquotes)
 *
 * array $table = array(table_name, array() column_names, array()() rows)
 * array $tables = array of "$table"s
 *
 * array $analysis = array(array() column_types, array() column_sizes)
 * array $analyses = array of "$analysis"s
 *
 * array $create = array of SQL strings
 *
 * array $options = an associative array of options
 */

/* Set database name to the currently selected one, if applicable */
if (strlen($db)) {
    
$db_name $db;
    
$options = array('create_db' => false);
} else {
    
$db_name 'XLSX_DB';
    
$options NULL;
}

/* Non-applicable parameters */
$create NULL;

/* Created and execute necessary SQL statements from data */
PMA_buildSQL($db_name$tables$analyses$create$options);

unset(
$tables);
unset(
$analyses);

$finished true;
$error false;

/* Commit any possible data in buffers */
PMA_importRunQuery();
?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0064 ]--