!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/sax/drivers2/   drwxr-xr-x
Free 50.79 GB of 127.8 GB (39.74%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     drv_sgmllib.py (3.66 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""
A SAX 2.0 driver for sgmllib.

$Id: drv_sgmllib.py,v 1.3 2001/12/30 12:13:45 loewis Exp $
"""

import types, string

import sgmllib
from xml.sax import SAXNotSupportedException, SAXNotRecognizedException
from xml.sax.xmlreader import IncrementalParser

# ===== DRIVER

class SgmllibDriver(sgmllib.SGMLParser, IncrementalParser):

    # ===== SAX 2.0 INTERFACES

    # --- XMLReader methods

    def __init__(self):
        sgmllib.SGMLParser.__init__(self)
        IncrementalParser.__init__(self)
        self._sysid = None
        self._pubid = None

    def prepareParser(self, source):
        self._sysid = source.getSystemId()
        self._pubid = source.getPublicId()
        self._cont_handler.startDocument()

    def close(self):
        sgmllib.SGMLParser.close(self)
        self._cont_handler.endDocument()

    def setLocale(self, locale):
        raise SAXNotSupportedException("setLocale not supported")

    def getFeature(self, name):
        raise SAXNotRecognizedException("Feature '%s' not recognized" % name)

    def setFeature(self, name, state):
        raise SAXNotRecognizedException("Feature '%s' not recognized" % name)

    def getProperty(self, name):
        raise SAXNotRecognizedException("Property '%s' not recognized" % name)

    def setProperty(self, name, value):
        raise SAXNotRecognizedException("Property '%s' not recognized" % name)

    # --- Locator methods

    def getColumnNumber(self):
        return -1

    def getLineNumber(self):
        return -1

    def getPublicId(self):
        return self._pubid

    def getSystemId(self):
        return self._sysid

    # ===== HTMLLIB INTERFACES

    def unknown_starttag(self, name, attrs):
        self._cont_handler.startElement(name, AttributesImpl(attrs))

    def unknown_endtag(self, name):
        self._cont_handler.endElement(name)

    def handle_data(self, data):
        self._cont_handler.characters(data)

# ===== ATTRIBUTESIMPL =====

class AttributesImpl:

    def __init__(self, attrs):
        "attrs has the form [(name, value), (name, value)...]"
        self._attrs = attrs

    def getLength(self):
        return len(self._attrs)

    def getType(self, name):
        return "CDATA"

    def getValue(self, name):
        for (aname, avalue) in self._attrs:
            if aname == name:
                return avalue
        raise KeyError, name

    def getValueByQName(self, name):
        for (aname, avalue) in self._attrs:
            if aname == name:
                return avalue
        raise KeyError, name

    def getNameByQName(self, name):
        for (aname, avalue) in self._attrs:
            if aname == name:
                return name
        raise KeyError, name

    def getQNameByName(self, name):
        return self.getNameByQName(name)

    def getNames(self):
        return map(lambda x: x[0], self._attrs)

    def getQNames(self):
        return map(lambda x: x[0], self._attrs)

    def __len__(self):
        return len(self._attrs)

    def __getitem__(self, name):
        for (aname, avalue) in self._attrs:
            if aname == name:
                return avalue
        raise KeyError, name

    def keys(self):
        return self.getNames()

    def has_key(self, name):
        for (aname, avalue) in self._attrs:
            if aname == name:
                return 1
        return 0

    def get(self, name, alternative=None):
        for (aname, avalue) in self._attrs:
            if aname == name:
                return avalue

    def copy(self):
        return self.__class__(self._attrs)

    def items(self):
        return self._attrs

    def values(self):
        return map(lambda x: x[1], self._attrs)

# ---

def create_parser():
    return SgmllibDriver()

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