!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/m2crypto-0.16/demo/ssl/   drwxr-xr-x
Free 50.88 GB of 127.8 GB (39.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

"""Demo for client-side ssl_dispatcher usage. Note that connect() 
is blocking. (Need fix?) 

This isn't really a HTTPS client; it's just a toy.

Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved."""

import asyncore, sys, time
from M2Crypto import Rand, SSL

class https_client(SSL.ssl_dispatcher):

    def __init__(self, host, path, ssl_ctx):
        SSL.ssl_dispatcher.__init__(self)
        self.path = path
        self.buffer = 'GET %s HTTP/1.0\r\n\r\n' % self.path
        self.create_socket(ssl_ctx)
        self.socket.connect((host, 19443))
        self._can_read = 1
        self._count = 0

    def handle_connect(self):
        pass

    def readable(self):
        return self._can_read

    def handle_read(self):
        try:
            result = self.recv()
            if result is None:
                return
            elif result == '':
                self._can_read = 0
                sys.stdout.write('%s: total: %5d\n' % (self.path, self._count,))
                sys.stdout.flush()
                self.close()
            else:
                #print result
                l = len(result)
                self._count = self._count + l
                display = (time.time(), l, self.path)
                sys.stdout.write('%14.3f: read %5d from %s\n' % display)
                sys.stdout.flush()
        except SSL.SSLError, why:
            print 'handle_read:', why
            self.close()
            raise

    def writable(self):
        return (len(self.buffer) > 0)

    def handle_write(self):
        try:
            sent = self.send(self.buffer)
            self.buffer = self.buffer[sent:]
        except SSL.SSLError, why:
            print 'handle_write:', why
            self.close()


if __name__ == '__main__':
    Rand.load_file('../randpool.dat', -1) 
    ctx = SSL.Context()
    url = ('/jdk118/api/u-names.html', 
        '/postgresql/xfunc-c.html', 
        '/python2.1/modindex.html')
    for u in url:
        https_client('localhost', u, ctx)
    asyncore.loop()
    Rand.save_file('../randpool.dat')


# Here's a sample output. Server is Apache+mod_ssl on localhost.
# $ python https_cli_async.py 
# 991501090.682: read   278 from /python2.1/modindex.html
# 991501090.684: read   278 from /postgresql/xfunc-c.html
# 991501090.742: read  4096 from /postgresql/xfunc-c.html
# 991501090.743: read  4096 from /postgresql/xfunc-c.html
# 991501090.744: read  4096 from /postgresql/xfunc-c.html
# 991501090.744: read  4096 from /postgresql/xfunc-c.html
# 991501090.755: read  4096 from /postgresql/xfunc-c.html
# 991501090.756: read   278 from /jdk118/api/u-names.html
# 991501090.777: read  4096 from /postgresql/xfunc-c.html
# 991501090.778: read  4096 from /postgresql/xfunc-c.html
# 991501090.778: read  4096 from /postgresql/xfunc-c.html
# 991501090.782: read  4096 from /postgresql/xfunc-c.html
# 991501090.813: read  4096 from /python2.1/modindex.html
# 991501090.839: read  4096 from /jdk118/api/u-names.html
# 991501090.849: read  4096 from /python2.1/modindex.html
# 991501090.873: read  3484 from /postgresql/xfunc-c.html
# 991501090.874: read  4096 from /jdk118/api/u-names.html
# 991501090.874: read  4096 from /python2.1/modindex.html
#/postgresql/xfunc-c.html: total: 40626
# 991501090.886: read  4096 from /jdk118/api/u-names.html
# 991501090.886: read  2958 from /python2.1/modindex.html
# 991501090.887: read  4096 from /jdk118/api/u-names.html
#/python2.1/modindex.html: total: 15524
# 991501090.893: read  4096 from /jdk118/api/u-names.html
# 991501090.894: read  2484 from /jdk118/api/u-names.html
#/jdk118/api/u-names.html: total: 23242
# $



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