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

/uploads/script/vendor/seld/phar-utils/src/   drwxr-xr-x
Free 13.19 GB of 57.97 GB (22.76%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of PHAR Utils.
 *
 * (c) Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Seld\PharUtils;

class 
Linter
{
    
/**
     * Lints all php files inside a given phar with the current PHP version
     *
     * @param string $path Phar file path
     */
    
public static function lint($path)
    {
        
$php defined('PHP_BINARY') ? PHP_BINARY 'php';

        if (
$isWindows defined('PHP_WINDOWS_VERSION_BUILD')) {
            
$tmpFile = @tempnam(sys_get_temp_dir(), '');

            if (!
$tmpFile || !is_writable($tmpFile)) {
                throw new 
\RuntimeException('Unable to create temp file');
            }

            
$php self::escapeWindowsPath($php);
            
$tmpFile self::escapeWindowsPath($tmpFile);

            
// PHP 8 encloses the command in double-quotes
            
if (PHP_VERSION_ID >= 80000) {
                
$format '%s -l %s';
            } else {
                
$format '"%s -l %s"';
            }

            
$command sprintf($format$php$tmpFile);
        } else {
            
$command "'".$php."' -l";
        }

        
$descriptorspec = array(
            
=> array('pipe''r'),
            
=> array('pipe''w'),
            
=> array('pipe''w')
        );

        foreach (new 
\RecursiveIteratorIterator(new \Phar($path)) as $file) {
            if (
$file->isDir()) {
                continue;
            }
            if (
substr($file, -4) === '.php') {
                
$filename = (string) $file;

                if (
$isWindows) {
                    
file_put_contents($tmpFilefile_get_contents($filename));
                }

                
$process proc_open($command$descriptorspec$pipes);
                if (
is_resource($process)) {
                    if (!
$isWindows) {
                        
fwrite($pipes[0], file_get_contents($filename));
                    }
                    
fclose($pipes[0]);

                    
$stdout stream_get_contents($pipes[1]);
                    
fclose($pipes[1]);
                    
$stderr stream_get_contents($pipes[2]);
                    
fclose($pipes[2]);

                    
$exitCode proc_close($process);

                    if (
$exitCode !== 0) {
                        if (
$isWindows) {
                            
$stderr str_replace($tmpFile$filename$stderr);
                        }
                        throw new 
\UnexpectedValueException('Failed linting '.$file.': '.$stderr);
                    }
                } else {
                    throw new 
\RuntimeException('Could not start linter process');
                }
            }
        }

        if (
$isWindows) {
            @
unlink($tmpFile);
        }
    }

    
/**
     * Escapes a Windows file path
     *
     * @param string $path
     * @return string The escaped path
     */
    
private static function escapeWindowsPath($path)
    {
        
// Quote if path contains spaces or brackets
        
if (strpbrk($path" ()") !== false) {
            
$path '"'.$path.'"';
        }

        return 
$path;
    }
}

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