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请求不受影响.
| 归档时间: |
|
| 查看次数: |
10122 次 |
| 最近记录: |