zoukankan      html  css  js  c++  java
  • fiddler自定义显示目标IP和时间

    点击菜单栏Rules->CustomRules然后按Ctrl+F搜索 static function Main() 即可看到如下内容,粘贴规则:

     // 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");
    

    点击菜单栏Rules->CustomRules然后按Ctrl+F搜索 class Handlers{ 即可看到如下的内容,继续粘贴规则:

    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;
    }
    //添加响应时间结束
  • 相关阅读:
    2020-10-24;我对机器学习实现的理解
    2020软件工程作业03
    友链
    导航页
    POJ3694 Network (板子题)
    洛谷 P1084 [NOIP2012 提高组] 疫情控制
    AcWing 355. 异象石
    洛谷P4556 雨天的尾巴
    POJ1639 Picnic Planning (K度限制最小生成树)
    POJ2728 Desert King
  • 原文地址:https://www.cnblogs.com/ldsice/p/11106248.html
Copyright © 2011-2022 走看看