!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/Symfony/Component/ClassLoader/   drwxr-xr-x
Free 294.54 GB of 429.69 GB (68.55%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\ClassLoader;

/**
 * ClassMapGenerator
 *
 * @author Gyula Sallai <salla016@gmail.com>
 */
class ClassMapGenerator
{
    
/**
     * Generate a class map file
     *
     * @param array|string $dirs Directories or a single path to search in
     * @param string       $file The name of the class map file
     */
    
public static function dump($dirs$file)
    {
        
$dirs = (array) $dirs;
        
$maps = array();

        foreach (
$dirs as $dir) {
            
$maps array_merge($maps, static::createMap($dir));
        }

        
file_put_contents($filesprintf('<?php return %s;'var_export($mapstrue)));
    }

    
/**
     * Iterate over all files in the given directory searching for classes
     *
     * @param \Iterator|string $dir The directory to search in or an iterator
     *
     * @return array A class map array
     */
    
public static function createMap($dir)
    {
        if (
is_string($dir)) {
            
$dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir));
        }

        
$map = array();

        foreach (
$dir as $file) {
            if (!
$file->isFile()) {
                continue;
            }

            
$path $file->getRealPath();

            if (
pathinfo($pathPATHINFO_EXTENSION) !== 'php') {
                continue;
            }

            
$classes self::findClasses($path);

            foreach (
$classes as $class) {
                
$map[$class] = $path;
            }

        }

        return 
$map;
    }

    
/**
     * Extract the classes in the given file
     *
     * @param string $path The file to check
     *
     * @return array The found classes
     */
    
private static function findClasses($path)
    {
        
$contents file_get_contents($path);
        
$tokens   token_get_all($contents);
        
$T_TRAIT  version_compare(PHP_VERSION'5.4''<') ? -T_TRAIT;

        
$classes = array();

        
$namespace '';
        for (
$i 0$max count($tokens); $i $max$i++) {
            
$token $tokens[$i];

            if (
is_string($token)) {
                continue;
            }

            
$class '';

            switch (
$token[0]) {
                case 
T_NAMESPACE:
                    
$namespace '';
                    
// If there is a namespace, extract it
                    
while (($t $tokens[++$i]) && is_array($t)) {
                        if (
in_array($t[0], array(T_STRINGT_NS_SEPARATOR))) {
                            
$namespace .= $t[1];
                        }
                    }
                    
$namespace .= '\\';
                    break;
                case 
T_CLASS:
                case 
T_INTERFACE:
                case 
$T_TRAIT:
                    
// Find the classname
                    
while (($t $tokens[++$i]) && is_array($t)) {
                        if (
T_STRING === $t[0]) {
                            
$class .= $t[1];
                        } elseif (
$class !== '' && T_WHITESPACE == $t[0]) {
                            break;
                        }
                    }

                    
$classes[] = ltrim($namespace.$class'\\');
                    break;
                default:
                    break;
            }
        }

        return 
$classes;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.1983 ]--