!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/share/doc/libxml2-python-2.6.26/   drwxr-xr-x
Free 52 GB of 127.8 GB (40.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     indexes.py (2.89 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/python -u
# -*- coding: ISO-8859-1 -*-
import sys
import libxml2

# Memory debug specific
libxml2.debugMemory(1)

ctxt = None

class callback:
    def __init__(self, startd, starte, ende, delta, endd):
        self.startd = startd
        self.starte = starte
        self.ende = ende
        self.endd = endd
        self.delta = delta
        self.count = 0

    def startDocument(self):
        global ctxt
        if ctxt.byteConsumed() != self.startd:
            print "document start at wrong index: %d expecting %d\n" % (
                  ctxt.byteConsumed(), self.startd)
            sys.exit(1)

    def endDocument(self):
        global ctxt
        expect = self.ende + self.delta * (self.count - 1) + self.endd
        if ctxt.byteConsumed() != expect:
            print "document end at wrong index: %d expecting %d\n" % (
                  ctxt.byteConsumed(), expect)
            sys.exit(1)

    def startElement(self, tag, attrs):
        global ctxt
        if tag == "bar1":
            expect = self.starte + self.delta * self.count
            if ctxt.byteConsumed() != expect:
                print "element start at wrong index: %d expecting %d\n" % (
                   ctxt.byteConsumed(), expect)
                sys.exit(1)
            

    def endElement(self, tag):
        global ctxt
        if tag == "bar1":
            expect = self.ende + self.delta * self.count
            if ctxt.byteConsumed() != expect:
                print "element end at wrong index: %d expecting %d\n" % (
                      ctxt.byteConsumed(), expect)
                sys.exit(1)
            self.count = self.count + 1

    def characters(self, data):
        pass

#
# First run a pure UTF-8 test
#
handler = callback(0, 13, 27, 198, 183)
ctxt = libxml2.createPushParser(handler, "<foo>\n", 6, "test.xml")
chunk = """  <bar1>chars1</bar1>
  <bar2>chars2</bar2>
  <bar3>chars3</bar3>
  <bar4>chars4</bar4>
  <bar5>chars5</bar5>
  <bar6>&lt;s6</bar6>
  <bar7>chars7</bar7>
  <bar8>&#38;8</bar8>
  <bar9>chars9</bar9>
"""
i = 0
while i < 10000:
    ctxt.parseChunk(chunk, len(chunk), 0)
    i = i + 1
chunk = "</foo>"
ctxt.parseChunk(chunk, len(chunk), 1)
ctxt=None

#
# Then run a test relying on ISO-Latin-1
#
handler = callback(43, 57, 71, 198, 183)
chunk="""<?xml version="1.0" encoding="ISO-8859-1"?>
<foo>
"""
ctxt = libxml2.createPushParser(handler, chunk, len(chunk), "test.xml")
chunk = """  <bar1>chars1</bar1>
  <bar2>chars2</bar2>
  <bar3>chars3</bar3>
  <bar4>chàrs4</bar4>
  <bar5>chars5</bar5>
  <bar6>&lt;s6</bar6>
  <bar7>chars7</bar7>
  <bar8>&#38;8</bar8>
  <bar9>très 9</bar9>
"""
i = 0
while i < 10000:
    ctxt.parseChunk(chunk, len(chunk), 0)
    i = i + 1
chunk = "</foo>"
ctxt.parseChunk(chunk, len(chunk), 1)
ctxt=None

# Memory debug specific
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
    print "OK"
else:
    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
    libxml2.dumpMemory()

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