!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/lib/python2.4/site-packages/Ft/Server/Client/Commands/   drwxr-xr-x
Free 3.71 GB of 27.03 GB (13.71%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     CommandUtil.py (2.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Server/Client/Commands/CommandUtil.py,v 1.11 2005/03/19 10:41:16 jkloth Exp $
"""
Functions used by various '4ss' command implementations.

Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
"""

import sys

from Ft.Lib import Wrap
from Ft.Server.Client import SmartLogin, FtServerClientException
from Ft.Server.Common import AclConstants

__all__ = ['GetRepository', 'WritePreamble']


def GetRepository(options, cmdName):
    """
    Given an options dictionary and the name of a command, uses the
    options in an attempt to obtain a repository access object, then
    verifies that the user attempting the access has execute access
    on the corresopnding Command resource in the repository. If
    successful, returns the repository access object. Otherwise,
    prints an exception message to standard error and returns None.
    """
    repo = None
    try:
        repo = SmartLogin(options)
        if cmdName is not None:
            cmd = repo.getCommand(cmdName)
            if cmd is None:
                raise ValueError("Unknown Command: " + cmdName)
            cmd.verifyAcl(AclConstants.EXECUTE_ACCESS,0)

    except FtServerClientException, e:
        sys.stderr.write(str(e)+'\n')
        sys.stderr.flush()
        repo = None

    return repo


def WritePreamble(heading, uchar='=', maxwidth=None, stream=sys.stderr):
    """
    Commands that need to preface their output with a preamble can
    use this function to write it to the output stream (a file-like
    object) in a consistent way. The given heading will be wrapped
    if necessary to fit within a maximum width, then will be written
    out, followed by a row a underline characters that is as wide
    as the widest line in the heading.
    """
    lines = heading.split('\n')
    longest_len = max(map(lambda s: len(s), lines))
    if maxwidth and maxwidth > 0 and longest_len >= maxwidth:
        heading = Wrap(heading, maxwidth)
        longest_len = max(map(lambda s: len(s), heading.split('\n')))
    stream.write(heading)
    if heading[-1] != '\n':
        stream.write('\n')
    stream.write(uchar * longest_len + '\n')
    stream.flush()
    return

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