linux用netcat做端口转发
发布:admin | 发布时间: 2010年2月1日方法如下:
    $ mknod backpipe p
    建立一个命名管道.
    listener-to-client 转发:
    $ nc -l -p [localport] 0< backpipe | 
        nc [target ip] [port] |
        tee backpipe
    漂亮吧?
    继续:
    listener-to-listener 转发:
    $ nc -l -p [localport] 0< backpipe |
        nc -l -p [localport2] |
        tee backpipe
    
    client-to-client 转发:
    $ nc [ip1] [port1] 0< backpipe |
        nc [ip2] [port2] |
        tee backpipe
    还有更雷的方法,用自身的 -e 参数:
$ echo nc [ip] [port] > relay.sh
$ chmod +x relay.sh
$ nc -l -p [port2] -e relay.sh
文章如转载,请注明转载自:http://www.5iadmin.com/post/184.html
- 相关文章:
 快速安装Linux双系统 (2010-1-31 9:54:24)
利用Tcptrack跟踪Linux服务器中的TCP (2010-1-27 19:40:20)
Linux下的IDS入侵检测工具 (2010-1-26 9:43:26)
linux修改时间和日期的方法 (2010-1-24 11:4:52)
linux定时运行命令 (2010-1-23 16:59:5)
局域网中实现Linux和Windows文件共享 (2010-1-13 13:58:25)
发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。






