for line in $(cat IP-out.txt) #依次迭代txt的每一行 do mkdir /root/Desktop/$line masscan -p1-65535,U:1-65535 --rate=1000 -e tun0 $line > /root/Desktop/$line/ports.txt done
for line in $(cat IP-out.txt) #如果web端口开放,则扫描目录 do cd /root/Desktop/$line if grep 80/tcp ports.txt;then wget http://${line} gobuster -u http://${line} -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt > gobuster-out.txt fi done