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文件

  • 相关阅读:
    端口查看netstat -tunpl |grep 25
    解释一下查找出文件并删除find /var/log -type f -mtime +7 -ok rm {} ;
    2021.6.2
    2021.6.1
    2021.5.31
    2021.5.30(每周总结)
    2021.5.28
    2021.5.27
    2021.5.26
    2021.5.25
  • 原文地址:https://www.cnblogs.com/AloneSword/p/4493460.html
Copyright © 2011-2022 走看看