Original from: http://www.cnblogs.com/tugenhua0707/p/4623317.html, Bugenhua
! The author thinks that the original writer is very good, so it is collected in this
Fiddler mode use (i) in-depth study
Read Catalogue
- The basic concept of Fiddler
- How to install fiddler
- Understanding the next Fiddler user interface
- Understand the meanings of different icons and colors
- Common shortcut keys for Web session
- Understanding the Web Session context menu
- Fiddler how to capture a session in Firefox
- Fiddler How to capture an HTTPS session
- HTTP statistics view for fiddler
- Mobile development How to use Fiddler mode code
Back to Top
Basic Concepts of Fiddler:
Fiddler is a Windows-based proxy server software that runs programs locally, such as Web browsers and other client applications, that send HTTP and HTTPS requests to fiddler,fiddler, which typically forwards these requests to the Web server. The server returns the response of these requests to fiddler,fiddler and forwards the response to the client.
Fiddler is working as a proxy Web server, which uses proxy addresses: 127.0.0.1, Port: 8888. When Fiddler automatically sets up the agent, it automatically unregisters the agent when it exits, so that it does not affect other programs. If Fiddler exits abnormally, this is because Fiddler does not log off automatically, which can cause the webpage to be inaccessible. The workaround is to restart the next fiddler.
Back to Top
Installing fiddler
Before installing Fiddler, the. NET Framework needs to be installed, and I am currently installing FIDDLER4, so I downloaded the. NET Framework4 installed as follows:
Install fiddler and install the General software No difference, here does not introduce ~ ~;
Back to Top
Understanding the next Fiddler user interface
My side is Fiddler4 the interface is as follows:
The HTTP requests captured in the Web session interface in Fiddler are as follows:
The WEB session list contains some of the following information:
Back to Top
Understand the meanings of different icons and colors (common below):
Back to Top
Common shortcut keys for Web session
CTRL + A: Select all sessions;
ESC: Uncheck all sessions;
Ctrl+i reverse selection, or Cancel if session is selected, otherwise selected;
Ctrl+x Delete all session;
Delete: Deletes the selected session;
Shift+delete Delete all unselected sessions
R re-executing the current request
Shift+r repeated execution of the current request multiple times
U: Unconditionally re-executes the current request, sending a request header that does not contain if-modified-since and If-none-match
Shift+u repeatedly executes the current request unconditionally.
Alt+enter View the properties of the current session;
Insert: Toggles whether the selected session is marked in bold red
M adds a description to the selected session;
Back to Top
Understanding the Web Session context menu
After we click on the session Item, the context menu will appear as follows:
The AutoScroll session list option is used to determine whether Fiddler will automatically add the new session to the Web session list.
Let's take a look at some of the session information for the Copy menu item below:
Just URL: Copy the URL list of the selected session to the Clipboard, one URL per line. Here we locate in the session,
When we paste it, we see that it is a URL address, as shown below:
Http://www.telerik.com/UpdateCheck.aspx?isBeta=False
As can be seen above, we can also use the shortcut key CTRL+U implementation;
This column : copies the text of the selected session menu, as follows:
When we finish the copy, we can see the following text when we paste it:
HTTP
Terse Summary: Copy the brief description of the selected session to the Clipboard, with a brief description of the request method, URL, status code and status information for the response, if the response is http/3xx redirect, The contents of the Location field in the response header are also included in the text, as follows:
When we are pasting, we can see the following information:
GET Http://www.telerik.com/UpdateCheck.aspx?isBeta=False
$ OK (Text/plain)
Of course, you can also use the shortcut key;
Headers only copies the request header of the session to the Clipboard, either in plain text or in HTML format. As follows:
Paste as follows:
GET Http://www.telerik.com/UpdateCheck.aspx?isBeta=False http/1.1
user-agent:fiddler/4.5.1.2 (. NET 4.0.30319.1026; WinNT 6.1.7601 SP1; ZH-CN; 2xx86)
Pragma:no-cache
Accept-language:zh-cn
referer:http://fiddler2.com/client/4.5.1.2
Host:www.telerik.com
Accept-encoding:gzip, deflate
Connection:close
http/1.1 OK
Cache-control:private
Content-type:text/plain; Charset=utf-8
Content-encoding:gzip
Vary:accept-encoding
server:microsoft-iis/7.5
set-cookie:sid=jeler5vxx0gyb7fw53ncxaobr7bcbb+ ortlpxuq2iuvsiqp1uosguo2dlc4hoxbgeq5ylfg959jrykol5zx33nbvhffck3uqdbwh5xaprigiso9kjovdhf6ip/ udevllywb43itzciaznksxdenidrb3lvo=; expires=wed, 02-jul-2025 01:56:29 GMT; path=/
Access-control-allow-origin:http://converter.telerik.com
Date:sun, 01:56:29 GMT
content-length:447
Connection:close
session: The entire session list is copied to the Clipboard and is supported in both plain text and HTML formats. As follows:
The paste results are as follows:
GET Http://www.telerik.com/UpdateCheck.aspx?isBeta=False http/1.1
user-agent:fiddler/4.5.1.2 (. NET 4.0.30319.1026; WinNT 6.1.7601 SP1; ZH-CN; 2xx86)
Pragma:no-cache
Accept-language:zh-cn
referer:http://fiddler2.com/client/4.5.1.2
Host:www.telerik.com
Accept-encoding:gzip, deflate
Connection:close
http/1.1 OK
Cache-control:private
Content-type:text/plain; Charset=utf-8
Content-encoding:gzip
Vary:accept-encoding
server:microsoft-iis/7.5
set-cookie:sid=jeler5vxx0gyb7fw53ncxaobr7bcbb+ ortlpxuq2iuvsiqp1uosguo2dlc4hoxbgeq5ylfg959jrykol5zx33nbvhffck3uqdbwh5xaprigiso9kjovdhf6ip/ udevllywb43itzciaznksxdenidrb3lvo=; expires=wed, 02-jul-2025 01:56:29 GMT; path=/
Access-control-allow-origin:http://converter.telerik.com
Date:sun, 01:56:29 GMT
content-length:447
Connection:close
?
? ' i?%&/m? J? J?? T?? '[email protected]?????? ig#)? *?? Eve][email protected]???? {??? {???;? N '???? \FDL?? J??!??? ?~|?"???? O?????? O??? W? {?? ?? Wwog???? =[??? 2o_f?y?? D?v]?i? Xuu?? G?f? O?n???? Z7?d}q^??? #
~ '???? =?_????? I?? O??? K??? Z?.? U??
7}??? 6[?7?}? -[|:o??? W ' EU???? XZ-??? UWU5MSW???????? W?? N???? V??? F??????? Q? {~???? _???? Q?f???? I?????? -?ez?? -}:???? GOSB? x^? We;o???? I?? U?] FE? M?|? '?? ^???? M?u? Pv?*? ' D?4?.??? B???? 4g? YkF? (? S???? W???
Response Datauri: Datauri of response information
As follows:
The information is as follows:
data:text/plain;base64,h4siaaaaaaaeao29b2acszylji9tynt/svvk1+ b0oqiaybmk2jbaeozbim3mkuwdaucjkasqgcplvmvdzhzazo2dvpfee++999577733ujudtif33/8/xgzkawz2zkrayz4hgkrihz9+fb8/ivz/ 4+t+b5zs/sbj3m+c7i/vj3fhe+n3pr27d3dvz/f+93/jjd1brorqmk9fzto3ezuezkt2xedpsvhvdeu+ n6vny2avt9uqbujtn8zqolo36wr9cv68y+kja34n/d7+3t36xwh/lr6pqrjjj9jvf/ N6zwv64vv6hs7sl3x10wq3fb3k6jzb0jf0cn2rlvspfdpv29wju3cnzxxrjnu8zovi7xhale6ef7mz/xv3vtvtc3f3/vbo/vbeg7tx86zdbrax +dv2sdzwrtv72/e3iri/cfj7fvf0+cmxx5z+nr9x8maep6/zabwcpaezoi2qzvqdpy19oqmqt+ lht3nc46jyxqrxrttpnwmoj9kiszfvvzpdzkwztcp8/bsnz/osxqaligiytap1y1bw2sqvj0tenkmunr76yvu8zvm0z+hza0amkojtjov/ Aef3j4a5aqaa
Full Summary copies the information displayed in the Web session list to the Clipboard. As follows:
The information is as follows:
# Result Protocol Host URL Body Caching content-type Process Comments Custom
1 HTTP www.telerik.com/UpdateCheck.aspx?isBeta=False 447 private text/plain; Charset=utf-8 fiddler:6500
The Save submenu contains some options for saving traffic to a file, as follows:
The in Archivezip option in Selected Sessions is to save the session selected in the Web session list to the Saz file, as follows:
The as text in Selected Sessions is saved to a text file with all the selected sessions, as follows:
The as text (Headers only) in the Selected Sessions is saved to a text file with the request header and the response header of the selected session, and there are many options, which I will not introduce on this side. Let us introduce again;
Back to Top
Fiddler how to capture a session in Firefox
Fiddler startup by default is the IE proxy settings 127.0.0.1:8888, other browsers need to manually set;
Firefox is manually set up as follows: Tools – "Options – Advanced – Network –" Settings
But the above setup is cumbersome, we can install a plugin as follows:
Firefox installed in Fiddlerhook Plugins
When we install the Fiddler, we have installed the Fiddlerhook plug-in, we need to go to Firefox to enable the plugin; tools-add-extensions-"fiddlerhook enable
Enable it!! Then we need to set it in Firefox;
Let's take a look at Firefox manual settings as follows: Tools – Options – Advanced – Network – Settings
We can then install a hostadmin plugin for easy viewing.
Back to Top
Fiddler How to capture an HTTPS session
By default, Fiddler does not capture HTTPS sessions and requires you to set the Fiddler tool->fiddler Options->https tab to open
Click Yes after the popup box;
Back to Top
HTTP statistics view for fiddler (can optimize requests and pages)
The Fiddler Statistics tab shows the basic information for the current session, displaying text information at the top of the tab, a pie chart at the bottom, and displaying traffic by MIME type. With the Statistics tab, the user can select multiple sessions to get the total information statistics for these sessions, such as multiple requests and bytes transferred.
Select the first request and the last request to get the overall time consumed by the entire page load. From the bar chart, you can also separate which requests take the most time, thus optimizing access to the page.
As shown below:
The pie chart is as follows:
Some of the information in the Statistics tab is explained in the following sense:
Request Count : the selected session number;
Unique Hosts : The number of independent target hosts for traffic flow. If all the selected traffic is sent to the same server, the field is not displayed.
Bytes Sent: The total number of bytes sent out of the HTTP request header and the request body. The respective bytes of the head and body are given in the parentheses below.
Bytes Received: The number of bytes received in the HTTP request header and the request body. The number of bytes of the request header and the request body are given in parentheses after the total count.
requests started at: Fiddler the point in time of the first byte of the first request received.
responses completed at: Fiddler the point in time of the last byte of the last response sent to the client.
Sequence (Clock) Duration: The "clocking time" between the start of the first request and the end of the last response.
Aggregate Session Duration: the and of the time between all the selected sessions from the request to the response.
DNS Lookup time: The sum of the times spent resolving DNS for all selected sessions.
TCP/IP Connect duration: The sum of time spent by all selected sessions to establish a TCP/IP connection.
HTTPS handshake duration: The sum of the time spent by all selected sessions on the HTTPS handshake.
Response Codes: Check the count of each HTTP response code in the session.
Response Bytes by Content-type: Select the number of bytes of each content-type in the session that you are responding to.
Estimated performance: A preliminary estimate of the time required for the selected traffic to be in different language (local) regions and in connection mode.
Back to Top
Mobile development How to use Fiddler mode code
1. First computer and mobile phone to use the same wireless network.
2. Configure Fiddler, click Tools--Fiddler Options
3. Mobile phone configuration, my side is the Android phone (iOS also), click Set in, choose Wireless Network, as follows:
After clicking on the proxy settings, enter the following:
Next you can look at my IP address as follows:
After setting up, we can use the mobile phone to access the webpage, can use fiddler to monitor the request or replace the JS or CSS file;
Note: Sometimes I visit the page prompt "Proxy server connection Failed", then in this case, it is likely that the firewall or some 360 similar anti-virus software, we can set the firewall under the Fiddler through, as follows:
4. Modify the Host
As above, we can listen to the page request, but if I want to listen to the local server-side code, it can not access (my local use of the server is the PHP environment), such as I am in the local demo, if all good, I upload to the server side, first we need to start the PHP server; Let's use the IP of this machine to access the next, as follows:
1. We need to modify the configuration in Fiddler, tools– "HOSTS, as follows:
After clicking the Save button, we will then visit the page and we can access it as follows:
After the page can be accessed, sometimes we want to replace the JS or CSS file, we can use the Right tab in the tab bar Autoresponder, as follows:
At the bottom of the can replace some JS or CSS files, there is not much to introduce ~
As above is the current summary of some basic fiddler basic knowledge points, in the next spare time will be more to summarize the knowledge of Fiddler related modes ~ If the summary of the bad words, I hope you have a lot of advice ~ ~
Summary: Fiddler basic knowledge points as above, in the next time will be a comprehensive summary of fiddler related meanings, we usually use the Fiddler some aspects, but we also need to understand the other aspects of the meaning, for the future use of proxy HTTP request or optimize the page has a better understanding, Therefore, I think it is necessary to learn more fiddler knowledge points ~ So Fiddler will always have a summary of the following ~ ~
Fiddler actual combat Please click
(reprint) Fiddler mode use know how much (a) in-depth study