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


Viewing file:     shell.py (2.6 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/env python

import os

_boldcode = os.popen('tput bold', 'r').read()
_normal = os.popen('tput rmso', 'r').read()

import pygtk; pygtk.require("2.0")
import gnomevfs

class Shell:
    def __init__(self, cwd=None):
        if cwd:
            self.cwd = gnomevfs.URI(cwd)
        else:
            self.cwd = gnomevfs.URI(os.getcwd())
        if str(self.cwd)[-1] != '/':
            self.cwd = self.cwd.append_string('/')

    def run(self):
        while 1:
            try:
                line = raw_input('%s%s$%s ' % (_boldcode, self.cwd, _normal))
                words = line.split()
                command = getattr(self, words[0])
                args = words[1:]
                command(*args)
            except KeyboardInterrupt:
                break
            except EOFError:
                break
            except Exception, e:
                print "Error: %s:%s" % (e.__class__.__name__, str(e))

    def cd(self, dir):
        new_cwd = self.cwd.resolve_relative(dir)
        if str(new_cwd)[-1] != '/':
            new_cwd = new_cwd.append_string('/')
        if gnomevfs.get_file_info(new_cwd).type != \
               gnomevfs.FILE_TYPE_DIRECTORY:
            raise gnomevfs.error('%s is not a directory' % dir)
        self.cwd = new_cwd

    def pwd(self):
        print str(self.cwd)

    def ls(self, dir=''):
        dir = self.cwd.resolve_relative(dir)

        dhandle = gnomevfs.open_directory(dir)
        for file_info in dhandle:
            print file_info.name

    def less(self, file):
        file = self.cwd.resolve_relative(file)
        file_info = gnomevfs.get_file_info(file)
        fp = gnomevfs.open(file, gnomevfs.OPEN_READ)
        less = os.popen('less -m -F -', 'w')
        buffer = fp.read(file_info.size)
        less.write(buffer)
        less.close()
    more = less
    cat = less

    def stat(self, file):
        file = self.cwd.resolve_relative(file)
        file_info = gnomevfs.get_file_info(file, gnomevfs.FILE_INFO_GET_MIME_TYPE)
        print 'Name:      ', file_info.name

        file_type = '(none)'
        try: file_type = ('unknown', 'regular', 'directory',
                          'fifo', 'socket', 'chardev', 'blockdev',
                          'symlink')[file_info.type]
        except: pass
        print 'Type:      ', file_type

        file_size = '(unknown)'
        try: file_size = file_info.size
        except: pass
        print 'Size:      ', file_size

        mime_type = '(none)'
        try: mime_type = file_info.mime_type
        except: pass
        print 'Mime type: ', mime_type

if __name__ == '__main__':
    shell = Shell()
    shell.run()
    print

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