nmap命令-----高级用法
探测主机存活常用方式 (1)-sP :进行ping扫描 打印出对ping扫描做出响应的主机,不做进一步测试(如端口扫描或者操作系统探测): 下面去扫描10.0.3.0/24这个网段的的主机 nmap -sP 10.0.3.0/24 这个命令可以用于探测局域网有哪些机器 [root@B ~]# nmap -sP 10.0.3.0/24 Starting Nmap 5.51 ( http://nmap.org ) at 2016-12-29 11:24 CST Nmap scan report for 10.0.3.1 Host is up (0.0079s latency). Nmap scan report for 10.0.3.2 Host is up (0.0046s latency). Nmap scan report for 10.0.3.3 Host is up (0.0037s latency). Nmap done: 256 IP addresses (3 hosts up) scanned in 10.01 seconds [root@B ~]# (2) -sn: -sn: Ping Scan - disable port scan #ping探测扫描主机, 不进行端口扫描 ( 测试过对方主机把icmp包都丢弃掉,依然能检测到对方开机状态 ) [root@B ~]#