0
点赞
收藏
分享

微信扫一扫

通过nc命令模拟客户端或服务器端程序

老榆 2022-03-10 阅读 81


安装

brew install nc

启动服务端(8001为端口号)

nc -l 8001

启动客户端

nc 127.0.0.1 8001

浏览器访问

​​

​​

​​​​

给浏览器回信

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Connection: close

hello



举报

相关推荐

0 条评论