• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IronWASP.Session类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Session类属于IronWASP命名空间,在下文中一共展示了Session类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddToCheckResponse

 internal static void AddToCheckResponse(Session Sess)
 {
     lock (CheckResponse)
     {
         CheckResponse.Enqueue(Sess);
     }
 }
开发者ID:welias,项目名称:IronWASP,代码行数:7,代码来源:PassiveChecker.cs


示例2: AddToCheckRequest

 internal static void AddToCheckRequest(Session Sess)
 {
     lock (CheckRequest)
     {
         CheckRequest.Enqueue(Sess);
     }
 }
开发者ID:welias,项目名称:IronWASP,代码行数:7,代码来源:PassiveChecker.cs


示例3: ProcessBurpMessage

        static void ProcessBurpMessage(string BurpMessage, string MetaLine)
        {
            string[] BurpMessageParts = BurpMessage.Split(new string[] { "\r\n======================================================\r\n" }, 2, StringSplitOptions.RemoveEmptyEntries);
            Session IrSe = null;
            if (BurpMessageParts.Length > 0)
            {
                Request Req = ReadBurpRequest(BurpMessageParts[0], MetaLine);
                if (Req != null)
                {
                    IrSe = new Session(Req);
                    IrSe.ID = Interlocked.Increment(ref Config.ProxyRequestsCount);
                    IronUpdater.AddProxyRequest(IrSe.Request.GetClone(true));
                    PassiveChecker.AddToCheckRequest(IrSe);
                }
            }
            if (BurpMessageParts.Length == 2)
            {
                if (IrSe != null)
                {
                    try
                    {
                        Response Res = new Response(BurpMessageParts[1]);
                        IrSe.Response = Res;
                        IrSe.Response.ID = IrSe.Request.ID;
                        IronUpdater.AddProxyResponse(IrSe.Response.GetClone(true));
                        PassiveChecker.AddToCheckResponse(IrSe);
                    }
                    catch
                    {

                    }
                }
            }
        }
开发者ID:moon2l,项目名称:IronWASP,代码行数:34,代码来源:Import.cs


