码迷,mamicode.com
首页 > 其他好文 > 详细

FIDDLER的使用方法及技巧总结

时间:2019-01-03 18:14:49      阅读:703      评论:0      收藏:0      [点我收藏+]

标签:用户   发送   指定   黄色   The   OWIN   文件   模拟   颜色   

FIDDLER用户界面
FIDDLER用户的几面主要包括下面几个部分,如图所示:首先FIDDLER窗口的最左边是web session列表,窗口的最上方是main menu主菜单,然后下面的是toolbar工具栏,窗口最下方的黑的框是quickexec命令行,最下方的栏是status bar状态栏,右边是view选项视图。整体大概就是酱紫。

 

1、Web Session 列表
列表上主要包含下面的几个部分

 

包含部分如下:

包含部分如下:

#:

FIDDLER为session生成的ID号

Result:

相应的状态码

Protocol:

对应的协议(HTTP、HTTPS、FTP)

Host:

接受请求的主机名和端口号

URL:

请求URL的路径

Body:

相应体中包含的字节数

Caching:

相应头中Expires和Cache-Control的值

Content-Type:

相应的Content-Type

Process:

数据流对本地的Windos进程

Custom:

FiddlerScript所设置的ui-CustomColumn标志位的值

Comments:

通过工具栏Comment按钮设置的注释信息

注:标蓝色区域的内容为平时较常用的部分

 

每个记录不同图标和不同颜色的含义如下:


颜色的含义如下:

红色:

表示HTTP状态(错误)

黄色:

表示HTTP状态(认证)

灰色:

表示数据流类型CONNECT或表示响应类型为图像

紫色:

表示响应类型为CSS

蓝色:

表示响应类型为HTML

绿色:

表示响应类型为script

※注:在FIDDLER script session的ui-color标志位中可以修改字体的颜色

 

部分图标的含义如下:(额,这个表从我的word粘过来格式错,那我就直接截图了哦)

 

 

列表上对应快捷键的使用:

SPACEBAR

在视图中激活并显示当前的session

CTRL+A

选中所有的session

ESC

取消选择所有的session

CTRL+I

反向选中:取消选中的session,选中之前未选中的session

CTRL+X

删除所有session

DELETE

删除选中的session

SHIFT+DELETE

删除所有未选中的session

R

重新执行当前请求

SHIFT+R

多次执行当前的请求(次数在后续的提示框中可以输入)

U

无条件的重新执行当前的请求

SHIFT+U

无条件的多次重新执行当前的请求(次数在后续的提示框中可以输入)

P

选中触发该请求的父请求

C

选中该响应触发色所有子请求

D

选中和当前session使用了相同请求方法和UR;的所有”重复”的请求

ALT+ENTER

查看当前session的属性

SHIFT+ENTER

在新的FIDDLER窗口中启动该session的inspectors

CTRL+1/2/3/4/5/6

把选中的session分别用粗体的红色/蓝色/金色/绿色/橙色/紫色表示

M

给选中的session添加描述

※注:标蓝色区域的内容为平时较常用的部分

 

右键后的上下文菜单列表:

Copy

Copy菜单项用于复制在web session列表中选中的session信息,

包括just URL(选中的session的URL复制到剪切板中)、this column(拷贝菜单所在列的文本)、terse summary(选中session的简要说明复制到剪切板里)、header only (把session请求头复制到剪切板里)、session(把整个的session列表都复制到剪切板里)、full summary(把列表中显示的所有session信息复制到剪切板里)

Save

Save菜单项用于把请求保存下来

Replay

Replay用于把请求以原来的形式重新发送

Select

Select选项用于支持当前选中的session来选择其他的session

Mark

可以把选中的session分别用粗体的红色/蓝色/金色/绿色/橙色/紫色表示

Properties…

查看当前session的属性

※注:标蓝色区域的内容为平时较常用的部分

 

2、Main Menu 主菜单
菜单栏可以启动所有FIDDLER的功能


①File菜单

菜单选项如下:

Capture Traffic:

控制是否开启fiddler代理的开关

New Viewer:

打开一个新的fiddler窗口

Load Archive:

用于重新加载之前捕获到的SAZ文件格式保存的流量

Save:

子菜单中支持以多种方式把流量保存到文件中去,和之前讲的web session中右键后上下文菜单列表的save功能是一样的

Import Sessions…:

支持导入从其他工具获得的流量

Export Session:

支持用fiddler把捕捉到的sesison用多种方式保存

Exit:

关闭fiddler代理

 

②Edit菜单

菜单选项如下:

Copy:

支持复制sessions中的某些个信息

Remove:

支持删除web sessions的全部、选中、未选中的信息

Select All:

全选sesisons列表中的所有内容

