[netease] The internal promotion of the 2022 netease Internet Campus Recruitment has begun! To share with you my exclusive internal tweet invitation: bole.campus.163.com/#/app/index… Click the link to fill in your personal information, and you will be qualified for internal promotion in seconds. Internal promotion can enjoy the priority screening of your resume, as well as a resurrection opportunity. Take the offer as soon as possible.

Netease recruit can chat privately inside push! Netease recruit can chat privately inside push! Netease recruit can chat privately inside push!

Fiddler is simple to configure and use

1 Fiddler configuration modification

Before using Fiddler to capture packets from a PC or mobile phone, you must perform the following configuration first; otherwise, you will not see HTTPS requests or the data returned.

1.1 Configuring PC Listening on a PC

If you open Fiddler and browser, the interface will look like this: many requests on the left have a lock icon, and the TextView TAB in the response on the right returns obviously incorrect data because of HTTPS encryption. How to solve this problem?

There is also a hint on the right side of the image, to start on Fiddler’s menu bar Tools > Options > HTTPS > Decrypt HTTPS Traffic Option, select it and click OK to install the certificate.

Open baidu afresh next verify.

Once this is done, the PC browser’s requests can be listened for.

1.2 Mobile Phone Listening Configuration

If we want to capture the app or page on the mobile phone, we need to do the following configuration.

  • First, your computer and phone must be on the same LAN

  • View the IP address of the local host. You can view it using the CMD command ipconfig or click on the line at the bottom right corner of Fiddler.

  • Connect Fiddler configuration to Tools > Options >Connections

    The default port number is 8888

    Check the Allow remote Computers to Connect option and restart Fiddler. When you open Fiddler again, a message will pop up and select OK.

  • Next, turn on the mobile phone, connect wifi, connect a WIFI in the same LAN as the computer, and then set the agent in the advanced options of the mobile phone, set manually, enter the host name of the computer IP address query above, fill in the port number set by Fiddler above, the default is 8888, and then click ok to connect.

  • Then you need to install the mobile phone certificate. Open the browser with your mobile phone and input your IP address and port number, for example: 10.255.1.1:8888. At this time, a page will be displayed.

    Note: Due to system limitations, different phones can be installed in different ways. I take Mi 8 as an example: Settings – > More Settings – > System Security – > Encryption and Credentials – > Install from storage – > Select the fiddlerroot.cer certificate to install – > Enter the screen lock password

    How to install fiddler certificate on your mobile phone

  • When I opened the Mi Mall, I found a request for the Mi Mall app on Fiddler

2. Use of Fiddler

Here is a brief introduction to the common uses of Fiddler. Note: Before performing the following operations, configure 1.1.

2.1 Statistics Request performance data analysis (label on the right)

In fact, this is mainly to display the entire request process, some of the operation time, the specific meaning of the field can refer to here

www.cnblogs.com/smallstone2…

2.2 Inspectors to check the data content (on the right label)

This actually depends on the content of the request, the top is the request, the bottom is the response.

2.3 AutoResponder single file replacement

This is one of Fiddler’s most powerful features. It can replace resources on your online pages, including JS and IMG, with local files. I will use pictures to demonstrate the operation and effect. (There are five steps in total. If you can’t write the third step, read below.)

The third step is more important, is to write matching and replacement rules, the above blank is write matching, you can enter baidu, and then you can choose a picture file below. Its string matching (default) : Anything that contains the specified string (case insensitive) is considered a match. So look at the picture below. After I have finished the above operation, I open www.pan.baidu.com in my browser and see the following effect.

Of course, it can replace not only images, but also a JS file. Just enter the JS file to be replaced in the first input box, and then find a local JS file to replace.

2.4 Setting a Breakpoint Intercepts requests sent by clients and modifies request data

The first step is to know how to set breakpoints. There are two methods

One is the shortcut key. Click on a blank space at the bottom of the image, as shown below. The breakpoint is then opened simply by displaying the right identifier.

​        

Make sure to go to the interface you want to call and then open the breakpoint, otherwise the page will not send requests, the browser will not jump to the page.

Let me give you an example.

In the image above, I use a popup box and click Query Now. The page sends a normal request and the server returns a normal success.

At this point, I open the breakpoint mentioned above before clicking the query now button. At this point, Fiddler looks like the image above. You can see some of the parameters of the request, and then I just delete some of the parameters here, and then click the green button below to run. At this point, if you look at the server response on the page, you will see the error response in the image below. Because the request has already been sent with the parameters changed, the response must be different.

Summary: Fiddler’s power is not just that, it can also modify the content returned from the server, and much more.