您的位置:首页 > 运维架构 > Shell

使用netcat来作为socket服务端

2012-07-08 22:56 344 查看
http://www.qtcentre.org/archive/index.php/t-29462.html

文章提到使用netcat 来作为服务端:

I use netcat to capture the output and provide the server side socket.  I'm piping data into netcat to trigger my client side socket write:

here's the command I use: nc -l -s 127.0.0.1 -p 7496 < zeros.txt

这个方法方法的能力有限, 他无法实现交互式的应答。  应该有类似shell一样的、网络通讯的shell环境吧? 没有的话,用python来实现一个也不难~ :)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息