nmap www.hinet.net tw.yahoo.com www.google.com.tw # or nmap 192.168.0.* # or nmap 192.168.0.0/24 # or nmap 192.168.0.123,124,125 # or nmap 192.168.0.123-140
指定掃描的連接埠
掃描連接埠 80:
1
nmap -p 80 192.168.1.1
指定 TCP 連接埠 80:
1
nmap -p T:80 192.168.1.1
指定 UDP 連接埠 53:
1
nmap -p U:53 192.168.1.1
掃描兩個連接埠:
1
nmap -p 80,443 192.168.1.1
指定連接埠範圍:
1
nmap -p 80-200 192.168.1.1
Nmap data file directory search order
If the --datadir option was specified, check the directory given as its argument.
If the NMAPDIR environmental variable is set, check that directory.
If Nmap is not running on Windows, search in ~/.nmap of the user running Nmap. It tries the real user ID’s home directory, and then the effective UID’s if they differ.
Check the directory in which the Nmap binary resides. On non-Windows platforms, additionally check the same directory with ../share/nmap appended.
Check the compiled-in NMAPDATADIR directory. That value is defined to c:\nmap on Windows, and _`<$prefix>`_/share/nmap on Unix. <$prefix> is /usr/local for the default source build and /usr for the Linux RPMs. The <$prefix> can be changed by giving ./configure the --prefix option when compiling the source.