!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.73 GB of 127.8 GB (39.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     drv_javasax.py (5.78 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""
SAX driver for the Java SAX parsers. Can only be used in Jython.

$Id: drv_javasax.py,v 1.5 2003/01/26 09:08:51 loewis Exp $
"""

# --- Initialization

version = "0.10"
revision = "$Revision: 1.5 $"

import string
from xml.sax import xmlreader, saxutils
from xml.sax.handler import feature_namespaces
from xml.sax import _exceptions

# we only work in jython
import sys
if sys.platform[:4] != "java":
    raise _exceptions.SAXReaderNotAvailable("drv_javasax not available in CPython", None)
del sys

# get the necessary Java SAX classes
try:
    from java.lang import String
    from org.xml.sax import ContentHandler, SAXException
    from org.xml.sax.helpers import XMLReaderFactory
except ImportError:
    raise SAXReaderNotAvailable("SAX is not on the classpath", None)

# get some JAXP stuff
try:
    from javax.xml.parsers import SAXParserFactory, ParserConfigurationException
    factory = SAXParserFactory.newInstance()
    jaxp = 1
except ImportError:
    jaxp = 0

# --- JavaSAXParser

class JavaSAXParser(xmlreader.XMLReader, ContentHandler):
    "SAX driver for the Java SAX parsers."

    def __init__(self, jdriver = None):
        self._parser = create_java_parser(jdriver)
        self._parser.setFeature(feature_namespaces, 0)
        self._parser.setContentHandler(self)
        self._attrs = AttributesImpl()
        self._nsattrs = AttributesNSImpl()

    # XMLReader methods

    def parse(self, source):
        "Parse an XML document from a URL or an InputSource."
        self._source = saxutils.prepare_input_source(source)
        try:
            self._parser.parse(source)
        except SAXException, e:
            raise _exceptions.SAXException("", e)

    def getFeature(self, name):
        return self._parser.getFeature(name)

    def setFeature(self, name, state):
        self._parser.setFeature(name, state)

    def getProperty(self, name):
        return self._parser.getProperty(name)

    def setProperty(self, name, value):
        self._parser.setProperty(name, value)

    # ContentHandler methods

    def setDocumentLocator(self, locator):
        self._cont_handler.setDocumentLocator(locator)

    def startDocument(self):
        self._cont_handler.startDocument()
        self._namespaces = self._parser.getFeature(feature_namespaces)

    def startElement(self, uri, lname, qname, attrs):
        if self._namespaces:
            self._nsattrs._attrs = attrs
            self._cont_handler.startElementNS((uri or None, lname), qname,
                                              self._nsattrs)
        else:
            self._attrs._attrs = attrs
            self._cont_handler.startElement(qname, self._attrs)

    def characters(self, char, start, len):
        self._cont_handler.characters(str(String(char, start, len)))

    def ignorableWhitespace(self, char, start, len):
        self._cont_handler.ignorableWhitespace(str(String(char, start, len)))

    def endElement(self, uri, lname, qname):
        if self._namespaces:
            self._cont_handler.endElementNS((uri or None, lname), qname)
        else:
            self._cont_handler.endElement(qname)

    def endDocument(self):
        self._cont_handler.endDocument()

    def processingInstruction(self, target, data):
        self._cont_handler.processingInstruction(target, data)

# --- AttributesImpl

class AttributesImpl:

    def __init__(self, attrs = None):
        self._attrs = attrs

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

    def getType(self, name):
        return self._attrs.getType(name)

    def getValue(self, name):
        value = self._attrs.getValue(name)
        if value == None:
            raise KeyError(name)
        return value

    def getValueByQName(self, name):
        value = self._attrs.getValueByQName(name)
        if value == None:
            raise KeyError(name)
        return value

    def getNameByQName(self, name):
        value = self._attrs.getNameByQName(name)
        if value == None:
            raise KeyError(name)
        return value

    def getQNameByName(self, name):
        value = self._attrs.getQNameByName(name)
        if value == None:
            raise KeyError(name)
        return value

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

    def getQNames(self):
        return self._attrs.getQNames()

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

    def __getitem__(self, name):
        value = self._attrs.getValue(name)
        if value == None:
            raise KeyError(name)
        return value

    def keys(self):
        qnames = []
        for ix in range(self._attrs.getLength()):
            qnames.append(self._attrs.getQName(ix))
        return qnames

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

    def items(self):
        list = []
        for name in self._attrs.getQNames():
            list.append((name, self._attrs.getValue(name)))
        return list

    def values(self):
        return map(self._attrs.getValue, self._attrs.getQNames())

    def get(self, name, alt = None):
        value = self._attrs.getValue(name)
        if value != None:
            return value
        else:
            return alt

    def has_key(self, name):
        return self._attrs.getValue(name) != None

# --- AttributesNSImpl

class AttributesNSImpl:

    def __init__(self):
        self._attrs = None

# ---

def create_java_parser(jdriver = None):
    try:
        if jdriver:
            return XMLReaderFactory.createXMLReader(jdriver)
        elif jaxp:
            return factory.newSAXParser().getXMLReader()
        else:
            return XMLReaderFactory.createXMLReader()
    except ParserConfigurationException, e:
        raise SAXReaderNotAvailable(e.getMessage())
    except SAXException, e:
        raise SAXReaderNotAvailable(e.getMessage())

def create_parser(jdriver = None):
    return JavaSAXParser(jdriver)

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