fiddler常用命令

这些命令在fiddler官网都有,只是官网打开慢,所以就拷下来单独整理翻译了下.

我个人用的最多的就是fiddler的打断点,可以修改request或者response,非常好用,再一个因为我是后端开发,在调试的时候也会把前端请求通过urlreplace命令指向本地运行的代码,其他的命令基本没怎么用


在响应之后打断点

bpafter

Break any response where the RequestURI contains the specified string

如果请求的url包含指定字符串,则在响应之后打断点,可用来修改响应,不指定参数则表示清除之前的断点,后续相同

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.

在指定的url的请求之前打断点,可以修改请求体或者请求头

bpu /myservice.asmx
bpu        <-- Call with no parameter to clear

管理会话列表

?sometext

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

指定一个文本,如果某一个url包含这个文本,那么该请求在会话列表中会进行高亮表示

?searchtext

size

Select sessions where response size is greater than size bytes.

如果一个请求的响应size大于或者小于这个值会被筛选出来

>40000 <-- Select responses over 40kb

Also:

<size

Select sessions where response size is less than size bytes.

<5k <-- Select responses under 5kb

=status

=method

Select sessions where response status = status or request 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.

根据host筛选请求

@msn.com <-- Select www.msn.com, login.msn.com, etc

bold

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

如果后续请求的url包含指定的字符串则在会话列表中以加粗黑体显示,不指定任何参数则表示清除之前的该命令

bold /bar.aspx
bold        <-- Call with no parameter to clear

select *MIME*

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

根据mime筛选会话列表

select image
select css
select htm

select *HeaderOrFlag PartialValue*

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.

根据content-type反向筛选请求列表

allbut xml
allbut java

cls or clear

clear the session list

清除会话列表

cls

dump

dump all sessions to a zip archive in C:
将所有请求序列化保存至C:/

dump

其他

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.

将指定url替换为目标url,可用于将前端的请求指向本地服务

urlreplace SeekStr ReplaceWithStr
urlreplace        <-- Call with no parameters to clear

g or go

Resume all breakpointed sessions

g

help

Show this page

help

hide Hide Fiddler in System tray

hide

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

quit

Shutdown Fiddler.

quit

!dns hostname

Perform a DNS lookup of the target host and show the results on the LOG tab

根据网址解析出ip

!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

posted on 2020-12-01 12:41  precedeforetime  阅读(291)  评论(0编辑  收藏  举报

导航