惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
D
Docker
Last Week in AI
Last Week in AI
IT之家
IT之家
F
Fortinet All Blogs
A
About on SuperTechFans
P
Proofpoint News Feed
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
博客园_首页
月光博客
月光博客
博客园 - 司徒正美
Y
Y Combinator Blog

Yesterday17's Blog

2026 新年解密红包 / Melody Flag | Yesterday17's Blog 谈谈 Iori 的设计思路(二):如何实现一个 Showroom 录制工具? | Yesterday17's Blog 谈谈 Iori 的设计思路(一):从 Nico Timeshift 说起 | Yesterday17's Blog Iori Minyami 0.1.0 发布 | Yesterday17's Blog 2025 新年解密红包 / Melody Flag | Yesterday17's Blog 使用 Cloudflare Warp 解决罗森票务的海外登录问题 | Yesterday17's Blog How To Blog 04: The Astro v5 Era | Yesterday17's Blog 谈谈 tokio::select! 的公平性 | Yesterday17's Blog Learning Pingora 05 - Connect with TLS | Yesterday17's Blog Leaving Bytedance | Yesterday17's Blog 大橋彩香 AsiaTour「Reflection」上海公演 个人向记录 & Repo | Yesterday17's Blog Recoving from burnout - What happened? | Yesterday17 Yubikey 重建手册 | Yesterday17's Blog How To Blog 03: Heimus | Yesterday17's Blog 🪧 Blog Migration Accouncement | Yesterday17's Blog Learn Your IDE - VSCode 是如何仅重启插件的? | Yesterday17's Blog How To Blog 02: Astro❤️Password | Yesterday17's Blog How To Blog 01: Why, How, and the Future | Yesterday17's Blog Learning Pingora 04 - Establish L4 Connection | Yesterday17's Blog Learning Pingora 03 - Upstreams and Peers | Yesterday17's Blog Learning Pingora 02 - A Simple HTTP Server | Yesterday17's Blog Learning Pingora 01 - Getting Started | Yesterday17's Blog 2024 新年解密红包 / Melody Flag | Yesterday17's Blog 向新的一年飞驰——记录 2023 | Yesterday17's Blog 「サクラノ刻」对话选摘(2) | Yesterday17's Blog PGP Key Revocation 注销声明 | Yesterday17's Blog 「サクラノ刻」对话选摘(1) | Yesterday17's Blog 2023 新年解密红包 / Melody Flag | Yesterday17's Blog 『蒼の彼方のフォーリズム』通关感想 | Yesterday17's Blog 单显卡直通教程 | Yesterday17's Blog
如何将良心云的良心功能清理干净 | Yesterday17's Blog
Yesterday17 · 2022-01-24 · via Yesterday17's Blog

首先是明面上有的卸载脚本:

sudo /usr/local/qcloud/stargate/admin/uninstall.sh

sudo /usr/local/qcloud/monitor/barad/admin/uninstall.sh

然后是藏起来的自动化助手

cd /tmp && mkdir tmp && cd tmp && wget https://tat-gz-1258344699.cos.ap-guangzhou.myqcloud.com/tat_agent_linux_x86_64.zip && unzip tat_agent_linux_x86_64.zip && ./uninstall.sh

最后是最神秘的 secu-tcs-agent。首先先把维持它运转的 crontabrc.local 清一下:

sudo vim /var/spool/cron/crontabs/root

sudo vim /etc/rc.d/rc.local

删除这两个文件的对应部分,默认是最后两行。然后 root 执行下面的脚本:

#!/bin/bash

###ver=5.0.0

PATH="/usr/local/bin:/usr/bin:/sbin:/usr/X11R6/bin:/usr/sbin:/bin:/usr/games"

export PATH

# 20%

CPU_LIMIT=2000

# uint: KB, 50M

RSS_LIMIT=51200

SCRIPT_PATH=/usr/local/sa/agent/kill.sh

BASE_DIR=/usr/local/sa/agent

PROC_NAME=secu-tcs-agent

PS_INFO=$BASE_DIR/secubase/secu-tcs-ps.info

MON_LOG=$BASE_DIR/secubase/secu-tcs-ps.log

LIMIT_FILE=$BASE_DIR/secubase/secu-tcs-ps.lmt

RESTART_FILE=$BASE_DIR/secubase/secu-tcs-restart.cnt

# 检查日志, 如果大小超过限制就删除

if [ -e ${MON_LOG} ]; then

LOG_FILE_SIZE=`stat --format=%s ${MON_LOG}`

# limit 10K

if [ $LOG_FILE_SIZE -gt 10240 ]; then

rm -f ${MON_LOG}

fi

fi

# 获取pid为1的进程的mnt namespace inode

PID1_MNT_NS_INODE=""

if [ -L /proc/1/ns/mnt ]; then

PID1_MNT_NS_INODE=$(readlink /proc/1/ns/mnt)

fi

function DoLog()

{

CUR_TIME=`date +"%Y-%m-%d %H:%M:%S"`

echo "[$CUR_TIME] $1" >> $MON_LOG

}

function DoStop()

{

if [ -z "$PID1_MNT_NS_INODE" ]; then

LIST_WATCH_DOG_PID=`ps -efw | grep "watchdog\.sh" | grep $BASE_DIR | grep -v grep | awk -F ' ' '{print $2}'`

for watchdog_pid in $LIST_WATCH_DOG_PID

do

kill -9 $watchdog_pid

done

LIST_AGENT_PID=`ps -efw | grep -E "${PROC_NAME}($|[[:space:]]+)" | grep $BASE_DIR | grep -v grep | awk -F ' ' '{print $2}'`

for agent_pid in $LIST_AGENT_PID

do

kill -9 $agent_pid

done

else

LIST_WATCH_DOG_PID=`ps -efw | grep "watchdog\.sh" | grep $BASE_DIR | grep -v grep | awk -F ' ' '{print $2}'`

for watchdog_pid in $LIST_WATCH_DOG_PID

do

WATCHDOG_MNT_NS_INODE=$(readlink /proc/${watchdog_pid}/ns/mnt)

if [ "$WATCHDOG_MNT_NS_INODE" = "$PID1_MNT_NS_INODE" ]; then

kill -9 $watchdog_pid

fi

done

LIST_AGENT_PID=`ps -efw | grep -E "${PROC_NAME}($|[[:space:]]+)" | grep $BASE_DIR | grep -v grep | awk -F ' ' '{print $2}'`

for agent_pid in $LIST_AGENT_PID

do

AGENT_MNT_NS_INODE=$(readlink /proc/${agent_pid}/ns/mnt)

if [ "$AGENT_MNT_NS_INODE" = "$PID1_MNT_NS_INODE" ]; then

kill -9 $agent_pid

fi

done

fi

}

DoStop

最后移除这两个目录:

sudo rm -rf /usr/local/qcloud/

sudo rm -rf /usr/local/sa/

終わり!