发布日期:2015-12-14 14:42:59

本文介绍Fiddler执行命令。

使用ALT+Q可以快速进入Exceution Command

 

Command

解释

Example

screenshot/message

#1

bold

对会话加粗。

bold

Bolding cleared.

bold www.soosmart.com

bolding requests for www.soosmart.com

#2

bp

提示breakpoint相关命令。

bp

bpu = breakpoint request for uri
bpm = breakpoint request method
bps = breakpoint response status
bpafter = breakpoint response for URI

#3

bps

根据Response Status设定断点,或清除断点

bps

Response Status breakpoint cleared

bps 301

Response Status breakpoint for 301

#4

bpv或bpm

根据method设置断点

bpv或bpm

Request Method breakpoint cleared

bpv get

Request Method breakpoint for GET

#5

bpu

根据url设置断点

bpu

RequestURI breakpoint cleared

bpu www.soosmart.com

RequestURI breakpoint for www.soosmart.com

#6

bpa或bpafter

根据响应的url设置断点

bpa/bpafter

ResponseURI breakpoint cleared

bpa/bpafter www.soosmart.com

ResponseURI breakpoint for www.soosmart.com

#7

overridehost

重载主机的请求到另一个主机中。

overridehost

Host Override cleared

overridehost www.sooscc.com www.soosmart.com

Connecting to [www.soosmart.com] for requests to [www.sooscc.com]

#8

urlreplace

对url中的词替换

urlreplace

URL Replacement cleared

urlreplace stock topic

Replacing [stock] in URIs with [topic]

#9

allbut或keeponly

移除其他会话除了content type不为指定的类型

allbut或keeponly

Please specify Content-Type to retain during wipe.

allbut text/html

Removed all but Content-Type:text/html

#10

stop

停止

stop

 

#11

start

开始

start

 

#12

clear/cls

清除已捕获的session

cls

已捕获的session被清空

#13

g/go

激活所有被挂起的session

g

 

#14

goto

google搜索关键词

goto soosmart.com

在Google中搜索soosmart.com浏览器打开 http://www.google.com/search?hl=en&btnI=I%27m+Feeling+Lucky&q=soosmart.com

#15

help

打开执行命令帮助页面

help

浏览器打开http://fiddler2.com/r/?quickexec

#16

hide

最小化fiddler

hide

 

#17

show

显示fiddler

show

 

#18

log

打印日志

log www.soosmart.com

日志中写入www.soosmart.com

#19

nuke

清除cache,清除cookies

nuke

 

#20

screenshot

 

 

 

#21

tail

trim session list to # of sessions

tail 4

 

#22

quit

退出fiddler

quit

退出fiddler

#23

dump

dump all sessions to configuired dump path with name dump.saz

dump

 

#24

www.soosmart.com

发起对该网址分析(已www开始或以http开始)

www.soosmart.com

 

 

 

 

 

 

#25

?sometext

选中被查找的sometext会话并高亮显示。后续可以通过Del或Shift+Del进行删除。

 

 

#26

>size

选中响应大小大于Size的会话

>4000

 

#27

<size

选中响应大小小于Size的会话

<4000

 

#28

=status

选中响应状态码为status的会话

=301

选择301重定向响应。

#29

=method

根据method选择会话

=POST

 

#30

=host

根据host选择会话

=www.soosmart.com

 

#31

select MIME

根据content-type中包含特定的字符串选择会话

select css

选择css

#32

select headerOrFlg partialvaule

根据指定的header中包含的特定字符串选择会话

select ui-comments slow

 

#33

!dns hostname

执行dns loopup并在Log Tab显示结果

 

 

#34

!listen port [hostname]

建立一个监听

!listen 8888 www.soosmart.com

 

 

