廣州八神軟件性能測試課程優秀學員作業-第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三次握手四次揮手等等一系列工作。

 


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