荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: hellsolaris (qq), 信区: Security
标  题: httptunel的使用
发信站: 荔园晨风BBS站 (Sun Oct 19 19:23:31 2003), 站内信件

来源:突击网络  作者:hellsolaris

 hts.exe是服务端程序,htc.exe是客户端程序,链接库cygwin1.dll是dll文件,使用时候
把hts.exe和cygwin1.dll上传到服务器(肉鸡),htc.exe运行在自己机上。


下面是hts.exe的用法,最重要的是-F选项

C:\httptunel>hts -h
Usage: hts [OPTION]... [PORT]
Listen for incoming httptunnel connections at PORT (default port is 8888).
When a connection is made, I/O is redirected to the destination specified
by the --device or --forward-port switch.

-c, --content-length BYTES use HTTP PUT requests of BYTES size
(k, M, and G postfixes recognized)
-d, --device DEVICE use DEVICE for input and output
-D, --debug [LEVEL] enable debug mode
-F, --forward-port HOST:PORT connect to PORT at HOST and use it for
input and output
-h, --help display this help and exit
-k, --keep-alive SECONDS send keepalive bytes every SECONDS seconds
(default is 5)
-l, --logfile FILE specify logfile for debug output
-M, --max-connection-age SEC maximum time a connection will stay
open is SEC seconds (default is 300)
-S, --strict-content-length always write Content-Length bytes in requests
-V, --version output version information and exit
-p, --pid-file LOCATION write a PID file to LOCATION

Report bugs to bug-httptunnel@gnu.org.

C:\httptunel>


下面是htc.exe的用法,最重要的是-F选项


C:\httptunel>htc -h
Usage: htc [OPTION]... HOST[:PORT]
Set up a httptunnel connection to PORT at HOST (default port is 8888).
When a connection is made, I/O is redirected from the source specified
by the --device or --forward-port switch to the tunnel.

-A, --proxy-authorization USER:PASSWORD proxy authorization
--proxy-authorization-file FILE proxy authorization file
-B, --proxy-buffer-size BYTES assume a proxy buffer size of BYTES bytes
(k, M, and G postfixes recognized)
-c, --content-length BYTES use HTTP PUT requests of BYTES size
(k, M, and G postfixes recognized)
-d, --device DEVICE use DEVICE for input and output
-D, --debug [LEVEL] enable debugging mode
-F, --forward-port PORT use TCP port PORT for input and output
-h, --help display this help and exit
-k, --keep-alive SECONDS send keepalive bytes every SECONDS seconds
(default is 5)
-l, --logfile FILE specify file for debugging output
-M, --max-connection-age SEC maximum time a connection will stay
open is SEC seconds (default is 300)
-P, --proxy HOSTNAME[:PORT] use a HTTP proxy (default port is 8080)
-S, --strict-content-length always write Content-Length bytes in request
-T, --timeout TIME timeout, in milliseconds, before sending
padding to a buffering proxy
-U, --user-agent STRING specify User-Agent value in HTTP requests
-V, --version output version information and exit

Report bugs to bug-httptunnel@gnu.org.

C:\httptunel>

用法:

1.在服务器(肉鸡)命令下运行hts.exe -F 127.0.0.1:port listening_port

2.在自己机上(客户端)运行htc.exe -F anyport 服务器ip:listening-port

3.在自己机上(客户端) telnet 127.0.0.1 anyport

ok


(port是服务器的服务端口,listening-port是服务器监听的端口(默认是8888)
,anyport是用户任意指定的端口)

示例:

我想telnet服务器(192.168.44.223)的23端口,命令如下:

1.在服务器(肉鸡)命令下运行hts.exe -F 127.0.0.1:23 9999 (也可以hts.exe -F 192
 .168.44.223:23 9999)
2.在自己机上(客户端)运行htc.exe -F 1234 192.168.44.223:9999

3.另外开cmd窗口,telnet 127.0.0.1 1234

原理:

用户连接本地机的1234端口,htc将它封装到http协议里,发送到服务器的9999端口,
在服务器上,hts将从9999端口接收到的数据解包,再发往服务器本地的23端口,建立
了一条http数据通道,这样利用了http隧道技术突破了防火墙的限制(因为防火
墙一般都不会阻止http端口的数据包)
NOTE:禁止rpc服务(关闭135)可能导致端口重定向不能正确使用。(不太确定,
谁可以告诉我:))


--
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.44.223]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店