zoukankan      html  css  js  c++  java
  • wireshark提取gzip格式的html

    原文地址:http://blog.csdn.net/vah101/article/details/44102501

    首先使用wireshark启动抓包,然后以百度为例,访问百度的首页,之后停止抓包,wireshark的fiter框中输入:

    http && http.host matches "baidu"

    显示出所有针对百度的get请求,在某一条get请求上右键点击“follow tcp stream”,会弹出一个“follow tcp stream”对话框,显示所有与百度交互的http流,其中注意到百度的应答http头如下:

    [html] view plaincopy在CODE上查看代码片派生到我的代码片
     
    1. HTTP/1.1 200 OK  
    2. Date: Fri, 06 Mar 2015 09:34:02 GMT  
    3. Content-Type: text/html  
    4. Transfer-Encoding: chunked  
    5. Connection: Keep-Alive  
    6. Cache-Control: private  
    7. Expires: Fri, 06 Mar 2015 09:34:02 GMT  
    8. <span style="background-color: rgb(255, 0, 0);">Content-Encoding: gzip</span>  
    9. Server: BWS/1.1  
    10. BDPAGETYPE: 2  
    11. BDQID: 0xaba126000003d5cb  
    12. BDUSERID: 44636996  
    13. Set-Cookie: BDSVRTM=138; path=/  
    14. Set-Cookie: BD_HOME=1; path=/  
    15. Set-Cookie: H_PS_PSSID=12633_12749_11076_1457_12692_12694_12716_12721_12729_12736_12738_12743_11089_10633; path=/; domain=.baidu.com  

    其中说明了http的payload已经使用了gzip进行压缩,所以在“follow tcp stream”对话框中显示的http payload是乱码。

    此时,需要会退到wireshark的主窗口,选择file菜单下的export objects->html,这时会显示http objects对话框,如下所示:



    根据hostname、filename选择一条,点击save as即可保存成html文件

  • 相关阅读:
    Beta冲刺<10/10>
    Beta冲刺<1/10>
    多语言工作者--凡事预则立
    Beta阶段代码与规范
    多语言工作者の十日冲刺<9/10>
    团队进行Alpha冲刺--项目测试
    团队进行Alpha冲刺--冲刺总结
    Alpha总结展望——前事不忘后事之师
    Beta冲刺随笔——Day_Five
    Beta冲刺随笔——Day_Two
  • 原文地址:https://www.cnblogs.com/AloneSword/p/4493460.html
Copyright © 2011-2022 走看看