Interface capture, summary of how to use Fiddler to capture packets, entry to proficiency in auxiliary combat...


foreword

working principle

Fiddler is a browser packet capture and debugging tool implemented by C#. After fiddler is enabled, it exists as a proxy between the browser and the server, and monitors the http/https level network interaction between the browser and the server. Currently it supports various major browsers such as IE, Chrome, FireFox, Safari, Opera.

Tool download

Download address: https://www.telerik.com/download/fiddler

Instructions

1. Basic interface
The interface of Fiddler displays various types of information through multiple tab pages. The most commonly used tab page is Inspectors. Through this tab page, you can view the details of the captured network requests and replies.

A1

There are different icons in front of each frame of packet capture to indicate various request types or states.

A2

2. Packet capture method
After the fiddler is developed, it is in the packet capture state by default. You can check the display of capturing in the lower left corner of the interface. If it is not displayed, click here to start packet capture.

If the website you visit is an https website, you need to set the https decryption through Tools - Fiddler Options - Https - Decrypt Http Traffic

A3

Send the request through the browser. (This is not limited to browsers on the windows platform, as long as the program sends requests through winhttp or wininet, it can be monitored)

After receiving the reply, go back to fiddler to view the captured packet content.

3. Keyword search
Press Ctrl+F to bring up the search dialog box, and search for keywords globally.
After selecting a specific request, you can find content in a specific request or reply in Inspecters - Raw, respectively.
If the reply is compressed, the content can be decompressed by clicking the hint button

A4

4. Automatic reply
request The automatic reply application is also relatively wide. For example, capture packets from other machines and pour them into the automatic reply, and then replay the problem on the local machine; or do not want some requests to call the server during the dynamic debugging process, but in the automatic reply Prepare or make corresponding changes to see the effect directly.

Switch to the AutoResponder tab page;
select Enable automatic responses;
click the Import button to import the captured saz file;
you can modify the request matching rules through the default Url or through the Rule Editor;

A5

5. Breakpoint setting
Set breakpoints through Rules - Automatic Breakpoints - Before Requests/After Response.

A6

The breakpoint is triggered after the request or reply is received, and the request or reply can be dynamically modified for different tests.

A7

6. Custom extension scripts
Fiddler supports extended functions through Jscript, such as automatically processing requests and replies through scripts.

Here are two simple examples:

The methods mentioned below can be found in CustomRule.js and change accordingly.
You can open CustomRule.js through Rules - CustomRule.

A8

A9

Target Code to be added Methods that need to add code
Add a request header oSession.oRequest[“NewHeaderName”] = “New header value”; OnBeforeRequest
Delete a response header oSession.oResponse.headers.Remove(“Set-Cookie”); OnBeforeResponse
The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

Pursue bravely, forge ahead, struggle is the ship to realize dreams. Persevere, pursue dreams and fly high, only hard work can create extraordinary. Believe in yourself, go forward bravely, and you will eventually start your own glorious road!

Burning the passion in the heart, struggle is the journey of chasing oneself. Not afraid of difficulties, go forward bravely, only hard work can bloom the magnificence of life. Believe in yourself, persevere, and embark on your own glorious road!

Raise the sailboat, chase the distant place, struggle is the voyage to realize the dream. Persevere and embark on the road of wind and rain, only by going forward bravely can we bloom brilliantly. Believe in yourself, do your best, and create your own magnificent life!

Guess you like

Origin blog.csdn.net/shuang_waiwai/article/details/132104200