开发者社区> 玄学酱> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

144.4. ncat - Concatenate and redirect sockets

简介:
+关注继续查看

nc - TCP/IP swiss army knife

按照 ncat

# yum search nc | grep nmap
nmap-ncat.x86_64 : Nmap's Netcat replacement

yum install nmap-ncat
		

144.4.1. TCP 数据传输

Server

nc -l 8080 > test.txt
			

Client

cat /etc/hosts | nc your_server 8080
			

144.4.2. UDP 数据传输

Server 端

nc -4 -u -l 9000
			

Client 端

cat /etc/passwd | nc -4 -u 47.90.1.240 9000
			

144.4.3. 始终保持服务器开启

-k, --keep-open Accept multiple connections in listen mode

# nc -l 8087 -k
			

这是你可以持续想服务器端发送数据

144.4.4. 传输视频流

服务端,这里我们从一个视频文件中读入并重定向输出到netcat客户端

$cat video.avi | nc -l 3000
			

客户端,从socket中读入数据并通过管道传递给 mplayer播放该视频。

$nc 172.16.0.10 3000 | mplayer -vo x11 -cache 3000 -			
			




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
curl: (4) A requested feature, protocol or option was not found
curl: (4) A requested feature, protocol or option was not found
0 0
Carring data across redirect requests
Redirecting with URL templates @RequestMapping(value = "save") public String saveDutyRelation(HttpServletRequest request, DutyRelation d...
725 0
SharePoint Error - An unrecognized HTTP response was received when attempting to crawl this item
SharePoint 2013爬网报错 An unrecognized HTTP response was received when attempting to crawl this item. Verify whether the item can be accessed using your browser. 然后登陆网站,发现在服务器上输入3次用户名密码白页,考虑到本地回环的问题。
774 0
Nginx rewrite URL examples with and without redirect address
原文地址: http://www.claudiokuenzler.com/blog/436/nginx-rewrite-url-examples-with-without-redirect-address#.
446 0
Making Tunna (… or bypassing firewall restrictions with HTTP tunneling)
http://www.secforce.com/blog/2013/08/making-tunna-or-bypassing-firewall-restrictions-with-http-...
663 0
How to Detect HTTP Parameter Pollution Attacks
http://www.acunetix.com/blog/whitepaper-http-parameter-pollution/ Nowadays, many components f...
1018 0
Detecting HTTP Load Balancers using Halberd
We covered Load Balancing Detection using LBD in a previous video.
832 0
Lighttpd URI Rewrite/Redirect Information Disclosure Vulnerability
  Description Dear lighty community, I am using lighty to serve a wiki; to have nice urls, i use the following in my lighttpd.
578 0
+关注
玄学酱
这个时候,玄酱是不是应该说点什么...
文章
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载