简介
netcat的简写是nc,被设计为一个简单、可靠的网络工具,主要作用如下:
1 实现任意TCP/UDP端口的侦听,nc可以作为server以TCP或UDP方式侦听指定端口 2 端口的扫描,nc可以作为client发起TCP或UDP连接 3 机器之间传输文件 4 机器之间网络测速
参数
1 -g<网关> 设置路由器跃程通信网关,最多可设置8个。 2 -G<指向器数目> 设置来源路由指向器,其数值为4的倍数。 3 -h 在线帮助。 4 -i<延迟秒数> 设置时间间隔,以便传送信息及扫描通信端口。 5 -l 使用监听模式,管控传入的资料。 6 -n 直接使用IP地址,而不通过域名服务器。 7 -o<输出文件> 指定文件名称,把往来传输的数据以16进制字码倾倒成该文件保存。 8 -p<通信端口> 设置本地主机使用的通信端口。 9 -r 乱数指定本地与远端主机的通信端口。 10 -s<来源地址> 设置本地主机送出数据包的IP地址。 11 -u 使用UDP传输协议。 12 -v 显示指令执行过程。 13 -w<超时秒数> 设置等待连线的时间。 14 -z 使用0输入/输出模式,只在扫描通信端口时使用。