歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> nc掃描機器端口

nc掃描機器端口

日期:2017/2/27 15:59:44   编辑:Linux教程
# nc -z localhost 1-10000 //掃描本機1到1000端口,獲取打開的端口
Connection to localhost 22 port [tcp/ssh] succeeded!
Connection to localhost 80 port [tcp/http] succeeded!
Connection to localhost 111 port [tcp/sunrpc] succeeded!
Connection to localhost 199 port [tcp/smux] succeeded!
Connection to localhost 3306 port [tcp/mysql] succeeded!
Connection to localhost 6010 port [tcp/x11-ssh-offset] succeeded!
Connection to localhost 6011 port [tcp/*] succeeded!
#

-z Specifies that nc should just scan for listening daemons, without sending any data to them. It is an error to use this option in conjunction with the -l option.
Copyright © Linux教程網 All Rights Reserved