!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 51 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:     async.py (4.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import pygtk; pygtk.require("2.0")
import gtk
import gnomevfs

def task_done():
    global counter
    counter -= 1
    if not counter:
        gtk.main_quit()

def write_callback(handle, bytes, exc_type, bytes_requested):
    print 'Write done:', handle, bytes, exc_type
    handle.close(lambda *args: None)
    task_done()
    
def read_callback(handle, buffer, exc_type, bytes_requested):
    print 'Read done:', handle, buffer, exc_type
    #handle.close(lambda *args: None)
    task_done()

def create_callback(handle, exc_type):
    print 'Create done', handle, exc_type
    if not exc_type:
        handle.write('Hello world!\n', write_callback)
    else:
        if issubclass(exc_type, gnomevfs.AccessDeniedError):
            print "Unable to create file: access denied"
        else:
            print "Unable to create file: unknown error"
        task_done()

def symlink_callback(handle, exc_type):
    print 'Symlink done:', handle, exc_type
    task_done()

def open_callback(handle, exc_type):
    print 'Open done:', handle, exc_type
    if not exc_type:
        handle.read(14, read_callback)
    else:
        task_done()


def info_callback(handle, results):
    for uri, exc_type, info in results:
        print '-'*len(str(uri))
        print uri
        print '-'*len(str(uri))
        if not exc_type:
            try:
                print 'mime_type:\t', info.mime_type
                print 'size (bytes):\t', info.size
                print 'permissions:\t%o' % (info.permissions,)
            except ValueError:
                pass
            print
        else:
            print 'Error:\t', exc_type
    task_done()

def dir_callback(handle, results, exc_type):
    if not exc_type or exc_type == gnomevfs.EOFError:
        for result in results:
            print result.name
            print '-'*len(str(result.name))
            try:
                print 'mime_type:\t', result.mime_type
                print 'size (bytes):\t', result.size
                print 'permissions:\t%o' % (result.permissions,)
            except ValueError:
                pass
            print
        if exc_type == gnomevfs.EOFError:
            task_done()
    else:
        print 'Error:\t', exc_type
        task_done()

counter = 0

print 'Current job limit:', gnomevfs.async.get_job_limit()

if 1:
    counter += 1
    print gnomevfs.async.get_file_info(('/etc/fstab',
                                         'http://www.gnome.org/index.html'),
                                        info_callback,
                                        options = gnomevfs.FILE_INFO_DEFAULT |
                                        gnomevfs.FILE_INFO_GET_MIME_TYPE)
if 1:
    counter += 1
    print gnomevfs.async.load_directory('/etc/skel',
                                         dir_callback,
                                         options =gnomevfs.FILE_INFO_DEFAULT |
                                         gnomevfs.FILE_INFO_GET_MIME_TYPE)


if 1:
    counter += 1
    print gnomevfs.async.open('/etc/fstab', open_callback)

if 1:
    counter += 1
    print gnomevfs.async.create('/tmp/test_file', create_callback)

if 1:
    counter += 1
    print gnomevfs.async.create_symbolic_link('/tmp/test_link',
                                               '/etc/fstab',
                                               symlink_callback)

def find_directory_cb(handle, results):
    print "Trash results:", results
    task_done()
    
if 1:
    counter += 1
    gnomevfs.async.find_directory(near_uri_list=[gnomevfs.URI("file:///home")],
                                  kind=gnomevfs.DIRECTORY_KIND_TRASH,
                                  create_if_needed=False,
                                  find_if_needed=True, permissions=0,
                                  callback=find_directory_cb)

def file_control_callback(handle, result, data):
    ## In this case, data contains a pointer to a string, not the
    ## string itself; quite useless from python.
    print "file control result: %r" % (result,)
    task_done()

def file_control(handle, exc_type):
    ## this is mostly useless, but I only discovered it after wrapping it.
    handle.control("file:test", ' '*256, file_control_callback)

if 1:
    counter += 1
    print gnomevfs.async.open('/etc/fstab', file_control)


if counter:
    gtk.main()

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