指定扫描目标和主机发现 Nmap使用详解( 二 )


--exclude <host1[,host2][,host3],...>: Exclude hosts/networks(排除的主机/网段)
nmap 192.168.10.0/24 --exclude 192.168.10.133--excludefile <exclude_file>: Exclude list from file(文件中指定排除的主机/网段)
nmap 192.168.10.0/24 --exclude targets.txt// 相对路径Host Discovery(主机发现)
不使用任何参数:
nmap 192.168.10.128If no host discovery options are given, Nmap sends an ICMP echo request, a TCP SYN packet to port 443,a TCP ACK packet to port 80,and an ICMP timestamp request. (For IPv6, the ICMP timestamp request is omitted because it is not part of ICMPv6.) These defaults are equivalent to the -PE -PS443 -PA80 -PP options. The exceptions to this are the ARP (for IPv4) and Neighbor Discovery (for IPv6) scans which are used for any targets on a local ethernet network. For unprivileged Unix shell users, the default probes are a SYN packet to ports 80 and 443 using the connect system call. This host discovery is often sufficient when scanning local networks, but a more comprehensive set of discovery probes is recommended for security auditing. 

指定扫描目标和主机发现 Nmap使用详解

文章插图
 
等价于:
namp -PE -PS443 -PA80 -PP 192.168.10.128其他:
nmap 192.168.10.128 192.168.10.166 // 扫描多个目标地址nmap 192.168.10.128-188 // 扫描范围内目标地址nmpa 192.168.10.128/24 // 扫描目标地址所在的网段 
ping扫描:-sP
Host discovery is sometimes called ping scan,but it goes well beyond the simple ICMP echo request packets associated with the ubiquitous ping tool.注意:这里的ping方式,不是ping命令IMCP协议方式,它发送一个arp广播包请求,是ping echo检查,但是不会发送ICMP、TCP协议数据包给目标主机!
-sP效率非常的快,比ICMP的协议还快!
指定扫描目标和主机发现 Nmap使用详解

文章插图
 
-Pn (No ping):Treat all hosts as online -- skip host discovery
将指定的主机视作开启的,跳过主机发现的过程 。
指定扫描目标和主机发现 Nmap使用详解

文章插图
 

指定扫描目标和主机发现 Nmap使用详解

文章插图
 
-PS 


推荐阅读