Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use Fiddler

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge of this article "how to install and use Fiddler", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to install and use Fiddler" article.

Introduction of Fiddler

① Fiddler is a powerful package grabbing tool, which works in the form of web instead of {filter} server. The address of the generation {filter} is 127.0.0.1 and the port is 8888 by default. We can also modify it by setting.

② {filter} means to set up a level between the client and the server. After the client sends the request data, the server will intercept the data packet and send the data to the server by pretending to be the client. Similarly, the server will return the response data, and the server will also intercept the data and return it to the client.

③ Fiddler can crawl packets of any program that supports the http generation {filter}. If you want to capture a https session, you must first install a certificate.

Tip 1: install Fiddler completely

By default, Fiddler does not capture HTTPS sessions. You need to set it to open Fiddler Tool- > Fiddler.

Options- > HTTPS tab

Select checkbox, pop up the following dialog box, and click "YES"

After clicking "Yes", it is set up.

Tip 2: Fiddler connection mobile agent configuration:

1) Open Fiddler- > Tools- > Fiddler Options, select Allow remote computers to connect in the "Connection" panel, set the port number [default is 8888, you can modify other port numbers], click the "OK" button, close Fiddler and reopen Fiddler.

2) there are two ways to get the native IP for mobile configuration, windows- > run-> cmd- > ipconfig; to get the native IP and easily obtain the local IP:

① mouse over the Online in the upper right corner of fiddler, it will display some information such as IP, Host and so on, as shown below

②, click windows- > run-> cmd- > ipconfig; to get native IP

3) Mobile terminal configuration: change the proxy setting to [Manual], enter [proxy server hostname] (corresponding to the IP address of the PC side), and enter [proxy server port number] (port number configured by Fiddler)

4) after all configuration, now open the assistant with the mobile phone, and you can monitor the request sent by the mobile phone in Fiddler.

Tip 3: the basic interface of Fiddler

There are a lot of messages checking Request or Response under nspectors tab. Raw Tab can view the complete message, and Headers tab can only view the header in the message. The figure below is as follows

Tip 4: after starting Fiddler, Response is garbled, what should I do?

Sometimes we see that the HTML in Response is garbled because HTML is compressed and we can decompress it in two ways.

1. Click "Response is encoded any may need to be decoded before inspection. Click here to transform" above Response Raw

2. Select "Decode" in the toolbar. This will decompress automatically, and then restart it.

Tip 5: the use of QuickExec command line

In the lower left corner of Fiddler, there is a command line tool called QuickExec, which allows you to enter commands directly.

Common commands are:

Help: open the official usage page and all the commands will be listed.

Cls: clear the screen

Select: command to select session

? .png: the picture used to select the png suffix

Bpu: intercept request

Tip 6: create AutoResponder rules in Fiddler

Fiddler's AutoResponder tab allows you to return files locally without sending http request to the

On the server

Look at an example.

1. Go to the assistant's home page, save the serverconfig.html connection to the local desktop, select the request, and right-> copy à Just Url

2. Select the request, click on the right to select AutoResponder, click Add Rule, add the request, or drag the session to AutoResponer tab.

3. Select Enable automatic reaponses and Unmatched requests passthrough

4. Change the locally saved configuration file and select Find a file... under Rule Editor below. Select a locally saved picture. Finally, click Save to save.

5. Re-enter the assistant for the first time and check the data returned by serverconfig that was modified by yourself.

Tip 7: how to filter sessions in Fiddler

Every time you use Fiddler and open a website, you can see dozens of dazzling conversations in Fiddler. The best way is to filter out some conversations, such as those that filter out pictures. Filtering is available in Fiddler. In the Filters tab on the right, as shown in the figure below, only requests with zhushou.sogou.com are shown.

Tip 8: coding gadgets provided in Fiddler

Click TextWizard on the Fiddler toolbar, which can be used for Encode and Decode string.

Tip 9: query sessions in Fiddler

Use the shortcut key Ctrl+F to open the Find Sessions dialog box and enter keywords to query the session you want. The session queried will be displayed in yellow.

Tip 10: save a session in Fiddler

Sometimes we need to save the conversation so that we can send it to others or analyze it later. The steps to save the session are as follows:

Select the session you want to save, and then click File- > Save- > Selected Sessions

CustomRules.js

The main methods in CustomRules.js:

Static function OnBeforeRequest (oSession:Session) / / modify the contents of Response in this method

Static function OnBeforeResponse (oSession:Session)

/ / include the Fiddler command in a method. The QuickExec Box static at the bottom left of the Fiddler interface

Function OnExecAction (sParams:String [])

Example: modify sogouid

① clicks Rules- "CustomRules" in the menu bar to open the CustomRules.js script

Add the following script to ②, write the name of the interface in (), and fill in the request data in url

③, just change the sogouid you want to change.

Put this script under the oSession.uriContains () method, and click "Save script", so that the sogouid under the interface will become the id you changed.

If (oSession.uriContains ("install.html?")) {

OSession.url= "mobile.zhushou.sogou.com/m/install.html?uid=d15449c17bbded35c989736

70c1e1e0c&vn=3.11.2&channel=sogouinputgx&sogouid=e9ed8a54201e5481e20f6760804772c3&stoken==IhTefovaz0ppdInTQxRlnQ&cellid=&sc=0&iv=311 "

Tip 11: modify the display style of session in Fiddler

Place the script under the OnBeforeRequest (oSession:Session) method and click "Save script" so that all cnblogs sessions will be green.

If (oSession.uriContains ("mobiletoolhit.gif?") {oSession ["ui-color"] = "green";}

Tip 12: how to modify body in Request in Fiddler Script

Method 1:

Static function OnBeforeRequest (oSession:Session) {

If (oSession.uriContains ("http://www.cnblogs.com/TankXiao/")) {

/ / get the body string in Request

Var strBody=oSession.GetRequestBodyAsString ()

/ / use regular expressions or replace methods to modify string

StrBody=strBody.replace "1111", "2222")

/ / Pack a dialog box to check the modified body

FiddlerObject.alert (strBody)

/ / rewrite the modified body back to Request

OSession.utilSetRequestBody (strBody);}}

Method 2:

Provides a simple way to directly replace data in body

OSession.utilReplaceInRequest "1111", "2222")

Post request simulation

If the client data is wrong during the test, you may need to make a separate request to a url to see if the returned data is correct. Sometimes complex environmental requirements are required to request through the client, which is quite difficult. Seeing whether the data is correct through a separate request can save some time. Of course, the get request can see the returned data directly with the browser. Post data needs the help of tools because there is body data. The composer feature of fiddler is created for this purpose. As shown in the figure below, enter url at the top and select the request method. After adding post data to the body below, click execute to request, and you can see the return value of this simulation request through inspectors.

The above is about the content of this article "how to install and use Fiddler". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report