fiddler custom IP targets and time display

Click on the menu bar Rules-> CustomRules then press Ctrl + F search static function Main () to see something like this, paste the rules:

 // The Main() function runs everytime your FiddlerScript compiles
static function Main() {
var today: Date = new Date();
FiddlerObject.StatusText = " CustomRules.js was loaded at: " + today;
//显示请求的目标IP地址,复制下面这行贴上
FiddlerObject.UI.lvSessions.AddBoundColumn("ServerIP", 120, "X-HostIP");

Click on the menu bar Rules-> CustomRules then press Ctrl + F to search class Handlers {see the following content, continue pasting rules:

class Handlers
{
/*中间一大段注释内容不再复制*/
//添加响应时间开始
function BeginRequestTime(oS: Session)
{
if (oS.Timers != null)
{
return oS.Timers.ClientBeginRequest.ToString();
}
return String.Empty;
}
public static BindUIColumn("Time Taken")
function CalcTimingCol(oS: Session){
var sResult = String.Empty;
if ((oS.Timers.ServerDoneResponse > oS.Timers.ClientDoneRequest))
{
sResult = (oS.Timers.ServerDoneResponse - oS.Timers.ClientDoneRequest).ToString();
}
return sResult;
}
//添加响应时间结束

Guess you like

Origin www.cnblogs.com/ldsice/p/11106248.html