当前位置: 首页>>代码示例>>C#>>正文


C# Response.GetHeadersAsString方法代码示例

本文整理汇总了C#中IronWASP.Response.GetHeadersAsString方法的典型用法代码示例。如果您正苦于以下问题:C# Response.GetHeadersAsString方法的具体用法?C# Response.GetHeadersAsString怎么用?C# Response.GetHeadersAsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IronWASP.Response的用法示例。


在下文中一共展示了Response.GetHeadersAsString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Highlight

        public static string Highlight(Response Res, List<string> ToHighlight)
        {
            string ResHeader = Res.GetHeadersAsString();
            string Body = Res.BodyString;

            ResHeader = InsertHighlights(ResHeader, ToHighlight);
            Body = InsertHighlights(Body, ToHighlight);

            StringBuilder SB = new StringBuilder();
            SB.Append(SnipHeaderSection(ResHeader));
            SB.AppendLine(); SB.AppendLine();
            SB.Append(SnipBodySection(Body));

            return SB.ToString();
        }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:15,代码来源:Highlighter.cs

示例2: LogMTResponse

 internal static void LogMTResponse(Response Response)
 {
     using (SQLiteConnection MT_DB = new SQLiteConnection("data source=" + TestLogFile))
     {
         MT_DB.Open();
         using (SQLiteCommand Cmd = MT_DB.CreateCommand())
         {
             Cmd.CommandText = "UPDATE TestLog SET [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] WHERE [email protected]";
             Cmd.Parameters.AddWithValue("@Code", Response.Code);
             Cmd.Parameters.AddWithValue("@Length", Response.BodyLength);
             Cmd.Parameters.AddWithValue("@MIME", Response.ContentType);
             Cmd.Parameters.AddWithValue("@SetCookie", AsInt((Response.SetCookies.Count > 0)));
             Cmd.Parameters.AddWithValue("@ResponseHeaders", Response.GetHeadersAsString());
             if (Response.IsBinary)
                 Cmd.Parameters.AddWithValue("@ResponseBody", Response.BinaryBodyString);
             else
                 Cmd.Parameters.AddWithValue("@ResponseBody", Response.BodyString);
             //Cmd.Parameters.AddWithValue("@ResponseBody", Response.BodyString);
             Cmd.Parameters.AddWithValue("@BinaryResponse", AsInt(Response.IsBinary));
             Cmd.Parameters.AddWithValue("@RoundTrip", Response.RoundTrip);
             Cmd.Parameters.AddWithValue("@Notes", "Some Notes");
             Cmd.Parameters.AddWithValue("@ID", Response.ID);
             Cmd.ExecuteNonQuery();
         }
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:26,代码来源:IronDB.cs

示例3: IsSame

 public static bool IsSame(Response A, Response B)
 {
     try
     {
         if (!A.GetHeadersAsString().Equals(B.GetHeadersAsString())) return false;
         if (A.BodyLength != B.BodyLength) return false;
         for (int i = 0; i < A.BodyLength; i++)
         {
             if (A.BodyArray[i] != B.BodyArray[i]) return false;
         }
     }
     catch { return false; }
     return true;
 }
开发者ID:kartikeyap,项目名称:IronWASP,代码行数:14,代码来源:Response.cs

示例4: GetResponseTriggerHighlighting

        public static string GetResponseTriggerHighlighting(string Trigg, Response Res)
        {
            StringBuilder SB = new StringBuilder();
            string ResHeader = Res.GetHeadersAsString();
            string ResBody = Res.BodyString;

            List<string> AllTriggerVariations = new List<string>();
            AllTriggerVariations.Add(Trigg);
            if (!AllTriggerVariations.Contains(CookieParameters.Encode(Trigg))) AllTriggerVariations.Add(CookieParameters.Encode(Trigg));
            if (!AllTriggerVariations.Contains(HeaderParameters.Encode(Trigg))) AllTriggerVariations.Add(HeaderParameters.Encode(Trigg));

            try
            {
                List<string> HeaderAdjustments = GetHeaderVariations(Trigg, Res.Headers, ResHeader);
                foreach (string HA in HeaderAdjustments)
                {
                    if (!AllTriggerVariations.Contains(HA))
                    {
                        AllTriggerVariations.Add(HA);
                    }
                }
            }
            catch { }

            List<string> HeaderTriggerVariations = new List<string>();
            foreach (string CurrentVariation in AllTriggerVariations)
            {
                if (!HeaderTriggerVariations.Contains(CurrentVariation) && ResHeader.Contains(CurrentVariation))
                {
                    HeaderTriggerVariations.Add(CurrentVariation);
                }
            }
            ResHeader = Highlighter.InsertHighlights(ResHeader, HeaderTriggerVariations);

            ResBody = GetResponseBodyHighlighting(ResBody, Trigg);
            if (!ResHeader.Contains("<i<hlg>>") && !ResBody.Contains("<i<hlg>>"))
            {
                foreach (string TriggLine in Tools.SplitLines(Trigg))
                {
                    ResBody = GetResponseBodyHighlighting(ResBody, TriggLine);
                }
            }

            SB.Append(Highlighter.SnipHeaderSection(ResHeader).TrimEnd());
            SB.AppendLine(); SB.AppendLine();
            SB.Append(Highlighter.SnipBodySection(ResBody));
            return SB.ToString().Replace("\n", "<i<br>>");
        }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:48,代码来源:Finding.cs

示例5: SetHeader

 void SetHeader(Response Res)
 {
     if (this.BaseTabs.InvokeRequired)
     {
         SetHeader_d InvokeDelegate_d = new SetHeader_d(SetHeader);
         this.BaseTabs.Invoke(InvokeDelegate_d, new object[] { Res });
     }
     else
     {
         this.HeadersTBP.SetText(Res.GetHeadersAsString());
         this.ResetHeadersChangedStatus();
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:13,代码来源:ResponseView.cs

示例6: FillProxyFields

 internal static void FillProxyFields(Response Response)
 {
     UI.ProxyResponseHeadersIDV.Text = Response.GetHeadersAsString();
     UI.ProxyResponseHeadersIDV.ReadOnly = false;
     UI.ProxyResponseBodyIDV.ReadOnly = false;
     if (Response.HasBody)
     {
         if (Response.IsBinary)
         {
             UI.ProxyResponseBodyIDV.Text = Encoding.UTF8.GetString(Response.BodyArray);
             UI.ProxyResponseBodyIDV.ReadOnly = true;
         }
         else
         {
             UI.ProxyResponseBodyIDV.Text = Response.BodyString;
         }
     }
 }
开发者ID:welias,项目名称:IronWASP,代码行数:18,代码来源:IronUI.cs

示例7: FillLogFields

 internal static void FillLogFields(Response Response)
 {
     UI.LogResponseHeadersIDV.Text = Response.GetHeadersAsString();
     if (Response.HasBody)
     {
         if (Response.IsBinary)
         {
             UI.LogResponseBodyIDV.Text = Encoding.UTF8.GetString(Response.BodyArray);
         }
         else
         {
             UI.LogResponseBodyIDV.Text = Response.BodyString;
         }
     }
 }
开发者ID:welias,项目名称:IronWASP,代码行数:15,代码来源:IronUI.cs


注:本文中的IronWASP.Response.GetHeadersAsString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。