在customRule.js中你可以看到下面的关于Execution command的实际操作。

    // The OnExecAction function is called by either the QuickExec box in the Fiddler window,
    // or by the ExecAction.exe command line utility.
    static function OnExecAction(sParams: String[]): Boolean {

    FiddlerObject.StatusText = "ExecAction: " + sParams[0];

    var sAction = sParams[0].toLowerCase();
    switch (sAction) {
    case "bold":
        if (sParams.Length<2) {uiBoldURI=null; FiddlerObject.StatusText="Bolding cleared"; return;}
        uiBoldURI = sParams[1]; FiddlerObject.StatusText="Bolding requests for " + uiBoldURI;
        return true;
    case "bp":
        FiddlerObject.alert("bpu = breakpoint request for uri\nbpm = breakpoint request method\nbps=breakpoint response status\nbpafter = breakpoint response for URI");
        return true;
    case "bps":
        if (sParams.Length<2) {bpStatus=-1; FiddlerObject.StatusText="Response Status breakpoint cleared"; return;}
        bpStatus = parseInt(sParams[1]); FiddlerObject.StatusText="Response status breakpoint for " + sParams[1];
        return true;
    case "bpv":
    case "bpm":
        if (sParams.Length<2) {bpMethod=null; FiddlerObject.StatusText="Request Method breakpoint cleared"; return;}
        bpMethod = sParams[1].toUpperCase(); FiddlerObject.StatusText="Request Method breakpoint for " + bpMethod;
        return true;
    case "bpu":
        if (sParams.Length<2) {bpRequestURI=null; FiddlerObject.StatusText="RequestURI breakpoint cleared"; return;}
        bpRequestURI = sParams[1]; 
        FiddlerObject.StatusText="RequestURI breakpoint for "+sParams[1];
        return true;
    case "bpa":
    case "bpafter":
        if (sParams.Length<2) {bpResponseURI=null; FiddlerObject.StatusText="ResponseURI breakpoint cleared"; return;}
        bpResponseURI = sParams[1]; 
        FiddlerObject.StatusText="ResponseURI breakpoint for "+sParams[1];
        return true;
    case "overridehost":
        if (sParams.Length<3) {gs_OverridenHost=null; FiddlerObject.StatusText="Host Override cleared"; return;}
        gs_OverridenHost = sParams[1].toLowerCase();
        gs_OverrideHostWith = sParams[2];
        FiddlerObject.StatusText="Connecting to [" + gs_OverrideHostWith + "] for requests to [" + gs_OverridenHost + "]";
        return true;
    case "urlreplace":
        if (sParams.Length<3) {gs_ReplaceToken=null; FiddlerObject.StatusText="URL Replacement cleared"; return;}
        gs_ReplaceToken = sParams[1];
        gs_ReplaceTokenWith = sParams[2].Replace(" ", "%20");  // Simple helper
        FiddlerObject.StatusText="Replacing [" + gs_ReplaceToken + "] in URIs with [" + gs_ReplaceTokenWith + "]";
        return true;
    case "allbut":
    case "keeponly":
        if (sParams.Length<2) { FiddlerObject.StatusText="Please specify Content-Type to retain during wipe."; return;}
        FiddlerObject.UI.actSelectSessionsWithResponseHeaderValue("Content-Type", sParams[1]);
        FiddlerObject.UI.actRemoveUnselectedSessions();
        FiddlerObject.UI.lvSessions.SelectedItems.Clear();
        FiddlerObject.StatusText="Removed all but Content-Type: " + sParams[1];
        return true;
    case "stop":
        FiddlerObject.UI.actDetachProxy();
        return true;
    case "start":
        FiddlerObject.UI.actAttachProxy();
        return true;
    case "cls":
    case "clear":
        FiddlerObject.UI.actRemoveAllSessions();
        return true;
    case "g":
    case "go":
        FiddlerObject.UI.actResumeAllSessions();
        return true;
    case "goto":
        if (sParams.Length != 2) return;
        Utilities.LaunchHyperlink("http://www.google.com/search?hl=en&btnI=I%27m+Feeling+Lucky&q=" + Utilities.UrlEncode(sParams[1]));
        return true;
    case "help":
        Utilities.LaunchHyperlink("http://fiddler2.com/r/?quickexec");
        return true;
    case "hide":
        FiddlerObject.UI.actMinimizeToTray();
        return true;
    case "log":
        FiddlerApplication.Log.LogString((sParams.Length<2) ? FiddlerApplication.Log.LogString("User couldn't think of anything to say...") : sParams[1]);
        return true;
    case "nuke":
        FiddlerObject.UI.actClearWinINETCache();
        FiddlerObject.UI.actClearWinINETCookies(); 
        return true;
    case "screenshot":
        FiddlerApplication.UI.actCaptureScreenshot(false);
        return true;
    case "show":
        FiddlerObject.UI.actRestoreWindow();
        return true;
    case "tail":
        if (sParams.Length<2) { FiddlerObject.StatusText="Please specify # of sessions to trim the session list to."; return;}
        FiddlerObject.UI.TrimSessionList(int.Parse(sParams[1]));
        return true;
    case "quit":
        FiddlerObject.UI.actExit();
        return true;
    case "dump":
        FiddlerObject.UI.actSelectAll();
        FiddlerObject.UI.actSaveSessionsToZip(CONFIG.GetPath("Captures") + "dump.saz");
        FiddlerObject.UI.actRemoveAllSessions();
        FiddlerObject.StatusText = "Dumped all sessions to " + CONFIG.GetPath("Captures") + "dump.saz";
        return true;

    default:
        if (sAction.StartsWith("http") || sAction.StartsWith("www")){
            System.Diagnostics.Process.Start(sParams[0]);
            return true;
        }
        else
        {
            FiddlerObject.StatusText = "Requested ExecAction: '" + sAction + "' not found. Type HELP to learn more.";
            return false;
        }
    }
    }

 

发表评论