undelete:

恢复之前删除的sessions

Paste as Sessions:

把剪切板里的sesisongs复制到web sessions中

Mark:

支持用不同颜色标记sessions

Unlock for Editing:

把锁定的sesisons解锁

Finf Sessions…:

打开find sessions窗口,搜索捕获到的数据流

 

③Rules菜单

菜单选项如下:

Hide Image Requests:

控制是否显示图像类的sessions

Hide CONNECTS:

控制是否在web sessions中显示CONNECT方法请求的sesisons

Automatic Breakpoints:

控制是否自动在Before Request或After Request处断点

Customize Rules:

打开fiddler script文件

Require Proxy Authentication:

如果选中,则所有未提交的Proxy-Authentication请求头的请求会返回HTTP/407的相应

Apply GZIP Encoding:

如果选中,则只要请求包含gzip标示的Accept-Encoding请求头就会对除了图片以外的所有相应使用GZIP HTTP进行压缩

Remove all Encodings:

如果选中,会删除所有请求相应的HTTP内容编码和传输编码

Hide 304s:

隐藏包含HTTP/304 NOT MODIFIED状态的所有sessions

Request Japanese Content:

把所有的Accept-Encoding请求头设置替换成ja标示,标示客户端希望以日语的形式发送

User-Agents:

子菜单支持把User-Agent请求头设置或替换成指定值

Performance:

子菜单提供影响web性能的简单选项

※具体的性能设置建议还是通过Customize Rules的fiddler script文件来设置

 

④Tools菜单

菜单选项如下:

Fiddler Options…:

打开Fiddler Options的窗口

WinINET Options…:

打开IE的Internet Options窗口

Clear WinINET Cache:

清空IE和很多其他应用中所使用的WinINET的缓存文件

Clear WinINET Cookies:

清空IE和很多其他应用中所使用的WinINET的Cookies文件

TextWizard…:

启动TextWizard窗口

Compare Sessions:

使用内容工具比较两个sessions

※选项只有当选中web sessions列表中的两个session时才有效

HOSTS…:

选项会打开fiddler的Host Remapping工具

 

⑤Views菜单

菜单选项如下:

Show Toolbar:

控制fiddler工具栏是否可见

Statistics:

激活Statistics选项卡

Inspectors:

激活Inspectors选项卡

Conposer:

激活Conposer选项卡

Minimize to Tray:

最小化fiddler到系统托盘

※CTRL+M键也是这个功能

Stay on Top:

强制fiddler运行在所有窗口的上方

AutoScroll session List:

控制当添加新的sessions后,fiddler是否自动滚到web sessions列表的底部

Refresh:

和F5键都用来刷新Inspectors和Statistics中的sesisons信息

 

⑥Help菜单

菜单选项如下:

Fiddler Help:

打开web浏览器,跳转到Fiddler的帮助页面

※F1键也是这个功能

Fiddler Discusison:

打开web浏览器,跳转到Fiddler的讨论组

HTTP References:

打开参考文档的页面

Check For Updates…:

连接到web服务器,检查当前运行的fiddler是否为最新版本

Send Feedback…:

生成email信息并发送到我的邮箱

About Fiddler:

打开窗口,显示当前的fiddler版本的信息

 

3、Toolbar工具栏
工具栏的话主要是提供了常见的命令和设置的快捷方式


列表上对应快捷键的使用:(我去,列表又尼玛粘不了,还是直接截屏吧)

 

 

4、Status Bar 状态栏
状态栏由一组面板组成,显示一些fiddler的配置信息


内容如下表:

Capturing Indication

点击面板可以切换状态:指示fiddler是否配置为系统代理

Process-based Filter

显示fiddler当前正在捕获的流量的进程类型,点击可以显示进程类型的过滤选项菜单

Breakpoint Indicator

指示中断影响的类型。可能取值为:全部请求、全部响应、无

Session Counter

Web sessions的列表的条目数

※注:选中一个或多个,则显示的方法是选中的sessions数目除以总sessions数目,例如:1/10,245

Status Information

默认情况下,显示第一个选中的session的url

 

5、QuickExec命令行
命令行对话框提供了常见操作的快捷方式:包括选择命令和script命令


 

①Quickexec选择/选中命令的含义及作用如下:

命令

实例

动作

?sometext

? /app/logi

As you type sometext, Fiddler will highlight sessions where the URL contains sometext. Hit Enter to set focus to the selected matches.

>size

>40000000

>400k

>4kk

Select sessions where response size is greater than size bytes.

※注:字符‘k’会被转换成‘000’,这样就可以很容易的以kb甚至mb来设置

<size

<5k

Select sessions where response size is less than size bytes.

=status

=200

=404

Select sessions where response status = status.

