pc6a学习分享

技术知识分享

一键清除阿里云ECS/轻应用服务器自带的云盾安骑士监控脚本

本脚本支持清除阿里云安装的云盾安骑士监控。


使用方法

使用SSH软件连接服务器,输入以下命令,将会自动清除云盾安骑士监控。

wget -N --no-check-certificate https://raw.githubusercontent.com/123wbx321wbx/Uninstall-aliyun-service/master/UAS.sh && chmod 777 UAS.sh && ./UAS.sh

Github项目地址
https://github.com/babywbx/Uninstall-aliyun-service
源码:

#!/bin/bash
# Author: wbx123
# Blog: https://wbx123.com

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

get_char()
{
SAVEDSTTY=`stty -g`
stty -echo
stty cbreak
dd if=/dev/tty bs=1 count=1 2> /dev/null
stty -raw
stty echo
stty $SAVEDSTTY
}

clear
printf "
#######################################################################
#                    Uninstall-aliyun-service    V1.0.5               #
#       For more information please visit https://wbx123.com          #
#######################################################################
"

echo ""
echo "Press any key to continue!"
char=`get_char`

clear

# Check if user is root
[ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }

mkdir Uninstall-aliyun-service
chmod 777 Uninstall-aliyun-service
cd Uninstall-aliyun-service

clear

yum install redhat-lsb -y

wget http://update.aegis.aliyun.com/download/uninstall.sh
chmod +x uninstall.sh
./uninstall.sh
wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
chmod +x quartz_uninstall.sh
./quartz_uninstall.sh
pkill aliyun-service
rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service
rm -rf /usr/local/aegis*
rm /usr/sbin/aliyun-service
rm /lib/systemd/system/aliyun.service
iptables -I INPUT -s 140.205.201.0/28 -j DROP
iptables -I INPUT -s 140.205.201.16/29 -j DROP
iptables -I INPUT -s 140.205.201.32/28 -j DROP
iptables -I INPUT -s 140.205.225.192/29 -j DROP
iptables -I INPUT -s 140.205.225.200/30 -j DROP
iptables -I INPUT -s 140.205.225.184/29 -j DROP
iptables -I INPUT -s 140.205.225.183/32 -j DROP
iptables -I INPUT -s 140.205.225.206/32 -j DROP
iptables -I INPUT -s 140.205.225.205/32 -j DROP
iptables -I INPUT -s 140.205.225.195/32 -j DROP
iptables -I INPUT -s 140.205.225.204/32 -j DROP
iptables -I INPUT -s 106.11.222.0/23 -j DROP
iptables -I INPUT -s 106.11.224.0/24 -j DROP
iptables -I INPUT -s 106.11.228.0/22 -j DROP
service iptables save
rm -rf /etc/motd
wget -O /etc/motd -N --no-check-certificate https://raw.githubusercontent.com/123wbx321wbx/Uninstall-aliyun-service/master/Other/motd
cd -
rm -rf Uninstall-aliyun-service
clear

printf "
#######################################################################
#                    Uninstall-aliyun-service    V1.0.5               #
#                                 Done!                               #
#######################################################################
"
未经允许不得转载:pc6a学习分享 » 一键清除阿里云ECS/轻应用服务器自带的云盾安骑士监控脚本

评论 2

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. 大佬,你的网站地图是哪个插件啊?我找了好久都没找到你这种,好简洁、能发个名字不?

    ITren (2018-12-02) 回复