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

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/mis/system/libraries/   drwxr-xr-x
Free 51.01 GB of 127.8 GB (39.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Parser.php (4.32 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter
 *
 * An open source application development framework for PHP 5.1.6 or newer
 *
 * @package        CodeIgniter
 * @author        ExpressionEngine Dev Team
 * @copyright    Copyright (c) 2008 - 2011, EllisLab, Inc.
 * @license        http://codeigniter.com/user_guide/license.html
 * @link        http://codeigniter.com
 * @since        Version 1.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * Parser Class
 *
 * @package        CodeIgniter
 * @subpackage    Libraries
 * @category    Parser
 * @author        ExpressionEngine Dev Team
 * @link        http://codeigniter.com/user_guide/libraries/parser.html
 */
class CI_Parser {

    var 
$l_delim '{';
    var 
$r_delim '}';
    var 
$object;

    
/**
     *  Parse a template
     *
     * Parses pseudo-variables contained in the specified template view,
     * replacing them with the data in the second param
     *
     * @access    public
     * @param    string
     * @param    array
     * @param    bool
     * @return    string
     */
    
public function parse($template$data$return FALSE)
    {
        
$CI =& get_instance();
        
$template $CI->load->view($template$dataTRUE);

        return 
$this->_parse($template$data$return);
    }

    
// --------------------------------------------------------------------

    /**
     *  Parse a String
     *
     * Parses pseudo-variables contained in the specified string,
     * replacing them with the data in the second param
     *
     * @access    public
     * @param    string
     * @param    array
     * @param    bool
     * @return    string
     */
    
function parse_string($template$data$return FALSE)
    {
        return 
$this->_parse($template$data$return);
    }

    
// --------------------------------------------------------------------

    /**
     *  Parse a template
     *
     * Parses pseudo-variables contained in the specified template,
     * replacing them with the data in the second param
     *
     * @access    public
     * @param    string
     * @param    array
     * @param    bool
     * @return    string
     */
    
function _parse($template$data$return FALSE)
    {
        if (
$template == '')
        {
            return 
FALSE;
        }

        foreach (
$data as $key => $val)
        {
            if (
is_array($val))
            {
                
$template $this->_parse_pair($key$val$template);
            }
            else
            {
                
$template $this->_parse_single($key, (string)$val$template);
            }
        }

        if (
$return == FALSE)
        {
            
$CI =& get_instance();
            
$CI->output->append_output($template);
        }

        return 
$template;
    }

    
// --------------------------------------------------------------------

    /**
     *  Set the left/right variable delimiters
     *
     * @access    public
     * @param    string
     * @param    string
     * @return    void
     */
    
function set_delimiters($l '{'$r '}')
    {
        
$this->l_delim $l;
        
$this->r_delim $r;
    }

    
// --------------------------------------------------------------------

    /**
     *  Parse a single key/value
     *
     * @access    private
     * @param    string
     * @param    string
     * @param    string
     * @return    string
     */
    
function _parse_single($key$val$string)
    {
        return 
str_replace($this->l_delim.$key.$this->r_delim$val$string);
    }

    
// --------------------------------------------------------------------

    /**
     *  Parse a tag pair
     *
     * Parses tag pairs:  {some_tag} string... {/some_tag}
     *
     * @access    private
     * @param    string
     * @param    array
     * @param    string
     * @return    string
     */
    
function _parse_pair($variable$data$string)
    {
        if (
FALSE === ($match $this->_match_pair($string$variable)))
        {
            return 
$string;
        }

        
$str '';
        foreach (
$data as $row)
        {
            
$temp $match['1'];
            foreach (
$row as $key => $val)
            {
                if ( ! 
is_array($val))
                {
                    
$temp $this->_parse_single($key$val$temp);
                }
                else
                {
                    
$temp $this->_parse_pair($key$val$temp);
                }
            }

            
$str .= $temp;
        }

        return 
str_replace($match['0'], $str$string);
    }

    
// --------------------------------------------------------------------

    /**
     *  Matches a variable pair
     *
     * @access    private
     * @param    string
     * @param    string
     * @return    mixed
     */
    
function _match_pair($string$variable)
    {
        if ( ! 
preg_match("|" preg_quote($this->l_delim) . $variable preg_quote($this->r_delim) . "(.+?)"preg_quote($this->l_delim) . '/' $variable preg_quote($this->r_delim) . "|s"$string$match))
        {
            return 
FALSE;
        }

        return 
$match;
    }

}
// END Parser Class

/* End of file Parser.php */
/* Location: ./system/libraries/Parser.php */

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0067 ]--