NC(netcat)应用全记录<持续更新>



1. 连接tianya.cn(MIME欺骗)
$ nc -nvv 221.11.172.178 80
Connection to 221.11.172.178 80 port [tcp/*] succeeded!
get / http/1.1
HTTP/1.0 400 Bad request
Cache-Control: no-cache
Connection: close
Content-Type: text/html


<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>


2. 聊天:
服务器端:
$ nc -l 1234
ddd
sss
xxxxx
客户端:
$ nc 127.0.0.1 1234
ddd
sss
xxxxx

$ nc  192.168.1.255 1234  ---- 局域网广播消息


3. 端口扫描:
$ nc -nvv -w2 192.168.1.1 80-90
Connection to 192.168.1.1 80 port [tcp/*] succeeded!
nc: connect to 192.168.1.1 port 81 (tcp) failed: Connection refused
nc: connect to 192.168.1.1 port 82 (tcp) failed: Connection timed out


4. 传输文件:
服务器端:
$ nc -lvv 1234 > test.txt
客户端:
$ nc 127.0.0.1 1234 < test.txt

test.txt传输完成。








  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值