nmap 命令学习
nmap ip/mask -p port [选项]
-iL <inputfilename>
从列表中输入
--exclude <host1[,host2][,host3],...>
排除主机/网络
--excludefile <excludefile>
排除文件中的列表
-s* 表示扫描模式
-sL 使用dns进行ip扫描,并且会进行dns解析
-sP -sn 对主机进行扫描,采用ICMP+TCP SYN(对443端口发送SYN,80发送ACK)模式,内网使用ARP,可与P* 选项组合使用,指定ping方式(P0除外)
-sS 使用syn进行端口扫描(默认选项)
-sT 使用系统connect()建立TCP连接进行扫描,当SYN不能使用时,默认使用该方法
-sU 使用UDP进行扫描,但是速度较慢
-sN -sF -sX tcp null FIN Xmas扫描(区分open或close)
-p U:111,T:222 扫描udp端口111,tcp端口222
-P0 -Pn 跳过主机发现阶段
-PS -PA -PU SYN、ACK、UDP ping
-PE -PP -PM ICMP ping
-PR ARP ping
-PO ip ping
-n 不进行dns地址解析
-R 对所有目标进行域名解析
-- script= 指定脚本
-- script-args=XX=vv 为脚本设置参数 令XX=xx
nmap脚本保存位置:/usr/share/nmap/script