- 论坛徽章:
- 84
|
本帖最后由 yjh777 于 2010-11-16 00:14 编辑
TCP: 有一端断开,另一端也会退出
nc6 -e bash -l 127.0.0.1 -p 779
nc6 127.0.0.1 779
UDP: 如果客户端断开,服务端不会退出;但是如果客户端断开再连的话必须,必须还用前次建立连接使用的端口号
nc6 -u -e bash -l 127.0.0.1 -p 779
nc6 -u 127.0.0.1 779
netstat -pudp | grep 779
udp4 0 0 localhost.779 localhost.57341
nc6 -u 127.0.0.1 779 -p 57341 #第二次必须用前次使用的端口号,才可以再次连接到主机将输入重定向给 -e cmd
#如果使用其他端口,不管输入什么东西客户端都会马上退出,
TCP + --continuous 客户端退出,服务端不会退出; #--continuous 对udp mode的连接不起作用
nc6 --continuous -e bash -l 127.0.0.1 -p 779
nc6 127.0.0.1 779
nc6 127.0.0.1 779
-------------------------------------------------
# nc6 --version
nc6 version 0.5
Copyright (C) 2001-2003
Mauro Tortonesi
Chris Leishman
Simone Piunno
<http://www.deepspace6.net>
Configured with IPv6 support |
|