!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.29 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:     install-catalog (4.27 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/sh
# Script to install a catalog in the centralized SGML catalog
# Send any comments to Eric Bischoff <eric@caldera.de>
# This program is under GPL license. See LICENSE file for details.

# Set help message
SGML_HELP_MESSAGE="Usage: `basename $0` [<option>] <action>\n\
where <option> is:\n\
\040 -d|--delegate: \t\t\t Use DELEGATE instead of CATALOG\n\
and where <action> is:\n\
\040 -a|--add <centralized> <ordinary>: \t Declare ordinary catalog in the centralized catalog\n\
\040 -r|--remove <centralized> <ordinary>:\t Remove ordinary catalog from the centralized catalog\n\
\040 -h, --help: \t\t\t\t Print this help message and exit\n\
\040 -v, --version: \t\t\t Print the version number and exit\n"

# We need the files we create to be world readable
umask 022

# Set version message
SGML_VERSION_MESSAGE="sgml-common version 0.6.3 (install-catalog version 1.0)"

# Set type of pointer
SGML_POINTER="CATALOG"

# Set action to be performed
SGML_ACTION=""

# Set catalogs
SGML_CENTRALIZED=""
SGML_ORDINARY=""

# Process options
case $1 in
   -d|--delegate) SGML_POINTER="DELEGATE"
                shift 1
                ;;
esac

# Process actions
case $1 in
   -a|--add)    SGML_ACTION="addition"
        SGML_CENTRALIZED="$2"
        SGML_ORDINARY="$3"
        ;;
   -r|--remove)    if [ -z "$3" -o "$3" = "--version" ]
        then
          echo "install-catalog: Old syntax; doing nothing"
          exit 0
        fi
           SGML_ACTION="removal"
        SGML_CENTRALIZED="$2"
        SGML_ORDINARY="$3"
        ;;
   -h|--help)    echo -e $SGML_HELP_MESSAGE
        exit 0
        ;;
   -v|--version) echo -e $SGML_VERSION_MESSAGE
         exit 0
        ;;
   --install)   echo "install-catalog: Old syntax; doing nothing"
        exit 0
        ;;
   *)        echo -e $SGML_HELP_MESSAGE >&2
        exit 1
        ;;
esac

# Check that the super catalog can be created and changed and deleted
if [ ! -w /etc/sgml ]
then
  echo "`basename $0`: unable to write in /etc/sgml." >&2
  exit 2
fi
case $SGML_ACTION in
   addition)
    if [ -e /etc/sgml/catalog -a ! -w /etc/sgml/catalog ]
    then
      echo "`basename $0`: can not modify \"/etc/sgml/catalog\"." >&2
      exit 2
    fi
    ;;
   removal)
    if [ ! -w /etc/sgml/catalog ]
    then
      echo "`basename $0`: can not modify \"/etc/sgml/catalog\"." >&2
      exit 2
    fi
    ;;
esac

# Check that the centralized catalog can be created, changed and deleted
if [ -z "$SGML_CENTRALIZED" ]
then
  echo -e $SGML_HELP_MESSAGE >&2
  exit 1
fi
case $SGML_ACTION in
   addition)
    if [ -e "$SGML_CENTRALIZED" -a ! -w "$SGML_CENTRALIZED" ]
    then
      echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
      exit 2
    fi
    ;;
   removal)
    if [ ! -w "$SGML_CENTRALIZED" ]
    then
      echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
      exit 2
    fi
    ;;
esac

# Check that we have at least one ordinary package to process
if [ -z "$SGML_ORDINARY" ]
then
  echo -e $SGML_HELP_MESSAGE >&2
  exit 1
fi
case $SGML_ACTION in
   addition)
    if [ ! -s "$SGML_ORDINARY" ]
    then
      echo "`basename $0`: \"$SGML_ORDINARY\" does not exist or is empty." >&2
      exit 2
    fi
    ;;
esac

# Installation or removal of pointers
case $SGML_ACTION in
    addition)
    echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED"
    if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
    then
      echo "Warning: $SGML_ORDINARY is already installed in the centralized catalog $SGML_CENTRALIZED" >&2
    else
      echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> "$SGML_CENTRALIZED"
    fi
    grep -q "$SGML_CENTRALIZED" /etc/sgml/catalog 2>/dev/null
    if [ $? -ne 0 ]
    then
      echo "`basename $0`: addition of $SGML_CENTRALIZED in /etc/sgml/catalog"
      echo "$SGML_POINTER \"$SGML_CENTRALIZED\"" >> /etc/sgml/catalog
    fi
    ;;
   removal)
    echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED"
    if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
    then
          sed -e "\:$SGML_POINTER \"\\?$SGML_ORDINARY\"\\?:d" < "$SGML_CENTRALIZED" > "${SGML_CENTRALIZED}.new"
          mv "${SGML_CENTRALIZED}.new" "$SGML_CENTRALIZED"
    else
      echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2
    fi
    if [ ! -s "$SGML_CENTRALIZED" ]
    then
      rm "$SGML_CENTRALIZED"
      echo "`basename $0`: removal of $SGML_CENTRALIZED from /etc/sgml/catalog"
          sed -e "\:$SGML_POINTER \"\\?$SGML_CENTRALIZED\"\\?:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
          mv /etc/sgml/catalog.new /etc/sgml/catalog
    fi
    ;;
esac

exit 0

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