!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/rhpl/   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:     simpleconfig.py (2.28 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#
# simpleconifg.py - representation of a simple configuration file (sh-like)
#
# Matt Wilson <msw@redhat.com>
# Jeremy Katz <katzj@redhat.com>
#
# Copyright 1999-2002 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
#
# You should have received a copy of the GNU Library Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

import string
import os

# use our own ASCII only uppercase function to avoid locale issues
# not going to be fast but not important
def uppercase_ASCII_string(str):
    newstr = ""
    for i in range(0,len(str)):
    if str[i] in string.lowercase:
        newstr += chr(ord(str[i])-32)
    else:
        newstr += str[i]
        
    return newstr

class SimpleConfigFile:
    def __str__ (self):
        s = ""
        keys = self.info.keys ()
        keys.sort ()
        for key in keys:
            # FIXME - use proper escaping
            if type (self.info[key]) == type(""):
                s = s + key + "=\"" + self.info[key] + "\"\n"
        return s

    def __init__ (self):
        self.info = {}

    def write(self, file):
        f = open(file, "w")
        f.write(self.__str__())
        f.close()

    def read(self, file):
        if not os.access(file, os.R_OK):
            return
        
        f = open(file, "r")
        lines = f.readlines()
        f.close()

        for line in lines:
            fields = line[:-1].split('=', 2)
            if len(fields) < 2:
                # how am I supposed to know what to do here?
                continue
            key = uppercase_ASCII_string(fields[0])
            value = fields[1]
            # XXX hack
            value = value.replace('"', '')
            value = value.replace("'", '')
            self.info[key] = value

    def set (self, *args):
        for (key, data) in args:
            self.info[uppercase_ASCII_string(key)] = data

    def unset (self, *keys):
        for key in keys:
            key = uppercase_ASCII_string(key)
            if self.info.has_key (key):
               del self.info[key] 

    def get (self, key):
        key = uppercase_ASCII_string(key)
        if self.info.has_key (key):
            return self.info[key]
        else:
            return ""



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