!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/share/doc/python-ldap-2.0.6/Demo/   drwxr-xr-x
Free 3.8 GB of 27.03 GB (14.07%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     simplebrowse.py (3.1 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#! python

#
# simple LDAP server browsing example
#

import ldap
import string
from traceback import print_exc

url = "ldap://ldap.openldap.org/"
dn = "dc=openldap,dc=org"

print "Connecting to", url

l = ldap.initialize(url)
l.bind_s("", "", ldap.AUTH_SIMPLE);

lastdn = dn
dnlist = None

while 1:

    #-- read a command
    try:
        cmd = raw_input(dn + "> ")
    except EOFError:
    print
    break

    try:

    if cmd == "?":
        print  "cd <dn>    - change DN to <dn>"
        print  "cd <n>    - change DN to number <n> of last 'ls'"
        print  "cd -    - change to previous DN"
        print  "cd ..    - change to one-level higher DN"
        print  "cd     - change to root DN"
        print  "ls    - list children of crrent DN"
        print  ".    - show attributes of current DN"
        print  "/<expr>    - list descendents matching filter <expr>"
        print  "?    - show this help"

    elif cmd == "ls":
        print "Children of", `dn`, ":"
        dnlist = []
        #
        # List the children at one level down from the current dn
        # We use the filter 'objectclass=*' to match everything.
        # We're not interested in attributes at this stage, so
        # we specify [] as the list of attribute names to retreive.
        #
        for name,attrs in l.search_s(dn, ldap.SCOPE_ONELEVEL,
            "objectclass=*", []):
            #-- shorten resulting dns for output brevity
            if name.startswith(dn+", "):
                shortname = "+ "+name[len(dn)+2:]
            elif name.endswith(", "+dn):
                shortname = name[:-len(dn)-2]+" +"
            else:
                shortname = name
            print " %3d. %s" % (len(dnlist), shortname)
            dnlist.append(name)

    elif cmd == "cd":
        dn = ""
        dnlist = None

    elif cmd.startswith("cd "):
        arg = cmd[3:]
        if arg == '-':
            lastdn,dn = dn,lastdn
        elif arg == '..':
            dn = string.join(ldap.explode_dn(dn)[1:], ",")
            dn = string.strip(dn)
                else:
                try:
                    i = int(arg)
                except:
                    godn = arg
                        else:
                    if dnlist is None:
                        print "do an ls first"
                                else:
                            godn = dnlist[i]
                        lastdn = dn
                        dn = godn

    elif cmd == ".":
        #
        # Retrieve all the attributes for the current dn.
        # We construct a search using SCOPE_BASE (ie just the
        # given DN) and again filter with "objectclass=*".
        # No attributes are listed, so the default is for
        # the client to receive all attributes on the DN.
        #
        print "Attributes of", `dn`, ":"
        for name,attrs in l.search_s(dn, ldap.SCOPE_BASE,
            "objectclass=*"):
            print "  %-24s" % name
            for k,vals in attrs.items():
                for v in vals:
                if len(v) > 200:
                    v = `v[:200]` + \
                        ("... (%d bytes)" % len(v))
                else:
                    v = `v`
                print "      %-12s: %s" % (k, v)

    elif cmd.startswith("/"):
        #
        # Search descendent objects to match a given filter.
        # We use SCOPE_SUBTREE to indicate descendents, and
        # again specify an empty attribute list to indicate
        # that we're not interested in them.
        #
        expr = cmd[1:]
        print "Descendents matching filter", `expr`, ":"
        for name,attrs in l.search_s(dn, ldap.SCOPE_SUBTREE,
            expr, []):
            print "  %24s", name

    else:
        print "unknown command - try '?' for help"

    except:
    print_exc()


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.003 ]--