!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/laravel/framework/src/Illuminate/Database/Schema/   drwxr-xr-x
Free 13.06 GB of 57.97 GB (22.53%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Illuminate\Database\Schema;

use 
Illuminate\Database\Connection;

class 
PostgresSchemaState extends SchemaState
{
    
/**
     * Dump the database's schema into a file.
     *
     * @param  \Illuminate\Database\Connection  $connection
     * @param  string  $path
     * @return void
     */
    
public function dump(Connection $connection$path)
    {
        
$commands collect([
            
$this->baseDumpCommand().' --schema-only > '.$path,
            
$this->baseDumpCommand().' -t '.$this->migrationTable.' --data-only >> '.$path,
        ]);

        
$commands->map(function ($command$path) {
            
$this->makeProcess($command)->mustRun($this->outputarray_merge($this->baseVariables($this->connection->getConfig()), [
                
'LARAVEL_LOAD_PATH' => $path,
            ]));
        });
    }

    
/**
     * Load the given schema file into the database.
     *
     * @param  string  $path
     * @return void
     */
    
public function load($path)
    {
        
$command 'pg_restore --no-owner --no-acl --clean --if-exists --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --username="${:LARAVEL_LOAD_USER}" --dbname="${:LARAVEL_LOAD_DATABASE}" "${:LARAVEL_LOAD_PATH}"';

        if (
str_ends_with($path'.sql')) {
            
$command 'psql --file="${:LARAVEL_LOAD_PATH}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --username="${:LARAVEL_LOAD_USER}" --dbname="${:LARAVEL_LOAD_DATABASE}"';
        }

        
$process $this->makeProcess($command);

        
$process->mustRun(nullarray_merge($this->baseVariables($this->connection->getConfig()), [
            
'LARAVEL_LOAD_PATH' => $path,
        ]));
    }

    
/**
     * Get the base dump command arguments for PostgreSQL as a string.
     *
     * @return string
     */
    
protected function baseDumpCommand()
    {
        return 
'pg_dump --no-owner --no-acl --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --username="${:LARAVEL_LOAD_USER}" --dbname="${:LARAVEL_LOAD_DATABASE}"';
    }

    
/**
     * Get the base variables for a dump / load command.
     *
     * @param  array  $config
     * @return array
     */
    
protected function baseVariables(array $config)
    {
        
$config['host'] ??= '';

        return [
            
'LARAVEL_LOAD_HOST' => is_array($config['host']) ? $config['host'][0] : $config['host'],
            
'LARAVEL_LOAD_PORT' => $config['port'],
            
'LARAVEL_LOAD_USER' => $config['username'],
            
'PGPASSWORD' => $config['password'],
            
'LARAVEL_LOAD_DATABASE' => $config['database'],
        ];
    }
}

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