nmap 命令
2014-04-14 by dongnan
举个栗子
扫描主机开放的端口:
nmap -PS 172.27.233.41
Starting Nmap 5.51 ( http://nmap.org ) at 2014-04-14 15:34 CST
Nmap scan report for pn1 (172.27.233.41)
Host is up (0.0000080s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
指定的端口:
nmap -p 22 10.139.xx.0/24 > ssh.txt
# 多个指定的端口:
nmap -p 3306,6379,11211,27017 10.139.xx.0/24 > ssh.txt
攻击性扫描:
nmap -T4 -A -v -Pn IP
扫描网络中的主机:
nmap -sP 10.253.100.0/22 > host.txt
# 主机数量
awk '/MAC Address/ {++T} END {print T}' host.txt
453
命令参数
-A
攻击性扫描模式。-Pn
扫描前不发送ping
请求。