安装yum install nmap -y
nmap 实例:
nmap -A -T4 www.tclcar.com
Starting Nmap 5.51 ( http://nmap.org ) at 2013-11-19 00:21 PST
Nmap scan report for www.tclcar.com (101.71.9.28)
Host is up (0.033s latency).
Not shown: 993 closed ports
PORT STATE SERVICE VERSION
80/tcp open http nginx 1.2.9
|_http-methods: No Allow or Public header in OPTIONS response (status code 405)
|_http-title: TCL\xE5\xBA\xB7\xE9\x92\x9B\xE5\xAE\x98\xE7\xBD\x91-\xE5\xBC\x80\xE5\x90\xAF\xE6\x99\xBA\xE8\x83\xBD\xE8\xBD\xA6\xE7\x94\x9F\xE6\xB4\xBB\xE6\x97\xB6\xE4\xBB\xA3
|_http-favicon:
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds
514/tcp filtered shell
593/tcp filtered http-rpc-epmap
4444/tcp filtered krb524
Device type: general purpose|storage-misc|media device
Running (JUST GUESSING): Microsoft Windows 2008|7 (92%), BlueArc embedded (87%), Philips Linux 2.1.X (87%), Sony Linux 2.1.X (87%), Linux 2.1.X (85%)
Aggressive OS guesses: Microsoft Windows Server 2008 SP1 (92%), Microsoft Windows 7 Enterprise (90%), BlueArc Titan 2100 NAS device (87%), TiVo series 1 (Sony SVR-2000 or Philips HDR112) (Linux 2.1.24-TiVo-2.5, PowerPC) (87%), TiVo series 1 (Linux 2.1.24-TiVo-2.5) (85%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
TRACEROUTE (using port 80/tcp)
HOP RTT ADDRESS
1 0.11 ms 192.168.5.2
2 0.04 ms 101.71.9.28
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 163.66 seconds
nmap localhost #查看主机当前开放的端口
nmap -p 1024-65535 localhost#查看主机端口(1024-65535)中开放的端口
nmap -PS 192.168.21.163 #探测目标主机开放的端口
nmap -PS22,80,3306 192.168.21.163 #探测所列出的目标主机端口
nmap -O 192.168.21.163 #探测目标主机操作系统类型
nmap -A 192.168.21.163 #探测目标主机操作系统类型
nmap --help #更多nmap参数请查询帮助信息
详细介绍:http://blog.csdn.net/aspirationflow/article/details/7694274
转载于:https://blog.51cto.com/smilezhuolin/1328579