ncat使用介绍

阅读更多
一 组合参数
-w:设置得超时时间
-z:一个输入输出模式
-v:显示命令执行过程
方式一:基于tcp协议(默认)
nc -v -z -w2 117.34.35.1 1-50
方式二:基于udp协议-u
nc -v -u -z -w2 117.34.35.1 1-50
 
二 实战
[root@localhost hping-master]# nc -v -w10 172.16.4.2 1-1000
Ncat: Version 6.40 ( http://nmap.org/ncat )
Ncat: Connection timed out.
[root@localhost hping-master]# nc -v -w2 10.224.21.5 1-1000
Ncat: Version 6.40 ( http://nmap.org/ncat )
Ncat: Connection refused.
[root@localhost hping-master]# nc -v -w2 192.168.0.107 1-1000
Ncat: Version 6.40 ( http://nmap.org/ncat )
Ncat: Connection refused.
[root@localhost hping-master]# nc -v -w2 192.168.0.102 1-1000
Ncat: Version 6.40 ( http://nmap.org/ncat )
Ncat: Connection timed out.

 

你可能感兴趣的:(ncat)