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


Viewing file:     orca (5.78 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/sh
#
# Orca
#
# Copyright 2006 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

# This script performs some clean up and will run Orca.  It will also
# rerun Orca if it detects that Orca died an unnatural death.

# __id__        = "$Id: orca.in,v 1.17 2006/08/30 12:35:15 wwalker Exp $"
# __version__   = "$Revision: 1.17 $"
# __date__      = "$Date: 2006/08/30 12:35:15 $"
# __copyright__ = "Copyright (c) 2005-2006 Sun Microsystems Inc."
# __license__   = "LGPL"

# If you set RUNONCE to "true", then this will just run Orca once and quit.
#
RUNONCE="false"

# A value of 1 means to run Orca.  A value of 0 means quit.
#
RUN=1

# Initially there will be no watchdog process id.
#
watchdog_pid=0

# Save the arguments away.
#
ARGS="$*"

# The watchdog will periodically ping Orca to see if it is responding.
# If orca isn't responding, the watchdog will kill the Orca process.
# The watchdog logic requires 'wget', so we won't do it if we can't
# find wget in the path.  Note also that you can force WATCHDOG=0 if you
# do not want a background process that periodically pings Orca to see
# if it is responding.
#
IFS=:
WGETCMD=
WATCHDOG=0
for dir in $PATH:/usr/sfw/bin:/usr/local/bin; do
    test -x "$dir/wget" && {
        WGETCMD="$dir/wget"
        WATCHDOG=1
        break
    }
done

# Cleans up any orca-related processes that might be running,
# restricting it to those processes owned by the user. These include
# orca itself, any gnome-speech synthesis drivers, and festival
# processes running in server mode.
#
cleanup()
{
    USERID=`id | cut -f2 -d= | cut -f1 -d\(`
    PIDS=`ps -eo pid,ruid,args | grep $USERID | egrep "orca[.]orca|synthesis-driver|festival [-][-]server" | grep -v grep | awk '{ print $1 }'`

    IFS='
    '
    PIDS=`echo $PIDS`

    if [ "x$PIDS" != "x" ]
    then
        kill -9 $PIDS > /dev/null 2>&1
    fi
}

# Runs orca.
#
runOrca()
{
    cleanup
    exec_prefix=/usr
    PYTHONPATH=${exec_prefix}/lib/python2.4/site-packages
    export PYTHONPATH
    /usr/bin/python -c "import orca.orca; orca.orca.main()" "$ARGS"
}

# Runs a watchdog process in the background.  It merely attempts to
# get to Orca via some other means than the AT-SPI.  Here we use
# Orca's http server at port 20433.  If it doesn't respond, then
# we assume Orca is dead.
#
watchdog()
{
    (
        sleep 30 # Give orca a chance to start.
        while [ "$WATCHDOG" -gt 0 ]
        do
            sleep 5
            USERID=`id | cut -f2 -d= | cut -f1 -d\(`
            PID=`ps -eo pid,ruid,args | grep $USERID | egrep "orca[.]orca" | grep -v grep | awk '{ print $1 }'`

            if [ "x$PID" = "x" ]
            then
                exit
            else
                $WGETCMD -q -t 0 -O /dev/null -w 2 "http://localhost:20433" || {
                    echo Orca watchdog detected something bad.  Cleaning up.
                    cleanup
                }
            fi
        done
    ) &
}

kill_watchdog()
{
    if [ "x$watchdog_pid" != x0 ]
    then
        kill -9 $watchdog_pid > /dev/null 2>&1
    fi
}

kill_orca()
{
    kill_watchdog
    cleanup
    exit
}

hup_orca()
{
    cleanup
}

main()
{
    if [ "$WATCHDOG" -gt 0 ]
    then
        watchdog
        watchdog_pid=$!
    fi
    while [ "$RUN" -gt 0 ]
    do
        runOrca &
	orca_pid=$!
	wait $orca_pid

        RUN=$?  # quit on a normal exit status from Orca

	# We will stop re-running Orca on SEGV's (139 = SEGV + 128).
	# The reason for this is that there are cases where Python
	# will SEGV when Orca attempts to exit normally.  This happens
	# because of something going on in pyorbit.  This should be
	# fixed in pyorbit 2.14.1, but not everyone has that.
	# So...we'll check for it.  
        #
	if [ "$RUN" -eq 139 ]
	then
	    RUN=0
        fi

	# We will also stop re-running Orca on KILL's (137 = KILL + 128).
	# The reason for this is that if someone has done a "kill -KILL"
	# on the Python process, it was probably on purpose and they want
	# everything to die.
        #
	if [ "$RUN" -eq 137 ]
	then
	    RUN=0
        fi
    done
    kill_watchdog
}

trap kill_orca QUIT TERM INT ABRT
trap hup_orca HUP

# Orca will fall into a text-based question and answer session if the
# user has not configured orca and/or accessibility yet.  We will
# force that to happen in the foreground (i.e., RUNONCE=true).  In
# addition, if the user passes any command line arguments to orca, we
# will run it in the foreground as well to avoid a situation where
# orca dumps itself into the text-based setup utility.
#
ACCESSIBILITY_ENABLED=`gconftool-2 --get /desktop/gnome/interface/accessibility`
if [ "x$ACCESSIBILITY_ENABLED" != "xtrue" ]
then
    # Because we will be running Orca in text-setup mode, we want to
    # make sure it is run in a terminal window.  If we're already in
    # a terminal, this is great.  If not, we spawn a gnome-terminal 
    # and run orca in it.
    #
    tty -s && IN_TTY="true" || IN_TTY="false"
    if [ "x$IN_TTY" = "xtrue" ]
    then
	RUNONCE="true"
    else
	exec gnome-terminal -x $0 $ARGS
    fi
fi

if [ "x$RUNONCE" = "xfalse" -a "x$ARGS" = "x" ]
then
    main
else
    if [ `echo $ARGS | grep -c "\-q"` -gt 0 ]
    then
        cleanup
    else
        runOrca
    fi
fi

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