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

/usr/lib/python2.4/site-packages/_xmlplus/xslt/   drwxr-xr-x
Free 50.74 GB of 127.8 GB (39.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AttributeValueTemplate.py (3.36 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
########################################################################
#
# File Name:   AttributeValueTemplate.py
#
#
"""
Implementation of AVTs from the XSLT Spec.
WWW: http://4suite.com/4XSLT        e-mail: support@4suite.com

Copyright (c) 1999-2000 FourThought Inc, USA.   All Rights Reserved.
See  http://4suite.com/COPYRIGHT  for license and copyright information
"""

import re, string
from xml.xslt import XsltException, Error
from xml.xpath import XPathParser, Conversions

g_braceSplitPattern = re.compile(r'([\{\}])')

class AttributeValueTemplate:
    def __init__(self, source,reparse = 1):
        self.source = source
        if reparse:
            self._plainParts = []
            self._parsedParts = []
            self._parse()

    def _parse(self):
        parser = XPathParser.XPathParser()
        curr_plain_part = ''
        curr_template_part = ''
        in_plain_part = 1
        split_form = re.split(g_braceSplitPattern, self.source)
        skip_flag = 0
        for i in range(len(split_form)):
            segment = split_form[i]
            if skip_flag:
                skip_flag = skip_flag - 1
                continue
            if segment in ['{', '}']:
                #Here we are accounting for a possible blank segment in between
                try:
                    next = split_form[i + 1] + split_form[i + 2]
                except IndexError:
                    next = None
                if next == segment:
                    if in_plain_part:
                        curr_plain_part = curr_plain_part + segment
                    else:
                        curr_template_part = curr_template_part + segment
                    skip_flag = 2
                elif segment == '{':
                    if in_plain_part:
                        self._plainParts.append(curr_plain_part)
                        in_plain_part = 0

                        curr_plain_part = ''
                    else:
                        raise XsltException(Error.AVT_SYNTAX)
                else:
                    if not in_plain_part:
                        parsed = parser.parseExpression(curr_template_part)
                        self._parsedParts.append(parsed)
                        in_plain_part = 1
                        curr_template_part = ''
                    else:
                        raise XsltException(Error.AVT_SYNTAX)
            else:
                if in_plain_part:
                    curr_plain_part = curr_plain_part + segment
                else:
                    curr_template_part = curr_template_part + segment
        if in_plain_part:
            self._plainParts.append(curr_plain_part)
        else:
            raise XsltException(Error.AVT_SYNTAX)

    def evaluate(self, context):
        result = ''
        expansions = map(
            lambda x, c=context: Conversions.StringValue(x.evaluate(c)),
            self._parsedParts
            )
        for i in range(len(self._parsedParts)):
            result = result + self._plainParts[i] + expansions[i]
        result = result + self._plainParts[-1]
        return result

    def __repr__(self):
        return self.source

    def __getinitargs__(self):
        return (self.source, 0)

    def __getstate__(self):
        return (self._plainParts,self._parsedParts)

    def __setstate__(self, state):
        # Nothing to do
        self._plainParts,self._parsedParts = state


:: 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 ::
 
[ Read-Only ]

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

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