广州八神软件性能测试课程优秀学员作业-第1课-抓包不求人


本文档是广州八神软件性能测试课程学员DI da‘da di的第1抓包不求人的课后作业。感谢DI da‘da di同意分享。作业质量高,有价值,分享给大家共同进步和学习。

课程讨论群:319406535

也可以查看课程的免费部分学习:

http://edu.51cto.com/lecturer/index/user_id-387113.html

http://www.dataguru.cn/myclassnew.php?mod=new_basicforlesson&op=basic&lessonid=323




正文内容:

           hehe.png                 



抓包工具之比较

Httpwatch

+

1)基本使用和技巧
2)HTTP请求时间分段分析

时间轴

+

(图片点击放大)

+

watch1.png

+

·  Blocked

The Blocked time includes any pre-processing time (suchas cache lookup) and the time spent waiting for a network connection to becomeavailable. Browsers limit the number of concurrent network connections per hostname (i.e. www.microsoft.com) and will queue up requests if the limit has beenreached. Often the Blocked time is the most significant factor in the downloadtime of p_w_picpaths embedded in a web page - particularly for older browsers thatwill only use a maximum of two connections per hostname. Modern browsers nowallow up to six connections per hostname.

·  DNS Lookup

+

+

DNS Lookup is the time required to resolve a host name(e.g. www.google.com) into a numeric IP address (e.g. 216.239.59.99).

·  Connect

+

Connect is the time required to create a TCP connectionto the web server (or proxy). If a secure HTTPS connection is being used thistime includes the SSL handshake process unless a separate SSL Handshaketime isshown. Keep-Alive connections are often used to avoid the overhead ofrepeatedly connecting to the web server.
参看文章关于TCP三次握手及四次挥手

·  Send

Send is the time required to send the HTTP requestmessage to the server and will depend on the amount of data that is sent to theserver. For example, long Send times will result from uploading files using anHTTP POST.

 

·  Wait

Wait is the idle time spent waiting for a responsemessage from the server. This value includes delays introduced due to networklatency and the time required to process the request on the web server.

·  Receive

+

Receive is the time taken to read the response messagefrom the server. This value will depend on the size of the content returned,network bandwidth and whether HTTP compression was used.

Fiddler

+

·  Fiddler是一个使用本地127.0.0.1:8888 HTTP 代理,任何能够设置 HTTP 代理为 127.0.0.1:8888的浏览器和应用程序都可以使用 Fiddler。代理是指客户端的所有请求都要先经过Fiddler,然后转发到相应的服务器,反之,服务器端的所有响应,也都会先经过Fiddler然后发送到客户端。如下图:

FIDDLER.png

·  https的抓取关于fiddler的更多详细介绍 Fiddler简介

· +

使用Fiddler构造自定义请求
composer
面板下可以模拟向相应的服务器发送数据的过程。如下图:


composer.png修改User-Agentzhaokongnuan
inspector
面板下,提供headerstextviewhexview等多种方式查看单条http请求的请求报文的信息,查看刚刚发送的数据


inspectors.png

+

+

http协议里,头信息中有一个 User-Agent,它的作用是告诉服务器,用户客户端是什么浏览器,以及操作系统的信息的。在某些特殊的情况下,服务器根据浏览器的不同类型,输出不同的内容。以前很多网站都只显示给IE看,所以当时的opera浏览器还特别做了一个功能,可以把它的User-Agent换成IE的。所以user-agent是非常不可靠的,原因就是它是客户端自己决定并发送给服务器。通过修改User-Agent,可以完美的伪装操作系统、浏览器、蜘蛛、邮件客户端、链接检查、分析器、RSS 阅读器等客户端的信息。关于灌水机器人灌水机器人

· +

使用Fiddler自定义服务器返回
AutoResponder
面板, Fiddler比较重要且比较强大的功能之一,可用于拦截某一请求,并重定向到本地的资源,或者使用Fiddler的内置响应。可用于调试服务器端代码而无需修改服务器端的代码和配置,因为拦截和重定向后,实际上访问的是本地的文件或者得到的是Fiddler的内置响应。当勾选allowautoresponser 并设置相应的规则后,本例中的规则是将http://www.baidu.com/ 的请求拦截到本地的文件basic.html,
如下图所示


rules.png发出请求http://www.baidu.com/ 浏览器响应结果


response.png

·  另外的一个方便的功能即过滤功能,Filter标签则可以设置Fiddler的过滤规则,来达到过滤http请求的目的。最简单如:过滤内网http请求而只抓取http请求,或则过滤相应域名的http请求。Fiddler的过滤器非常强大,可以过滤特定http状态码的请求,可以过滤特定请求类型的http请求(如css请求,p_w_picpath请求,js请求等),可以过滤请求报文大于或则小于指定大小(byte)的请求。


filters.png

firefoxfirebug

+

1)简单介绍firefox和功能强大的firebug
参看
firebug详细使用方法

科来网络分析工具的介绍

+

1)过滤器的使用和多种协议包的抓取
参看
科来网络分析系统抓包简明教程

课程作业

+

1.本课程介绍的4种抓包工具除了都能抓包外,他们各自都有什么独特的特点?

+

·  Httpwatch:主要特点详细的时间轴

·  Fiddler构造自定义请求和自定义服务器返回

·  firebug: 它集HTML查看和编辑、Javascript控制台、网络状况监视器于一体,是开发JavaScriptCSSHTMLAjax的得力助手。Firebug也是一个除错工具。用户可以利用它除错、编辑、甚至删改任何网站的 CSSHTMLDOM以及JavaScript代码。具体操作可参看firebug详细使用方法

·  科来:通过直接捕获网络原始数据包,并进行从网络链路层到网络应用层的全面解码分析,透视网络运行全状况。

+

2.简单说说抓包在你的工作中的使用场景(如果以前没有使用过,那就谈谈学习这节课后的感受)
没有使用过,感受到一个请求发出去之后是做了有DNS查找、TCP三次握手四次挥手等等一系列工作。

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章