!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/phpmyadmin/libraries/   drwxr-xr-x
Free 12.95 GB of 57.97 GB (22.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     db_table_exists.inc.php (3.34 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Ensure the database and the table exist (else move to the "parent" script)
 * and display headers
 *
 * @package PhpMyAdmin
 */

use PhpMyAdmin\Core;
use 
PhpMyAdmin\Message;
use 
PhpMyAdmin\Response;
use 
PhpMyAdmin\Url;

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

if (empty(
$is_db)) {
    if (
strlen($db) > 0) {
        
$is_db = @$GLOBALS['dbi']->selectDb($db);
    } else {
        
$is_db false;
    }

    if (! 
$is_db) {
        
// not a valid db name -> back to the welcome page
        
if (! defined('IS_TRANSFORMATION_WRAPPER')) {
            
$response Response::getInstance();
            if (
$response->isAjax()) {
                
$response->setRequestStatus(false);
                
$response->addJSON(
                    
'message',
                    
Message::error(__('No databases selected.'))
                );
            } else {
                
$url_params = array('reload' => 1);
                if (isset(
$message)) {
                    
$url_params['message'] = $message;
                }
                if (! empty(
$sql_query)) {
                    
$url_params['sql_query'] = $sql_query;
                }
                if (isset(
$show_as_php)) {
                    
$url_params['show_as_php'] = $show_as_php;
                }
                
Core::sendHeaderLocation(
                    
'./index.php'
                    
Url::getCommonRaw($url_params)
                );
            }
            exit;
        }
    }
// end if (ensures db exists)

if (empty($is_table)
    && !
defined('PMA_SUBMIT_MULT')
    && !
defined('TABLE_MAY_BE_ABSENT')
) {
    
// Not a valid table name -> back to the db_sql.php

    
if (strlen($table) > 0) {
        
$is_table $GLOBALS['dbi']->getCachedTableContent(array($db$table), false);

        if (! 
$is_table) {
            
$_result $GLOBALS['dbi']->tryQuery(
                
'SHOW TABLES LIKE \''
                
$GLOBALS['dbi']->escapeString($table) . '\';',
                
PhpMyAdmin\DatabaseInterface::CONNECT_USER,
                
PhpMyAdmin\DatabaseInterface::QUERY_STORE
            
);
            
$is_table = @$GLOBALS['dbi']->numRows($_result);
            
$GLOBALS['dbi']->freeResult($_result);
        }
    } else {
        
$is_table false;
    }

    if (! 
$is_table) {
        if (!
defined('IS_TRANSFORMATION_WRAPPER')) {
            if (
strlen($table) > 0) {
                
// SHOW TABLES doesn't show temporary tables, so try select
                // (as it can happen just in case temporary table, it should be
                // fast):

                /**
                 * @todo should this check really
                 * only happen if IS_TRANSFORMATION_WRAPPER?
                 */
                
$_result $GLOBALS['dbi']->tryQuery(
                    
'SELECT COUNT(*) FROM ' PhpMyAdmin\Util::backquote($table)
                    . 
';',
                    
PhpMyAdmin\DatabaseInterface::CONNECT_USER,
                    
PhpMyAdmin\DatabaseInterface::QUERY_STORE
                
);
                
$is_table = ($_result && @$GLOBALS['dbi']->numRows($_result));
                
$GLOBALS['dbi']->freeResult($_result);
            }

            if (! 
$is_table) {
                include 
'./db_sql.php';
                exit;
            }
        }

        if (! 
$is_table) {
            exit;
        }
    }
// end if (ensures table exists)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0059 ]--