=method

=GET

=POST

Select sessions where request method = method.

@host

@msn.com

Select sessions where the request host contains host. Hit Enter to set focus to the selected matches.

 

②fiddlerscript命令的含义及作用如下:

命令

实例

动作

bold

bold /bar.aspx

Mark any future sessions in bold if the url contains the target string

bpafter

Bpafter /fa

Break any response where the RequestURI contains the specified string

※注:键入不带参数的bpafter可以取消该断点

bps

Bps 404

Bps 200

Break any response where the status code matches

※注:键入不带参数的bps可以取消该断点

bpv or bpm

bpv POST

bpm POST

Create a request breakpoint for the specified HTTP method. Setting this command will clear any previous value for the command; calling it with no parameter will disable the breakpoint.

※注:键入不带参数的bpv或bpm可以取消该断点

bpu

bpu /myservice.asmx

Create a request breakpoint for URIs containing the specified string. Setting this command will clear any previous value for the command; calling it with no parameter will disable the breakpoint.

※注:键入不带参数的bpu可以取消该断点

cls or clear

 

clear the session list

dump

 

dump all sessions to a zip archive in C:\

g or go

 

Resume all breakpointed sessions

help

 

Show this page

hide

 

 Hide Fiddler in System tray

Urlreplace oldtext newtext

urlreplace SeekStr ReplaceWithStr

Replace any string in URLs with a different string. Setting this command will clear any previous value for the command; calling it with no parameter will cancel the replacement.

start

 

Register as the system proxy

stop

 

Unregister as the system proxy

Show

 

Restore Fiddler from system tray -- more useful when triggering rules from ExecAction.exe (see below)

select MIME

select image

select css

select htm

Select any session where the response Content-Type header contains the specified string.

select HeaderOrFlag PartialValue

select ui-comments slow

select ui-bold *

select ui-comments \*

select @Request.Accept html

select @Response.Set-Cookie domain

Select any session where the named Header or SessionFlag contains the specified string.

allbut or keeponly

allbut xml

allbut java

Hide all sessions except those where Content-Type header contains the specified string.

quit

 

Shutdown Fiddler.

 

6、View 选项卡
1、statistics统计选项卡

Fiddler statistics shows the followsessions info.

 


下面是详细介绍的关于统计选项卡中的字值含义:

数据

实例格式

含义

Request Count:  

1

选中的sessions数目

Bytes Sent:     

658

(headers:423; body:235)

HTTP请求头和请求体向外发送的所有字节数

Bytes Received: 

431

(headers:377; body:54)

HTTP请求头和请求体接收到的所有字节数

ClientConnected:

14:09:30.762

 

ClientBeginRequest:

16:06:55.582

 

GotRequestHeaders:

16:06:55.582

 

ClientDoneRequest:

16:06:55.582

 

Determine Gateway:

0ms

选中的sesisons确定网关花费的时间总和

DNS Lookup:  

0ms

选中的sesisons解析DNS花费的时间总和

TCP/IP Connect:      

25ms

选中的sesisons建立TCP/IP连接花费的时间总和

HTTPS Handshake:

0ms

选中的sesisons在HTTP握手上花费的时间总和

ServerConnected:   

16:06:55.608

 

FiddlerBeginRequest:

16:06:55.608

 

ServerGotRequest:

16:06:55.608

 

ServerBeginResponse:

16:06:55.582

 

GotResponseHeaders:

16:06:55.635

 

ServerDoneResponse:

16:06:55.635

 

ClientBeginResponse:

16:06:55.635

 

ClientDoneResponse:

16:06:55.636

 

Overall Elapsed:      

0:00:00.053

 

ESTIMATED WORLDWIDE PERFORMANCE

 

--------------

The following are VERY rough estimates of download times when hitting servers based in Seattle.

 

2、Inspectors检查选项卡

TheInspectors tab allows you to view the contents of each request and response, ina variety of different formats. You can develop custom Inspectors using .NET.


3、AutoResponder自动响应选项卡

The AutoRespondertab allows you to return locally stored content instead offorwarding requests to the server. Learn more...


※注:这个规则在第三章fiddler使用技巧那会重点讲

 

4、Composer构建选项卡

Support send HTTP、HTTPS、FTP responseand manual composer

这个功能可以模拟发请求

 


第一步:先把请求输入到框内,注意前面的类型是get还是post

第二步:执行:execute

第三步:在web sessions里可以查到刚发的请求

※注:这个方法可以模拟重复发很多请求的功能,在测一些接口返回请求频繁的功能时会用到

 

5、Log日志选项卡

Log support that collecting Log messagestring


右键日志区域的上下文菜单含义如下:

Copy

把选中的文本复制到剪切板

Send to Session List

