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


Viewing file:     Console.php (3.58 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Used to render the console of PMA's pages
 *
 * @package PhpMyAdmin
 */
namespace PhpMyAdmin;

use 
PhpMyAdmin\Bookmark;
use 
PhpMyAdmin\Relation;
use 
PhpMyAdmin\Template;
use 
PhpMyAdmin\Util;

/**
 * Class used to output the console
 *
 * @package PhpMyAdmin
 */
class Console
{
    
/**
     * Whether to display anything
     *
     * @access private
     * @var bool
     */
    
private $_isEnabled;

    
/**
     * Whether we are servicing an ajax request.
     *
     * @access private
     * @var bool
     */
    
private $_isAjax;

    
/**
     * @var Relation
     */
    
private $relation;

    
/**
     * Creates a new class instance
     */
    
public function __construct()
    {
        
$this->_isEnabled true;
        
$this->relation = new Relation();
    }

    
/**
     * Set the ajax flag to indicate whether
     * we are servicing an ajax request
     *
     * @param bool $isAjax Whether we are servicing an ajax request
     *
     * @return void
     */
    
public function setAjax($isAjax)
    {
        
$this->_isAjax = (boolean) $isAjax;
    }

    
/**
     * Disables the rendering of the footer
     *
     * @return void
     */
    
public function disable()
    {
        
$this->_isEnabled false;
    }

    
/**
     * Renders the bookmark content
     *
     * @access public
     * @return string
     */
    
public static function getBookmarkContent()
    {
        
$cfgBookmark Bookmark::getParams($GLOBALS['cfg']['Server']['user']);
        if (
$cfgBookmark) {
            
$bookmarks Bookmark::getList(
                
$GLOBALS['dbi'],
                
$GLOBALS['cfg']['Server']['user']
            );
            
$count_bookmarks count($bookmarks);
            if (
$count_bookmarks 0) {
                
$welcomeMessage sprintf(
                    
_ngettext(
                        
'Showing %1$d bookmark (both private and shared)',
                        
'Showing %1$d bookmarks (both private and shared)',
                        
$count_bookmarks
                    
),
                    
$count_bookmarks
                
);
            } else {
                
$welcomeMessage __('No bookmarks');
            }
            unset(
$count_bookmarks$private_message$shared_message);
            return 
Template::get('console/bookmark_content')
                ->
render(
                    array(
                        
'welcome_message'    => $welcomeMessage,
                        
'bookmarks'         => $bookmarks,
                    )
                );
        }
        return 
'';
    }

    
/**
     * Returns the list of JS scripts required by console
     *
     * @return array list of scripts
     */
    
public function getScripts()
    {
        return array(
'console.js');
    }

    
/**
     * Renders the console
     *
     * @access public
     * @return string
     */
    
public function getDisplay()
    {
        if ((! 
$this->_isAjax) && $this->_isEnabled) {
            
$cfgBookmark Bookmark::getParams(
                
$GLOBALS['cfg']['Server']['user']
            );

            
$image Util::getImage('console'__('SQL Query Console'));
            
$_sql_history $this->relation->getHistory(
                
$GLOBALS['cfg']['Server']['user']
            );
            
$bookmarkContent = static::getBookmarkContent();

            return 
Template::get('console/display')->render([
                
'cfg_bookmark' => $cfgBookmark,
                
'image' => $image,
                
'sql_history' => $_sql_history,
                
'bookmark_content' => $bookmarkContent,
            ]);
        }
        return 
'';
    }
}

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