用Wireshark进行HTTP协议分析

上传人:汽*** 文档编号:470220464 上传时间:2024-02-15 格式:DOC 页数:5 大小:145.50KB
返回 下载 相关 举报
用Wireshark进行HTTP协议分析_第1页
第1页 / 共5页
用Wireshark进行HTTP协议分析_第2页
第2页 / 共5页
用Wireshark进行HTTP协议分析_第3页
第3页 / 共5页
用Wireshark进行HTTP协议分析_第4页
第4页 / 共5页
用Wireshark进行HTTP协议分析_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《用Wireshark进行HTTP协议分析》由会员分享,可在线阅读,更多相关《用Wireshark进行HTTP协议分析(5页珍藏版)》请在金锄头文库上搜索。

1、真诚为您提供优质参考资料,若有不当之处,请指正。TCP/IP 实 验 报 告实验1 用Wireshark进行HTTP协议分析 学 院 计算机学院 专 业 网络工程 班 级 1班 姓 名 刘小芳 学 号 41009040127 2012 5 1.1 实验性质本实验为操作分析性实验。1.2 实验目的1. 掌握Wireshark软件的基本使用方法。2. 掌握基本的网络协议分析方法。3. 使用Wireshark抓包工具,分析HTTP数据报的格式。4. 加深理解HTTP协议的原理及其工作过程。1.3 实验环境1. 硬件环境:PC机1台。2. 网络环境:PC机接入LAN或Internet。物理地址:00-

2、E0-4C-00-16-78Ip地址:192.168.0.1313. 软件环境:Windows操作系统和Wireshark软件。1.4 实验学时2学时(90分钟)。1.5 实验内容与要求1.5.1 启动Wireshark协议分析工具1.5.2 抓取HTTP数据包1.5.3分析HTTP报文1. The Basic HTTP GET/response interaction1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is theserver running?HTTP 1.12. What lang

3、uages (if any) does your browser indicate that it can accept to theserver?Accept-Language: zh-cnrn3. What is the IP address of your computer? Of the gaia.cs.umass.edu server?192.168.0.131 128.238.38.1604. What is the status code returned from the server to your browser?200 ok5. When was the HTML fil

4、e that you are retrieving last modified at the server20 May 2013 09:42:43 GMTrn 6. How many bytes of content are being returned to your browser?4297. By inspecting the raw data in the packet content window, do you see any headerswithin the data that are not displayed in the packet-listing window? If

5、 so, nameOne.有2. The HTTP CONDITIONAL GET/response interactionAnswer the following questions:8. Inspect the contents of the first HTTP GET request from your browser to theserver. Do you see an “IF-MODIFIED-SINCE” line in the HTTP GET?有 9. Inspect the contents of the server response. Did the server e

6、xplicitly return thecontents of the file? How can you tell?有 HTTP/1.1 200 OKrn10. Now inspect the contents of the second HTTP GET request from your browser tothe server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? Ifso, what information follows the “IF-MODIFIED-SINCE:” header?没有11. What

7、 is the HTTP status code and phrase returned from the server in response tothis second HTTP GET? Did the server explicitly return the contents of the file?200 没有3. Retrieving Long DocumentsAnswer the following questions:12. How many HTTP GET request messages were sent by your browser?113. How many d

8、ata-containing TCP segments were needed to carry the single HTTPresponse?414. What is the status code and phrase associated with the response to the HTTP GETrequest?Code 200 phrase ok15. Are there any HTTP status lines in the transmitted data associated with a TCPinduced“Continuation”?no1.6 实验总结http

9、协议工作原理HTTP协议的主要特点可概括如下:1.支持客户/服务器模式。2.简单快速:客户向服务器请求服务时,只需传送请求方法和路径。请求方法常用的有GET、HEAD、POST。每种方法规定了客户与服务器联系的类型不同。由于HTTP协议简单,使得HTTP服务器的程序规模小,因而通信速度很快。3.灵活:HTTP允许传输任意类型的数据对象。正在传输的类型由Content-Type加以标记。4.无连接:无连接的含义是限制每次连接只处理一个请求。服务器处理完客户的请求,并收到客户的应答后,即断开连接。采用这种方式可以节省传输时间。5.无状态:HTTP协议是无状态协议。无状态是指协议对于事务处理没有记忆

10、能力。缺少状态意味着如果后续处理需要前面的信息,则它必须重传,这样可能导致每次连接传送的数据量龃蟆A硪环矫妫诜衿鞑恍枰惹靶畔彼挠鹁徒峡臁?. http协议除了TCP/IP协议,http可以说是最重要,且使用最多的网络协议了假设现在有一个html文件:http.html, 存放在Web服务器上,其URL为 代码:http.htmlhello, http现在,一个用户通过IE访问该地址,IE首先将此地址的域名通过DNS转换为一个IP地址,然后通过一个Web服务器开放的端口(默认为80,不为80需在域名后加上“:端口号”,例如:81)与其连接, 然后传送一个类似这样的http请求(使用flashge

11、t等下载软件下载文件时,在详细信息里也可以看到类似的信息):GET /http.html HTTP/1.1Host:Accept: */*User-Agent: Mozilla/4.0 (compatible; MSIE.6.0; Windows NT 5.1)Pragma: no-cacheCache-Control: no-cacheConnection: close空行请求的第一行为请求内容, 表示通过GET方法向服务器请求资源,/http.html为请求资源名称,HTTP/1.1 表示使用http协议,版本1.1。然后接下来的几行称为请求信息的标头(header),其中描述了请求的一些

12、信息,比如客户端浏览器标识等。最后一个空行表示请求结束。当Web服务器接收到该请求时,服务器检查所请求的资源是否有效,且是否有相应的权限。如果没有问题,则服务器会传回类似如下的http响应信息:HTTP/1.1 200 OKServer: Microsoft-IIS/5.0Date: Thursday, March 31, 2005 17:15:23 GMTContent-Type: text/htmlContent-Length: 88空行http.htmlhello, http其中第一行的“200”是一个状态码,表示服务器成功完成该请求,如果不成功会返回其他状态码。Content-Type表示返回的数据类型,Content-Length表示返回的数据长度。空行表示标头结束,下面则是浏览器根据请求返回的数据内容,这里是http.html的文件内容,浏览器解析html源代码,将Web页面呈现给用户,到这里就完成了一次成功的http通信。以上内容是Web通信的基础,就和Windows消息机制一样,你可能不会用到它,但是你必须了解它,你得知道那些高级的东西隐藏了哪些低级的内容,这样对你理解和使用那些高级的东西都有非常大的帮助:)。 /

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 劳务/用工合同

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号