1.下载:
windows下载地址:netcat-windows
linux下载地址:netcat-linux
2. 安装:
windows:打开上方链接下载后解压至桌面即可
centos:
① 可以使用yum install nc -y
安装
② 也可以打开上方链接下载rpm包,
使用 tar -zxvf
命令解压文件
cd
到解压路径后使用./configure
执行编译安装命令
编译和安装make && make install
3.使用
检测tcp:
服务端:nc -lv port,客户端:nc ip port
检测udp
服务端:nc -luv port,客户端:nc -u ip port