# https://github.com/robertdavidgraham/masscan
cd /opt
yum install -y git gcc make libpcap-dev
git clone https://github.com/robertdavidgraham/masscan
cd masscan
make
cd ..
# https://www.cnblogs.com/wawahaha/p/3821486.html
# 安装libpcap
yum -y install gcc-c++
yum -y install flex byacc
yum -y install wget
mkdir libpcap
cd libpcap
wget -c http://www.tcpdump.org/release/libpcap-1.5.3.tar.gz
tar zxvf libpcap-1.5.3.tar.gz
cd libpcap-1.5.3
./configure
make
make install
# https://www.cnblogs.com/woshare/p/4796323.html
echo -e '/usr/local/lib\n/usr/lib' >> /etc/ld.so.conf # 开启转义字符,输出两行到文件中
ldconfig # 重新加载
# 测试
/opt/masscan/bin/masscan 127.0.0.1 -p1-10000 --rate 2000