使用Fiddler进行过程过滤

Jor*_*dan 15 filtering process fiddler

有没有办法过滤出Fiddler中的某些过程?它目前非常嘈杂,我不希望它只显示一个过程.

Ben*_*son 22

Show only traffic from如果您的进程永不退出且始终具有相同的PID,则内置选项很有用.就我而言,我的HTTP客户端经常启动和退出,所以我添加了这个自定义的FiddlerScript.

转到Rules > Customize Rules...开始编辑CustomRules.js.

在Handlers类中添加它

class Handlers
{
    RulesString("&Process filter", true)
    RulesStringValue(0, "&Chrome", "chrome")
    RulesStringValue(1, "&Firefox", "firefox")
    RulesStringValue(2, "&Internet Explorer", "iexplore")
    RulesStringValue(3, "&Opera", "opera")
    RulesStringValue(4, "&PhantomJS", "phantomjs")
    RulesStringValue(5, "&Custom...", "%CUSTOM%")
    public static var sProcessName: String = null;

    // leave the rest of the Handlers class as-is
}
Run Code Online (Sandbox Code Playgroud)

在OnBeforeRequest函数中添加它

static function OnBeforeRequest(oSession: Session) {
    if (null != sProcessName) {
        var processInfo = oSession["X-PROCESSINFO"];
        if(!processInfo || !processInfo.StartsWith(sProcessName + ":")){
            oSession["ui-hide"] = "true";
            FiddlerObject.StatusText = " Process filter: " + sProcessName;
        }
    }

    // leave the rest of the OnBeforeRequest function as-is
}
Run Code Online (Sandbox Code Playgroud)

Fiddler会在您保存CustomRules.js文件后立即应用您的更改.

要使用,请转到Rules > Process Filter并选择浏览器,或使用Custom并输入可执行文件的基本名称(例如iexplore).

过滤适用于在您选择流程后启动的请求.以前的请求和Fiddler Composer请求不受影响.


Cha*_*had 5

基本上是Filter Fiddler 流量的重复。只需转到 Fiddler 中的“过滤器”选项卡,然后转到“客户端进程”字段集,然后选择“仅显示来自的流量”并选择适当的进程。