科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网软件频道VB6中使用Winsock穿越各种代理的实现(二)

VB6中使用Winsock穿越各种代理的实现(二)

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

     然后我们进入第二步,请看以下RFC说明:   Once the method-dependent subnegotiation has completed, the client   sends the request details. I

作者:中国IT实验室 来源:中国IT实验室 2007年9月13日

关键字: 使用 VB 编程

  • 评论
  • 分享微博
  • 分享邮件
  

  然后我们进入第二步,请看以下RFC说明:

  Once the method-dependent subnegotiation has completed, the client

  sends the request details. If the negotiated method includes

  encapsulation for purposes of integrity checking and/or

  confidentiality, these requests MUST be encapsulated in the method-dependent encapsulation.

  The SOCKS request is formed as follows:

  +----+-----+-------+------+----------+----------+

  |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |

  +----+-----+-------+------+----------+----------+

  | 1 | 1 | X'00' | 1 | Variable | 2 |

  +----+-----+-------+------+----------+----------+

  Where:

  o VER protocol version: X'05' ------------- 固定 05

  o CMD

  o CONNECT X'01' ------------- TCP方式 01

  o BIND X'02'

  o UDP ASSOCIATE X'03' ------------- UDP方式 03

  o RSV RESERVED ------------- 固定 00

  o ATYP address type of following address

  o IP V4 address: X'01' ------------- IPv4 01

  o DOMAINNAME: X'03'

  o IP V6 address: X'04'

  o DST.ADDR desired destination address

  o DST.PORT desired destination port in network octet

  order

  The SOCKS server will typically evaluate the request based on source

  and destination addresses, and return one or more reply messages, as

  appropriate for the request type.

  发送 05 01 00 01 + 目的地址(4字节) + 目的端口(2字节),目的地址和端口都是16进制码(不是字符串)。

  例202.103.190.27 - 7201

  则发送的信息为:05 01 00 01 CA 67 BE 1B 1C 21

  (CA=202 67=103 BE=190 1B=27 1C21=7201)

  关于我是怎么把16进制码换成10进制的,请自己看程序

  最后,接受服务器返回数据,看RFC:

  +----+-----+-------+------+----------+----------+

  |VER | REP | RSV | ATYP | BND.ADDR | BND.PORT |

  +----+-----+-------+------+----------+----------+

  | 1 | 1 | X'00' | 1 | Variable | 2 |

  +----+-----+-------+------+----------+----------+

  Where:

  o VER protocol version: X'05' ------------ 固定 05

  o REP Reply field:

  o X'00' succeeded ------------ 若为 00 成功 其余可以都看成失败

  o X'01' general SOCKS server failure

  o X'02' connection not allowed by ruleset

  o X'03' Network unreachable

  o X'04' Host unreachable

  o X'05' Connection refused

  o X'06' TTL expired

  o X'07' Command not supported

  o X'08' Address type not supported

  o X'09' to X'FF' unassigned

  o RSV RESERVED

  o ATYP address type of following address

  o IP V4 address: X'01'

  o DOMAINNAME: X'03'

  o IP V6 address: X'04'

  o BND.ADDR server bound address

  o BND.PORT server bound port in network octet order

  Fields marked RESERVED (RSV) must be set to X'00'.

 

查看本文来源

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章