把日志发到web sessions里面

Save to Files…

把当前日志保存到磁盘文件中

※注:可以是纯文本格式的文件,也可以是格式化的富文本格式(.rtf)

Clear

清空log中所有文本

 

6、Filters过滤选项卡

The Filters tab enablesyou to quickly filter out traffic that is not of interest.

 


菜单选项的功能如下

Hosts

The Zone Filter dropdown at the top of the dialog allows you to show traffic only to your Intranet (e.g. dotless hostnames) or only to the Internet (e.g. dotted hostnames). This is a useful option when debugging a site in one zone while referencing web-based documentation from the other zone.

The Host Filter dropdown enables you to flag or exclude display of traffic to specified domain names. Note, if you put, e.g. fiddler2.com in the list, you will not see traffic to www.fiddler2.com. To see traffic to subdomains of Fiddler2.com, set the filter to **.fiddler2.com*.

This will include traffic to test.fiddler2.com and sub.fiddler2.com, etc. If you want to see traffic to fiddler2.com as well, set the filter to **fiddler2.com*; this will include traffic to any domain that ends with fiddler2.com.

※注Note: When the box is yellow, it means your changes have not yet been applied. Click anywhere outside the box to save your changes to the list.

When configured to hide traffic to certain hosts, Fiddler will still proxy traffic to those hosts, but that traffic will be hidden from the Fiddler Session List. List multiple hosts using a semi-colon.

 

Client Process

The process filter allows you to control which processes‘ traffic is shown within Fiddler.

The Hide traffic from Service Host option will hide traffic from svchost.exe, a system process that synchronizes RSS Feeds and performs other background network activity.

Note: Fiddler can only determine the process name/PID owner of a request when the client application is running on the same computer as Fiddler itself.

When configured to hide traffic from certain processes, Fiddler will still proxy their traffic, but that traffic will be hidden from the Fiddler Session List.

 

Breakpoints

The breakpoints enable you to break requests or responses that contain the specified attributes.

Request Headers

Using these options, you can add or remove HTTP request headers, and flag responses that contain certain headers.

Response Status Code

Using these options, you can filter display of responses based on the Response Status Code.

You can set the boxes to hide sessions whose responses code match target values [HTTP errors, redirects, authentication challenges and cache-reuse].

 

Response Type and Size

Using these options, you can control what types of responses appear within the session list.

The list of "Block" checkboxes enables blocking responses of the specified types, returning a HTTP/404 error to the client instead of the target resource.

 

Response Headers

Using these options, you can add or remove HTTP response headers, and flag responses that contain certain headers.

 

7、Timeline时间轴选项卡

The Fiddler Timeline View allowsyou to visualize the HTTP(S) traffic on a "waterfall" diagram.

Hovering over any entry will show moreinformation about the entry. Double-clicking the entry will inspect thatsession.

 


时间选项卡上的图形的含义如下:

The abbreviated URL at the left of eachTransfer Bar is green if the request was a Conditional Request, or Black if therequest was unconditional. The full URL is shown in the status bar on hover.

The start of the transfer bar is drawn atthe time (Timers.ClientBeginRequest) when the client sends the request toFiddler.

The end of the transfer bar is drawn at thetime (Timers.ClientDoneResponse) when the response to the client is completed.

The color of the bar is determined by theMIME type of the response; light-green for images, dark-green for JavaScript,purple for CSS, and blue otherwise.

If the bar is "hatched" ratherthan smooth, this indicates that the HTTP response was buffered by Fiddler. Formore information, see the "What is streaming?" section below.

The vertical line indicates the time tofirst byte of the server‘s response (Timers.ServerBeginResponse).

The green circle before the bar shows thata connection was reused; a red circle means that the connection was newlycreated.

The top circle represents the client‘sconnection to Fiddler; the bottom circle represents Fiddler‘s connection to theserver.

A red X after the bar indicates that theserver sent a Connection: close header (or failed to send aKeep-Alive header for a HTTP/1.0 response), preventing subsequent reuse of the connection.

The gray arrow icon indicates that theserver‘s response was a redirect (302). The red ! icon indicates that theserver returned an error code (4xx, 5xx).

下面是请求的模式:

Streaming mode ensures that HTTP responsesare not buffered by Fiddler. Buffering alters the waterfall diagram, as you cansee below, where none of the images begin to download until their containingpage completes. Learn more...


LI流模式和瀑布模式上方快捷键可以来回切换


---------------------

原文:https://blog.csdn.net/linyuchen2008/article/details/52959086

FIDDLER的使用方法及技巧总结

标签:用户   发送   指定   黄色   The   OWIN   文件   模拟   颜色   

原文地址:https://www.cnblogs.com/sea520/p/10215860.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!