nmap 查看内网存活主机

简单的方式

TCP方式扫描一个C段下的存活主机

nmap -sn -PE -T4 192.168.0.0/24

速度快的方式

sudo nmap -sP --min-hostgroup 1024 --min-parallelism 1024 -iL ip_input.txt -oN ip_output.txt

# 参数解释
--min-hostgroup
--min-parallelism
https://nmap.org/man/zh/man-performance.html

-sP Ping扫描方式   # 如果有防护,建议修改扫描方式
https://nmap.org/man/zh/man-bypass-firewalls-ids.html

-iL  从列表中输入
ip_input.txt  在里面输入你想扫描的网段;

-oN  Grep输出
https://nmap.org/man/zh/man-output.html
ip_output.txt 扫描结果将记录在这个文体;

参考

https://www.jianshu.com/p/7a6b3a61678c?appinstall=0
https://www.cnblogs.com/-mo-/p/11908260.html

原文地址:https://www.cnblogs.com/mysticbinary/p/12769187.html