out:
00:30:00.064994 IP (tos 0x0, ttl  64, id 47538, offset 0, flags [DF], proto: TCP (6), length: 60) 10.3.0.69.43006 > 202.69.18.84.https: S, cksum 0xa85f (correct), 3154679781:3154679781(0) win 5840 <mss 1460,sackOK,timestamp 1978674775 0,nop,wscale 7>
        0x0000:  4500 003c b9b2 4000 4006 9a28 0a03 0045  E..<..@.@..(...E
        0x0010:  ca45 1254 a7fe 01bb bc08 97e5 0000 0000  .E.T............
        0x0020:  a002 16d0 a85f 0000 0204 05b4 0402 080a  ....._..........
        0x0030:  75f0 2e57 0000 0000 0103 0307            u..W........很多就贴这么多了

解决方案 »

  1.   

    下载sniffer pro 一边截取一边分析,鼠标一点击,对应信息就高亮
    你上边的是TCP协议,自己对着看:
      

  2.   

    前 20 个字节是 IP 首部:1: version: 0100(表示是 IPv4)
    2: header length: 0101(IP 首部长度,0101 表示 5 * 32bit = 160bit = 20B)
    3: DSCP: 000000
    4: ECN: 00
    5: total length: 0x003c
    6: ID: 0xb9b2
    7: flags: 010
    8: fragment offset: 0000
    9: TTL: 0x40
    10: protocol: 0x06(0x06 即 TCP 协议:http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
    11: header checksum: 0x9a28(计算方法见:http://en.wikipedia.org/wiki/IPv4#Header 中 header checksum 部分)
    12: source ip: 0x0a030045(10.3.0.69)
    13: dest ip: 0xca451254(202.69.18.84)IP 协议首部到这里结束由于使用的 protocol 是 TCP,因此从第 21 个字节起是 TCP 的传输协议:1: source port, 16bit: 0xa7fe(即 43006)
    2: dest port, 16bit: 0x01bb(即 443)。用的是 443 端口,因此抓到的数据是 HTTPS 协议产生的
    3: sequence number, 32bit: 0xbc0897e5
    4: acknowledgment number, 32bit: 0x00000000
    5: data offset, 4bit: 1010(数据从第 10*32bit=320bit=80B)6~15, 占用 3 个字节,即 0x002(0000 0000 0010)6: reversed, 3bit: 000
    7: NS, 1bit: 0
    8: CWR, 1bit: 0
    9: ECE, 1bit: 0
    10: URG, 1bit: 0
    11: ACK, 1bit: 0
    12: PSH, 1bit: 0
    13: RST, 1bit: 0
    14: SYN, 1bit: 1(表示 TCP 连接的第一次握手,即客户端向服务端发送 SYN 请求建立连接)
    15: FIN, 1bit: 016: windows size, 16bit: 0x16d0
    17: check sum, 16bit: 0xa85f
    18: urgent pointer, 16bit: 0x0000(因为 URG 标志没有设置,所以置 0)下面是 TCP 可选数据:第一项:02 04 05 b4(02 04 设置 MSS 值,RFC 793)
    19: option kind, 8bit: 0x02
    20: option length, 8bit: 0x04(该项占用 4 个字节)
    21: MSS(最大报文段长度), 16bit: 0x05b4第二项:04 02(04 02 表示 SACK permitted,RFC 2018)
    22: option kind, 8bit: 0x04
    23: option length, 8bit: 0x02(该项占用 2 个字节)第三项:08 0a 75 f0 2e 57 00 00 00 00(08 0a 用于 TCP 高性能的扩展之时间戳,RFC 1323)
    24: option kind, 8bit: 0x08
    25: option length, 8bit: 0x0a(该项占用 10 个字节)
    26: timestamp value, 32bit: 0x75f02e57(即 1978674775)
    27: timestamp echo reply, 32bit: 0x00000000(无数据,仅在 ACK 阶段存在)第四项:01(01 表示 No Operation,即 NOP,RFC 793)
    28: option kind, 8bit: 0x01第五项:03 03 07(03 03 用于 TCP 高性能的扩展之窗口尺寸,RFC 1323)
    29: option kind, 8bit: 0x03
    30: option length, 8bit: 0x03(该项占用 3 个字节)
    31: window scala, 8bit: 0x07后面应该还有很多……整个 SSL/TLS 需要经过很多步骤:
    1: client --> server, TCP: SYN
    2: server --> client, TCP: SYN/ACK
    3: client --> server, TCP: ACK
    4: client --> server, SSL/TLS: handshake protocol, client hello
    5: server --> client, TCP: ACK
    6: client --> server, TCP: ACK
    7: server --> client, SSL/TLS: handshake protocol, server hello
    8: client --> server, TCP: ACK
    9: server --> client, TCP: ACK
    10: server --> client, SSL/TLS: change cipher spec protocol, change cipher spec
    11: client --> server, SSL/TLS: application data protocol, http
    12: server --> client, TCP: ACK
    13: client --> server, TCP: ACK后面省了,SSL/TLS 的握手非常复杂来来回回需要经过 10 次才能完成,还没有算上其中 TCP 的 ACK 确认协议传输。,首先是来回的三次握手,在 TCP 分别表示为 SYN, ACK/SYN 和 ACK,之后进行 SSL/TLS 数据包的传输
      

  3.   

    10: protocol: 0x06(0x06 即 TCP 协议:http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers)
    11: header checksum: 0x9a28(计算方法见:http://en.wikipedia.org/wiki/IPv4#Header 中 header checksum 部分)