nc扫描机器端口

  
  
  
  
  1. nc -z localhost 1-10000 //扫描本机1到1000端口,获取打开的端口 
  2. Connection to localhost 22 port [tcp/ssh] succeeded! 
  3. Connection to localhost 80 port [tcp/http] succeeded! 
  4. Connection to localhost 111 port [tcp/sunrpc] succeeded! 
  5. Connection to localhost 199 port [tcp/smux] succeeded! 
  6. Connection to localhost 3306 port [tcp/mysql] succeeded! 
  7. Connection to localhost 6010 port [tcp/x11-ssh-offset] succeeded! 
  8. 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.

你可能感兴趣的:(服务,搭建,系统知识)