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


Viewing file:     mkxauth (10.6 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/sh
#
# mkxauth: script to make per-user Xauthority database
# formerly 'newcookie' script; modified 18-Jul-1996 jim knoble
#
########################################################################
# $Log: mkxauth,v $
# Revision 1.1  2004/03/10 20:21:41  mharris
# automated commit of xorg-x11-0.0.6.6-0.0.2004_03_09.0
#
# Revision 1.8mh  2004/02/23 mharris
# changed chown to use foo:bar instead of foo.bar as the latter has been
# deprecated.  This entry is added by hand as mkxauth isn't in CVS
#
# Revision 1.7  1996/10/23 21:34:23  jmknoble
# take path of least surprise if no command specified;
# if hostnames specified with -c, don't assume local host.
#
# Revision 1.6  1996/10/02 20:34:12  jmknoble
# updated help text again
#
# Revision 1.5  1996/10/02 20:10:03  jmknoble
# updated help text
#
# Revision 1.4  1996/10/02 20:03:26  jmknoble
# fixed quoting problem in key generation
#
# Revision 1.3  1996/08/20 16:31:30  jmknoble
# refined random key generation (using mcookie if available)
#
# Revision 1.2  1996/08/20 15:49:33  jmknoble
# replaced key generation using perl with method using md5sum
#
# Revision 1.1  1996/08/05 16:40:20  jmknoble
# Initial revision
#
########################################################################

#set -x

## default values for some variables
usr_umask=0077
# eventual exit status
sts=0
# verbose operation if blank
opt_vrbopr=''
# eventual string of non-option arguments
cmd_args=''
# filename for per-user Xauthority database
usrauth=.Xauthority
# username for whom to make per-user database
lclusr=`whoami`
# mode for making database; 
# valid values are 'create', 'merge-local', 
# 'merge-ftp', 'merge-rsh', 'merge-rzip',
# and 'none'
xauth_mode='none'
# actual path to target database
dstauth=''
# user to login as for rsh/rzip modes
rmtusr=`whoami`
# host to contact for remote Xauthority databases
rmthst=''
# local user to grab Xauthority from in merge mode
srcusr=''

########################################################################
# help message
function prthlp() {
    echo ""
    echo "  usage:  $0 [-q] [-u ] -m "
    echo "          $0 [-q] [-u ] -f "
    echo "          $0 [-q] [-u ] -r  [-l ]"
    echo "          $0 [-q] [-u ] -z  [-l ]"
    echo "          $0 [-q] [-u ] -c [ [ ... ]]"
    echo ""
    echo "  create or update an Xauthority database containing authentication"
    echo "  keys for the current user or a specified user on the local host."
    echo ""
    echo "  commands:"
    echo ""
    echo "  -m     merge the Xauthority database from local user "
    echo "                (if readable) with the target .Xauthority"
    echo ""
    echo "  -f      merge a remote Xauthority database with the target"
    echo "                .Xauthority, using ncftp"
    echo ""
    echo "  -r      merge a remote Xauthority database with the target"
    echo "                .Xauthority, using rsh"
    echo ""
    echo "  -z      merge a remote Xauthority database with the target"
    echo "                .Xauthority, using rsh and gzip"
    echo ""
    echo "  -c ...  create a local Xauthority database, or add keys to an"
    echo "                existing one, for all hosts listed (uses md5sum).  if"
    echo "                no hosts are listed, assume the local host."
    echo ""
    echo "  options:"
    echo ""
    echo "  -q            quiet operation"
    echo ""
    echo "  -u     create/merge .Xauthority for user "
    echo ""
    echo "  -l     for '-f', '-r' and '-z' modes, use  for the"
    echo "                remote login"
    echo ""

    exit 0
}

# check that current user is root
function chkroot() {
    if [ `whoami` != root ]; then
        echo "sorry---you need to be root" "$*"
        exit 1
    fi
}

# write a message to stdout iff verbose mode on
function msg() {
    if [ -z "$opt_vrbopr" ]; then
        echo "$@"
    fi
}

# check that a command exists
function chkcmdexs() {
    for i in $*; do
        if [ -z `type -p $i` ]; then
            echo "`basename $0`: error: can't find command '$i'"
            exit 1
        fi
    done
}

# check that a file exists, and create it if it doesn't
# *and* if we have write permissions to its parent dir
function chkfilexs() {
    for i in $*; do
        if [ ! -f "$i" ]; then
            if [ -w `dirname $i` ]; then
                msg -n "creating file $i ... "
                touch $i
                msg "done"
            fi
        fi
    done
}

# check if a file is readable
function redabl() {
    local srcfil=$1
    if [ -r "$srcfil" ]; then
        sts=0
    else
        echo "`basename $0`: error: cannot read file $srcfil"
        sts=1
    fi
    return $sts
}

# check if a file is writable
function wrtabl() {
    local dstfil=$1
    if [ -w "$dstfil" ]; then
        sts=0
    else
        echo "`basename $0`: error: cannot write to file $dstfil"
        sts=1
    fi
    return $sts
}

# set the correct ownership for a file
function givusr() {
    local lststs=$1
    local usrnam=$2
    local dstfil=$3
    if [ $lststs = 0 ]; then
        chown $usrnam:$usrnam $dstfil
        sts=0
    else
        msg ""
        echo "`basename $0`: error writing to file $dstfil"
        sts=1
    fi
    return $sts
}

########################################################################
# set our umask so that no one else can read our files
umask $usr_umask

# test some command-line args
while [ "$*" ]; do
    case $1 in
        -h 
bool(false)

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