!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.51 GB of 27.03 GB (13%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Agent.py (3.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Server/Client/Commands/Agent.py,v 1.15 2004/10/19 13:32:31 uogbuji Exp $
"""
Implementation of '4ss agent' command
(functions defined here are used by the Ft.Lib.CommandLine framework)

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

__doc__ = """This command will set a default username, password hash, \
hostname and port in an environment variable in a new shell so that you \
do not need to provide this info for subsequent invocations of 4ss \
command-line scripts. The username and password must be valid for the \
repository server on the given host and port. This command is an \
alternative to the login command."""

import os, sys

from Ft.Server.Client import Core, FtServerClientException
from Ft.Server.Common import ClAuthenticate

AGENT_ENV_VAR = 'FTSS_AGENT'


def TextAgent(options, args):

    userName = ClAuthenticate.GetUserName(
        prompt='Default username for auto-logins in the new session: ', emptyOK=False)

    passwd = ClAuthenticate.GetPass('Password for %s: ' % userName)
    passwdHash = ClAuthenticate.HashPasswd(passwd)

    host = ClAuthenticate.GetHostName('Default host for auto-logins in the new session <%s>: ' % Core.FTRPC_HOST)
    host = host or Core.FTRPC_HOST
    port = ClAuthenticate.GetPort('Default port for auto-logins in the new session <%i>: ' % Core.FTRPC_PORT)
    try:
        port = int(port or Core.FTRPC_PORT)
    except ValueError:
        raise ValueError('Invalid port %r' % port)

    sys.stderr.write('Verifying login...')
    sys.stderr.flush()

    repo = Core.GetRepository(userName, passwdHash, host, port)
    if repo is None:
        sys.stderr.write('Failed.\n%s\n' % str(e))
        sys.stderr.flush()
        return
    else:
        sys.stderr.write('Success!\n')
        sys.stderr.flush()
        try:
            repo.txRollback()
        except:
            pass

    os.environ[AGENT_ENV_VAR] = repr((userName, passwdHash, host, port))

    shell = args.get('shell')
    if not shell:
        shell = os.environ.get('SHELL')
    if not shell:
        shell = os.environ.get('shell')

    if not shell and os.name == 'posix':
        shell = '/bin/sh'
    elif not shell:
        shell = os.environ.get('COMSPEC')
        if not shell:
            shell = 'COMMAND.COM'

    print "Starting new shell: %s" % shell
    os.system(shell)
    return


def Register():
    from Ft.Lib.CommandLine import Options, Command, Arguments
    cmd = Command.Command('agent',
                          'Spawn a subshell that knows authentication defaults',
                          '',
                          __doc__,
                          function = TextAgent,
                          arguments = [Arguments.OptionalArgument('shell',
                                                                  'name of shell to execute (default is system specific)',
                                                                  str),
                                       ],

                          fileName = __file__,
                          )
    return cmd

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