!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/public_html/phpmyadmin/vendor/phpmyadmin/sql-parser/src/Utils/   drwxr-xr-x
Free 28.14 GB of 117.98 GB (23.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Error.php (2.91 KB)      -rwxr-x---
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
PhpMyAdmin\SqlParser\Utils;

use 
PhpMyAdmin\SqlParser\Exceptions\LexerException;
use 
PhpMyAdmin\SqlParser\Exceptions\ParserException;
use 
PhpMyAdmin\SqlParser\Lexer;
use 
PhpMyAdmin\SqlParser\Parser;

use function 
htmlspecialchars;
use function 
sprintf;

/**
 * Error related utilities.
 */
class Error
{
    
/**
     * Gets the errors of a lexer and a parser.
     *
     * @param array<int|string, Lexer|Parser> $objs objects from where the errors will be extracted
     *
     * @return array<int, array<int, int|string|null>> Each element of the array represents an error.
     *               `$err[0]` holds the error message.
     *               `$err[1]` holds the error code.
     *               `$err[2]` holds the string that caused the issue.
     *               `$err[3]` holds the position of the string.
     *               (i.e. `[$msg, $code, $str, $pos]`)
     */
    
public static function get($objs)
    {
        
$ret = [];

        foreach (
$objs as $obj) {
            if (
$obj instanceof Lexer) {
                
/** @var LexerException $err */
                
foreach ($obj->errors as $err) {
                    
$ret[] = [
                        
$err->getMessage(),
                        
$err->getCode(),
                        
$err->ch,
                        
$err->pos,
                    ];
                }
            } elseif (
$obj instanceof Parser) {
                
/** @var ParserException $err */
                
foreach ($obj->errors as $err) {
                    
$ret[] = [
                        
$err->getMessage(),
                        
$err->getCode(),
                        
$err->token->token,
                        
$err->token->position,
                    ];
                }
            }
        }

        return 
$ret;
    }

    
/**
     * Formats the specified errors.
     *
     * @param array<int, array<int, int|string|null>> $errors the errors to be formatted
     * @param string                                  $format The format of an error.
     *                       '$1$d' is replaced by the position of this error.
     *                       '$2$s' is replaced by the error message.
     *                       '$3$d' is replaced by the error code.
     *                       '$4$s' is replaced by the string that caused the
     *                       issue.
     *                       '$5$d' is replaced by the position of the string.
     *
     * @return string[]
     */
    
public static function format(
        
$errors,
        
$format '#%1$d: %2$s (near "%4$s" at position %5$d)'
    
) {
        
$ret = [];

        
$i 0;
        foreach (
$errors as $key => $err) {
            
$ret[$key] = sprintf(
                
$format,
                ++
$i,
                
$err[0],
                
$err[1],
                
htmlspecialchars((string) $err[2]),
                
$err[3]
            );
        }

        return 
$ret;
    }
}

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