nmap扫描内网存活机器并保存在指定文件中。

host.sh

#/usr/bin/bash
read -p "Please input scan host or network:" host
nmap -sn $host | grep "Nmap scan report for" >/dev/null &>/dev/null
[ $? -ne 0 ] && echo "host $host is down." && exit 1
nmap -sn $host | grep "Nmap scan report for" | awk '{print $5}' > host.txt
while read uphost
do
 echo "host $uphost is up."
done<host.txt

nmap扫描内网机器常见漏洞。

nmap –sS  -A  --script=smb-vuln-* -P0 192.168.1.*

 

相关文章:

  • 2021-10-20
  • 2022-12-23
  • 2022-01-14
  • 2021-12-23
  • 2021-09-22
  • 2021-07-14
猜你喜欢
  • 2021-08-22
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案