# 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.

相关文章:

  • 2021-10-27
  • 2021-12-31
  • 2022-12-23
  • 2021-06-09
  • 2021-12-31
  • 2022-01-02
  • 2022-01-02
猜你喜欢
  • 2021-12-23
  • 2022-02-14
  • 2021-08-04
  • 2021-12-10
  • 2021-12-23
  • 2021-11-30
相关资源
相似解决方案