# 3389端口 Connection to 10.10.0.103 3389 port [tcp/*] succeeded! # 80端口 Connection to 10.10.0.103 80 port [tcp/http] succeeded! # 22端口 Connection to 10.10.0.100 22 port [tcp/ssh] succeeded!
无回显,则端口无法通信。默认TCP,-u参数可调整为UDP模式。
端口扫描案例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
For example:
$ nc -zv host.example.com 20-30 Connection to host.example.com 22 port [tcp/ssh] succeeded! Connection to host.example.com 25 port [tcp/smtp] succeeded!
The port range was specified to limit the search to ports 20 - 30, and is scanned by increasing order.
You can also specify a list of ports to scan, for example:
$ nc -zv host.example.com 80 20 22 nc: connect to host.example.com 80 (tcp) failed: Connection refused nc: connect to host.example.com 20 (tcp) failed: Connection refused Connection to host.example.com port [tcp/ssh] succeeded!