示例4: AddToCheckRequest

 internal static void AddToCheckRequest(Session Sess)
 {
     switch (Sess.Request.Source)
     {
         case RequestSource.Proxy:
             if (!RunOnProxyTraffic) return;
             break;
         case RequestSource.Shell:
             if (!RunOnShellTraffic) return;
             break;
         case RequestSource.Test:
             if (!RunOnTestTraffic) return;
             break;
         case RequestSource.Scan:
             if (!RunOnScanTraffic) return;
             break;
         case RequestSource.Probe:
             if (!RunOnProbeTraffic) return;
             break;
         default:
             if (!Sess.Request.CanRunPassivePlugins) return;
             break;
     }
     lock (CheckRequest)
     {
         CheckRequest.Enqueue(Sess);
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:28,代码来源:PassiveChecker.cs


示例5: DoesMatchResponseInterceptionRules

 public bool DoesMatchResponseInterceptionRules(Session Sess)
 {
     if (Sess.Response == null)
     {
         return false;
     }
     else
     {
         return IronProxy.CanInterceptBasedOnFilter(Sess.Request, Sess.Response);
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:11,代码来源:ScriptedInterceptor.cs


示例6: DoesMatchRules

 public bool DoesMatchRules(Session Sess)
 {
     if (Sess.Response == null)
     {
         return this.DoesMatchRequestInterceptionRules(Sess);
     }
     else
     {
         return this.DoesMatchResponseInterceptionRules(Sess);
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:11,代码来源:ScriptedInterceptor.cs


示例7: RunAllRequestBasedInlinePassivePlugins

 public static void RunAllRequestBasedInlinePassivePlugins(Session IrSe)
 {
     foreach (string Name in PassivePlugin.GetInLinePluginsForRequest())
     {
         PassivePlugin P = PassivePlugin.Get(Name);
         if ((P.WorksOn == PluginWorksOn.Request) || (P.WorksOn == PluginWorksOn.Both))
         {
             if (P.CallingState == PluginCallingState.Inline)
             {
                 try
                 {
                     PluginEngine.RunPassivePlugin(P, IrSe);
                 }
                 catch (Exception Exp)
                 {
                     IronException.Report("Error executing 'BeforeRequestInterception' Passive Plugin - " + Name, Exp.Message, Exp.StackTrace);
                 }
             }
         }
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:21,代码来源:PluginEngine.cs


示例8: RunAllPassivePluginsAfterRequestInterception

 public static void RunAllPassivePluginsAfterRequestInterception(Session IrSe)
 {
     foreach (string Name in PassivePlugin.List())
     {
         PassivePlugin P = PassivePlugin.Get(Name);
         if ((P.WorksOn == PluginWorksOn.Request) || (P.WorksOn == PluginWorksOn.Both))
         {
             if ((P.CallingState == PluginCallingState.AfterInterception) || (P.CallingState == PluginCallingState.Both))
             {
                 try
                 {
                     PluginStore.RunPassivePlugin(P, IrSe);
                 }
                 catch(Exception Exp)
                 {
                     IronException.Report("Error executing 'AfterRequestInterception' Passive Plugin - " + Name, Exp.Message, Exp.StackTrace);
                 }
             }
         }
     }
 }
开发者ID:welias,项目名称:IronWASP,代码行数:21,代码来源:PluginStore.cs


示例9: SendSessionToProxy

 internal static void SendSessionToProxy(Session IrSe)
 {
     if (UI.ProxyInterceptTabs.InvokeRequired)
     {
         SendSessionToProxy_d sstp_d = new SendSessionToProxy_d(SendSessionToProxy);
         UI.Invoke(sstp_d, new object[] { IrSe });
     }
     else
     {
         if (IronProxy.ManualTamperingFree)
         {
             FillInterceptorTab(IrSe);
             if (!UI.main_tab.SelectedTab.Name.Equals("mt_proxy")) UI.main_tab.SelectTab("mt_proxy");
             MakeUiTopMost(true);
         }
         else
         {
             string ID = IrSe.ID.ToString();
             if (IrSe.FiddlerSession.state == Fiddler.SessionStates.HandTamperRequest)
             {
                 ID = ID + "-Request";
             }
             else
             {
                 ID = ID + "-Response";
             }
             lock (IronProxy.SessionsQ)
             {
                 IronProxy.SessionsQ.Enqueue(ID);
             }
         }
     }
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:33,代码来源:IronUI.cs


示例10: FillInterceptorTab

        internal static void FillInterceptorTab(Session IrSe)
        {
            IronProxy.ManualTamperingFree = false;
            IronProxy.CurrentSession = IrSe;
            ResetProxyInterceptionFields();

            if (IrSe.FiddlerSession.state == Fiddler.SessionStates.HandTamperRequest)
            {
                UI.ProxyInterceptTabs.SelectedIndex = 0;
                IronProxy.CurrentSession.OriginalRequest = IrSe.Request.GetClone(true);
                FillProxyFields(IrSe.Request);
                MakeProxyRequestFieldsReadOnly(false);
            }
            else
            {
                UI.ProxyInterceptTabs.SelectedIndex = 1;
                IronProxy.CurrentSession.OriginalResponse = IrSe.Response.GetClone(true);
                FillProxyFields(IrSe.Response, IrSe.Request);
                FillProxyFields(IrSe.Request);
                MakeProxyResponseFieldsReadOnly(false);
            }
            IronProxy.ResetChangedStatus();
            UI.ProxyBaseSplit.Panel1.BackColor = Color.SkyBlue;
            UI.ProxySendBtn.Enabled = true;
            UI.ProxyDropBtn.Enabled = true;
        }
开发者ID:herotheo,项目名称:IronWASP,代码行数:26,代码来源:IronUI.cs


示例11: RunPassivePlugin

 public static PluginResults RunPassivePlugin(PassivePlugin P, Session Irse)
 {
     PluginResults Results = new PluginResults();
     P.Check(Irse, Results);
     foreach (PluginResult PR in Results.GetAll())
     {
         PR.Plugin = P.Name;
         IronUpdater.AddPluginResult(PR);
     }
     return Results;
 }
开发者ID:welias,项目名称:IronWASP,代码行数:11,代码来源:PluginStore.cs


示例12: FillLogDisplayFields

 internal static void FillLogDisplayFields(Session IrSe)
 {
     if (UI.LogDisplayTabs.InvokeRequired)
     {
         FillLogDisplayFields_d FLDF_d = new FillLogDisplayFields_d(FillLogDisplayFields);
         UI.Invoke(FLDF_d, new object[] { IrSe });
     }
     else
     {
         if (IrSe == null) return;
         if (IrSe.Request != null) FillLogFields(IrSe.Request);
         if (IrSe.Response != null) FillLogFields(IrSe.Response, IrSe.Request);
         //FillLogReflection(Reflection);
         try
         {
             UI.LogSourceLbl.Text = "Source: " + IronLog.CurrentSourceName;
             UI.LogIDLbl.Text = "ID: " + IronLog.CurrentID.ToString();
         }
         catch { }
         UI.ProxyShowOriginalRequestCB.Checked = false;
         UI.ProxyShowOriginalResponseCB.Checked = false;
         UI.ProxyShowOriginalRequestCB.Visible = IrSe.OriginalRequest != null;
         UI.ProxyShowOriginalResponseCB.Visible = IrSe.OriginalResponse != null;
         IronUI.ResetLogStatus();
     }
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:26,代码来源:IronUI.cs


示例13: GetClone

 public Session GetClone()
 {
     Session ClonedIrSe = null;
     if (this.Response != null)
     {
         ClonedIrSe = new Session(this.Request.GetClone(), this.Response.GetClone());
     }
     else
     {
         ClonedIrSe = new Session(this.Request.GetClone());
     }
     return ClonedIrSe;
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:13,代码来源:Session.cs


示例14: BeforeRequest

        internal static void BeforeRequest(Fiddler.Session Sess)
        {
            if (Sess.HTTPMethodIs("Connect"))
            {
                if (IronProxy.UseUpstreamProxy)
                {
                    string UpstreamProxyString = string.Format("{0}:{1}", IronProxy.UpstreamProxyIP, IronProxy.UpstreamProxyPort.ToString());
                    Sess.oFlags.Add("x-overrideGateway", UpstreamProxyString);
                }
                if (Config.HasFiddlerFlags)
                {
                    string[,] Flags = Config.GetFiddlerFlags();
                    for (int i = 0; i < Flags.GetLength(0); i++)
                    {
                        Sess.oFlags.Add(Flags[i, 0], Flags[i, 1]);
                    }
                }
                return;
            }
            if(Sess.oFlags.ContainsKey("IronFlag-BuiltBy"))
            {
                if (Sess.oFlags["IronFlag-BuiltBy"].Equals("Stealth"))
                {
                    if (IronProxy.UseUpstreamProxy)
                    {
                        string UpstreamProxyString = string.Format("{0}:{1}", IronProxy.UpstreamProxyIP, IronProxy.UpstreamProxyPort.ToString());
                        Sess.oFlags.Add("x-overrideGateway", UpstreamProxyString);
                    }
                    if (Config.HasFiddlerFlags)
                    {
                        string[,] Flags = Config.GetFiddlerFlags();
                        for (int i = 0; i < Flags.GetLength(0); i++)
                        {
                            Sess.oFlags.Add(Flags[i, 0], Flags[i, 1]);
                        }
                    }
                    return;
                }
            }
            Session IrSe;
            try
            {
                IrSe = new Session(Sess);
            }
            catch(Exception Exp)
            {
                IronException.Report("Error reading Request", Exp.Message, Exp.StackTrace);
                return;
            }
            if (IrSe == null)
            {
                IronException.Report("Error reading Request", "", "");
                return;
            }
            if (IrSe.Request == null)
            {
                IronException.Report("Error reading Request", "", "");
                return;
            }
            if (IrSe.FiddlerSession == null)
            {
                IronException.Report("Error reading Request", "", "");
                return;
            }

            //Needs to be turned on to read the response body
            IrSe.FiddlerSession.bBufferResponse = true;

            IrSe.Request.TimeObject = DateTime.Now;
            if (Sess.oFlags.ContainsKey("IronFlag-Ticks"))
            {
                IrSe.FiddlerSession.oFlags["IronFlag-Ticks"] = IrSe.Request.TimeObject.Ticks.ToString();
            }
            else
            {
                IrSe.FiddlerSession.oFlags.Add("IronFlag-Ticks", IrSe.Request.TimeObject.Ticks.ToString());
            }

            //try
            //{
            //    Session ClonedIronSessionWithRequest = IrSe.GetClone();
            //    if (ClonedIronSessionWithRequest != null && ClonedIronSessionWithRequest.Request != null)
            //        PassiveChecker.AddToCheckRequest(ClonedIronSessionWithRequest);
            //    else
            //        IronException.Report("IronSession Request Couldn't be cloned at ID - " + IrSe.ID.ToString(),"","");
            //}
            //catch(Exception Exp)
            //{
            //    IronException.Report("Error Cloning IronSession in BeforeRequest", Exp.Message, Exp.StackTrace);
            //}

            if (PluginEngine.ShouldRunRequestBasedPassivePlugins())
            {
                try
                {
                    PluginEngine.RunAllRequestBasedInlinePassivePlugins(IrSe);
                    IrSe.UpdateFiddlerSessionFromIronSession();
                }
                catch (Exception Exp)
                {
//.........这里部分代码省略.........
开发者ID:herotheo,项目名称:IronWASP,代码行数:101,代码来源:IronProxy.cs


示例15: CanInterceptResponse

 static bool CanInterceptResponse(Session Sess)
 {
     if (ScriptedInterceptionEnabled)
     {
         try
         {
             return ScInt.ShouldIntercept(Sess);
         }
         catch (Exception Exp)
         {
             IronUI.ShowProxyException("Error in Scripted Interception Script");
             IronException.Report("Error in Scripted Interception Script", Exp);
             return false;
         }
     }
     else if (InterceptResponse)
     {
         return CanInterceptBasedOnFilter(Sess.Request, Sess.Response);
     }
     else
     {
         return false;
     }
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:24,代码来源:IronProxy.cs


示例16: WasRequestChanged

 internal static bool WasRequestChanged(Session Sess)
 {
     try
     {
         return !Sess.Request.ToString().Equals(Sess.OriginalRequest.ToString());
     }
     catch { return true; }
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:8,代码来源:IronProxy.cs


示例17: DropInterceptedMessage

 internal static void DropInterceptedMessage()
 {
     if (IronProxy.ManualTamperingFree == true)
     {
         return;
     }
     string ID = IronProxy.CurrentSession.ID.ToString();
     if (IronProxy.CurrentSession.FiddlerSession.state == Fiddler.SessionStates.HandTamperRequest)
     {
         ID = ID + "-Request";
         IronProxy.InterceptedSessions[ID].MSR.Set();
         IronProxy.CurrentSession.FiddlerSession.oRequest.FailSession(200, "OK", "Request Dropped By the User");
     }
     else
     {
         ID = ID + "-Response";
         IronProxy.CurrentSession.FiddlerSession.utilSetResponseBody("Response Dropped By the User");
         IronProxy.CurrentSession.FiddlerSession.responseCode = 200;
         IronProxy.InterceptedSessions[ID].MSR.Set();
     }
     IronUI.ResetProxyInterceptionFields();
     IronProxy.ManualTamperingFree = true;
     IronProxy.CurrentSession = null;
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:24,代码来源:IronProxy.cs


示例18: FillMTFields

 internal static void FillMTFields(Session IrSe)
 {
     IronUI.FillMTFields(IrSe.Request);
     ManualTesting.SetCurrentID(IrSe.Request.ID);
     if (IrSe.Response != null) IronUI.FillMTFields(IrSe.Response, IrSe.Request);
     UI.TestIDLbl.Text = "ID: " + IrSe.Request.ID.ToString();
     string Group = IrSe.Flags["Group"].ToString();
     UI.MTCurrentGroupNameTB.Text = Group;
     foreach (DataGridViewRow Row in UI.TestGroupLogGrid.Rows)
     {
         if (Row.Cells[1].Value.ToString().Equals(IrSe.Request.ID.ToString()))
         {
             Row.Selected = true;
             try
             {
                 UI.TestGroupLogGrid.FirstDisplayedScrollingRowIndex = Row.Index;
             }
             catch { }
             break;
         }
     }
     //switch (GroupColor)
     //{
     //    case("Red"):
     //        UI.TestIDLbl.BackColor = Color.Red;
     //        break;
     //    case ("Blue"):
     //        UI.TestIDLbl.BackColor = Color.RoyalBlue;
     //        break;
     //    case ("Green"):
     //        UI.TestIDLbl.BackColor = Color.Green;
     //        break;
     //    case ("Gray"):
     //        UI.TestIDLbl.BackColor = Color.Gray;
     //        break;
     //    case ("Brown"):
     //        UI.TestIDLbl.BackColor = Color.Brown;
     //        break;
     //}
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:40,代码来源:IronUI.cs


示例19: ForwardInterceptedMessage

 //internal static void UpdateFiddlerSessionWithNewResponse()
 //{
 //    IronProxy.CurrentSession.FiddlerSession.oResponse.headers.AssignFromString(IronProxy.CurrentSession.Response.GetHeadersAsString());
 //    IronProxy.CurrentSession.FiddlerSession.responseBodyBytes = IronProxy.CurrentSession.Response.BodyArray;
 //}
 internal static void ForwardInterceptedMessage()
 {
     if (IronProxy.ManualTamperingFree == true)
     {
         return;
     }
     string ID = IronProxy.CurrentSession.ID.ToString();
     if (IronProxy.CurrentSession.FiddlerSession.state == Fiddler.SessionStates.HandTamperRequest)
     {
         ID = ID + "-Request";
     }
     else
     {
         ID = ID + "-Response";
     }
     IronProxy.InterceptedSessions[ID].MSR.Set();
     IronUI.ResetProxyInterceptionFields();
     IronProxy.ManualTamperingFree = true;
     IronProxy.CurrentSession = null;
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:25,代码来源:IronProxy.cs


示例20: UpdateTestGroupLogGridWithRequest

 internal static void UpdateTestGroupLogGridWithRequest(Session IrSe)
 {
     if (UI.TestGroupLogGrid.InvokeRequired)
     {
         UpdateTestGroupLogGridWithRequest_d UTGLGWR_d = new UpdateTestGroupLogGridWithRequest_d(UpdateTestGroupLogGridWithRequest);
         UI.Invoke(UTGLGWR_d, new object[] { IrSe });
     }
     else
     {
         if (!ManualTesting.CurrentGroup.Equals(IrSe.Flags["Group"].ToString())) return;
         try
         {
             UI.TestGroupLogGrid.Rows.Add(new object[] {false, IrSe.Request.ID, IrSe.Request.Host, IrSe.Request.Method, IrSe.Request.URL, IrSe.Request.SSL });
         }
         catch (Exception Exp)
         {
             IronException.Report("Error Updating Test Grid with Request", Exp.Message, Exp.StackTrace);
         }
     }
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:20,代码来源:IronUI.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ast.AstContext类代码示例发布时间:2022-05-26
下一篇:
C# IronWASP.Response类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap