Fiddler (六) 最常用的快捷键

使用QuickExec

Fiddler2成了网页调试必备的工具,抓包看数据。Fiddler2自带命令行控制,并提供以下用法。

Fiddler的快捷命令框让你快速的输入脚本命令。

键盘快捷键

按ALT+Q课迅速将焦点定位到快捷命令框。若Fiddler不在活跃状态(后台运行),可按Ctrl+Alt+F先行激活Fiddler(切换至Fiddler面板)
在QuickExec框,按CTRL + I插入会话列表中当前选定的会话的URL

默认命令

?sometext

当您键入一些字符串,如sometext ,Fiddler将突出会话所在的URL中包含sometext的请求 。此时按Enter键将高亮选中所有匹配的会话

1

选择请求响应大小大于size字节的会话

 

<size

选择请求响应大小小于size字节的会话

 

=status、  =method

选择响应状态=status 或请求方法=method的会话

2

@host

选择会话中域名包含host的会话,此时按Enter键可高亮所有匹配的结果

3

bold

预先设置会话加粗:标记任何URL包含了目标字符串的后续请求
tip:再次输入bold取消设置

 

bpafter

设置中断RequestURI中包含指定字符串的任何响应
tip:再次输入bpafter取消设置

 

bps

中断与设置的状态代码匹配的响应

 

bpv or bpm

对指定的HTTP方法创建请求断点。设置此命令将清除该命令的任何以前的值,不带参数调用它会禁用断点

 

bpu

对包含指定字符串的URI创建请求断点。设置此命令将清除该命令的任何以前的值,不带参数调用它会禁用断点

 

cls or clear

清空会话列表

 

dump

打包所有会话成zip归档文件并转存在C:\

 

g or go

恢复所有设置断点的会话

 

help

打开帮助页面(即本文英文版)

 

hide

隐藏Fiddler界面,系统后台运行

 

urlreplace

以一个不同的字符串替换URL中任何字符串。设置此命令将清除该命令的任何以前的值,不带参数调用它,将取消更换

 

start

注册成为系统代理

 

stop

取消注册为系统代理

 

show

将Fiddler从系统托盘中恢复,从ExecAction.exe获取更多有用的触发规则

 

select MIME

选择Content- Type头中包含指定字符串的响应,可用于选择文件格式等

 

select HeaderOrFlag PartialValue

选择已命名的header或SessionFlag包含指定字符串的响应

 

allbut or keeponly

隐藏Content-Type头中除了包含指定字符串的所有会话,用于筛选

 

quit

退出Fiddler

 

!dns hostname

进行目标域名的DNS查找,并将结果显示在LOG选项卡上

)3Z~5L`[P${H(9G_DQV7_MS

!listen PORT [CERTHOSTNAME]

在另一个端口增设一个监听器,选择安全的HTTPS证书

 

附:

CommandActionSample usage
?sometext As you typesometext, Fiddler will highlight sessions where the URL containssometext.  Hit Enter to set focus to the selected matches. ?searchtext
>size Select sessions where response size is greater thansize bytes. >40000 <-- Select responses over 40kb
<size Select sessions where response size is less thansize bytes. <5k <-- Select responses under 5kb
=status
=method
Select sessions whereresponse status =status orrequest method =method. =301 <-- Select 301 redirect responses
=POST <-- Select POST requests
@host Select sessions where the request host contains host. Hit Enter to set focus to the selected matches. @msn.com <-- Select www.msn.com, login.msn.com, etc
bold Mark any future sessions in bold if the url contains the target string bold /bar.aspx

bold        <-- Call with no parameter to clear

bpafter Break any response where the RequestURI contains the specified string bpafter /favicon.ico

bpafter        <-- Call with no parameter to clear

bps Break any response where the status code matches bps 404

bps        <-- Call with no parameter to clear

bpv or bpm 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 POST

bpv        <-- Call with no parameter to clear

bpu 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 /myservice.asmx

bpu        <-- Call with no parameter to clear

cls or clear clear the session list cls
dump dump all sessions to a zip archive in C:\ dump
g or go Resume all breakpointed sessions g
help show this page help
hide Hide Fiddler in System tray hide
urlreplace 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. urlreplace SeekStr ReplaceWithStr

urlreplace        <-- Call with no parameters to clear

start Register as the system proxy start
stop Unregister as the system proxy stop
show Restore Fiddler from system tray -- more useful when triggering rules from ExecAction.exe (see below) show
select MIME Select any session where the response Content-Type header contains the specified string. select image

select css

select htm

selectHeaderOrFlagPartialValue Select any session where the named Header or SessionFlag contains the specified string. select ui-comments slow

select ui-bold *     <-- unless preceded by a slash, * means any value

select ui-comments \*     <-- Find comments with a *

select @Request.Accept html     <-- Find requests with Accept: html

select @Response.Set-Cookie domain <- Find responses that Set-Cookie on a domain
allbut or keeponly Hide all sessions except those where Content-Type header contains the specified string. allbut xml

allbut java

quit Shutdown Fiddler. quit
!dns hostname Perform a DNS lookup of the target host and show the results on the LOG tab !dns www.example.com

!nslookup www.example.com
!listen PORT [CERTHOSTNAME] Set up an additional listener on another port, optionally secured by a HTTPS certificate !listen 8889

!listen 4443 localhost

!listen 444 secure.example.com

 

附: Fiddler 系列教程, (连载中, 敬请期待)

Fiddler (一) 教程

Fiddler (二) Script用法

Fiddler (三) Composer创建和发送HTTP Request

Fiddler (四) 实现手机的抓包

Fiddler (五) Mac下使用Fiddler

Fiddler (六) 最常用的快捷键

posted @ 2014-09-20 11:02  mcho  阅读(19626)  评论(0编辑  收藏  举报