本文整理汇总了C#中IronWASP.Request类的典型用法代码示例。如果您正苦于以下问题:C# Request类的具体用法?C# Request怎么用?C# Request使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Request类属于IronWASP命名空间,在下文中一共展示了Request类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Trigger
public Trigger(string RequestTrigger, Request Req, string ResponseTrigger, Response Res)
{
this.RequestTrigger = RequestTrigger;
this.Request = Req.GetClone();
this.ResponseTrigger = ResponseTrigger;
this.Response = Res.GetClone();
}
开发者ID:welias,项目名称:IronWASP,代码行数:7,代码来源:Trigger.cs
示例2: BodyFormatParamters
internal BodyFormatParamters(Request Request, FormatPlugin Plugin, List<bool>CheckStatus, bool CheckAll)
{
this.Request = Request;
this.Plugin = Plugin;
this.CheckStatus = CheckStatus;
this.CheckAll = CheckAll;
}
开发者ID:welias,项目名称:IronWASP,代码行数:7,代码来源:BodyFormatParamters.cs
示例3: Is
public override bool Is(Request Req)
{
try
{
return Tools.IsSoap(Req.BodyString.Trim());
}
catch { return false; }
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:SoapFormatPlugin.cs
示例4: Is
public override bool Is(Request Req)
{
try
{
return Tools.IsJson(Req.BodyString);
}
catch { return false; }
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:JsonFormatPlugin.cs
示例5: Add
public void Add(string RequestTrigger, string RequestTriggerDescription, Request Req, string ResponseTrigger, string ResponseTriggerDescription, Response Res)
{
if (Req != null || Res != null)
{
Trigger T = new Trigger(RequestTrigger, RequestTriggerDescription, Req, ResponseTrigger, ResponseTriggerDescription, Res);
this.TriggerList.Add(T);
}
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:Triggers.cs
示例6: AddProbeString
public static void AddProbeString(string ProbeString, Request InjectedRequest)
{
Request ClonedReq = InjectedRequest.GetClone();
lock (ProbeStrings)
{
ProbeStrings.Add(ProbeString, ClonedReq);
}
}
开发者ID:moon2l,项目名称:IronWASP,代码行数:8,代码来源:Analyzer.cs
示例7: Add
public void Add(Request Req, Response Res)
{
List<string> CookieStrings = new List<string>();
foreach (SetCookie SC in Res.SetCookies)
{
CookieStrings.Add(SC.FullString);
}
Add(Req.Host, CookieStrings);
}
开发者ID:welias,项目名称:IronWASP,代码行数:9,代码来源:CookieStore.cs
示例8: Get
public static List<FormatPlugin> Get(Request Request)
{
List<FormatPlugin> RightPlugins = new List<FormatPlugin>();
foreach (string Name in List())
{
if (Get(Name).Is(Request)) RightPlugins.Add(Get(Name));
}
return RightPlugins;
}
开发者ID:welias,项目名称:IronWASP,代码行数:9,代码来源:FormatPlugin.cs
示例9: Session
public Session(Fiddler.Session _FiddlerSession)
{
this.FiddlerSession = _FiddlerSession;
this.Request = new Request(this.FiddlerSession);
if (this.FiddlerSession.bHasResponse)
{
this.Response = new Response(this.FiddlerSession);
}
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:9,代码来源:Session.cs
示例10: Trigger
public Trigger(string RequestTrigger, string RequestTriggerDescription, Request Req, string ResponseTrigger, string ResponseTriggerDescription, Response Res)
{
this.RequestTrigger = RequestTrigger;
this.RequestTriggerDescription = RequestTriggerDescription;
this.Request = Req.GetClone();
this.ResponseTrigger = ResponseTrigger;
this.RawResponseTriggerDescription = ResponseTriggerDescription;
this.Response = Res.GetClone();
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:9,代码来源:Trigger.cs
示例11: Get
public static List<FormatPlugin> Get(Request Request, List<string> FormatsToCheckFor)
{
List<FormatPlugin> RightPlugins = new List<FormatPlugin>();
foreach (string Name in List())
{
if (!FormatsToCheckFor.Contains(Name)) continue;
if (Get(Name).Is(Request)) RightPlugins.Add(Get(Name));
}
return RightPlugins;
}
开发者ID:kartikeyap,项目名称:IronWASP,代码行数:10,代码来源:FormatPlugin.cs
示例12: AddToTriggers
void AddToTriggers(string RequestTrigger, string RequestTriggerDesc, Request TriggerRequest, string ResponseTrigger, string ResponseTriggerDesc, Response TriggerResponse)
{
this.RequestTriggers.Add(RequestTrigger);
this.ResponseTriggers.Add(ResponseTrigger);
this.RequestTriggerDescs.Add(RequestTriggerDesc);
this.ResponseTriggerDescs.Add(ResponseTriggerDesc);
this.TriggerRequests.Add(TriggerRequest);
this.TriggerResponses.Add(TriggerResponse);
this.TriggerCount = this.TriggerCount + 1;
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:10,代码来源:CommandInjectionCheck.cs
示例13: Highlight
public static string Highlight(Request Req, List<string> ToHighlight)
{
string ReqHeader = Req.GetHeadersAsString();
string Body = Req.BodyString;
ReqHeader = InsertHighlights(ReqHeader, ToHighlight);
Body = InsertHighlights(Body, ToHighlight);
StringBuilder SB = new StringBuilder();
SB.Append(SnipHeaderSection(ReqHeader));
SB.AppendLine(); SB.AppendLine();
SB.Append(SnipBodySection(Body));
return SB.ToString();
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:15,代码来源:Highlighter.cs
示例14: Is
public override bool Is(Request Req)
{
try
{
if (Req.Headers.Has("Content-Type"))
{
if (Req.Headers.Get("Content-Type").Trim().StartsWith("multipart", StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
return false;
}
catch { return false; }
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:15,代码来源:MultipartFormatPlugin.cs
示例15: GetMismatchedQueryParameterNames
List<string> GetMismatchedQueryParameterNames(Request ReqOne, Request ReqTwo)
{
List<string> ParamNames = new List<string>();
foreach (string Name in ReqOne.Query.GetNames())
{
if (!AreListValuesSame(ReqOne.Query.GetAll(Name), ReqTwo.Query.GetAll(Name)))
{
ParamNames.Add(Name);
}
}
return ParamNames;
}
开发者ID:moon2l,项目名称:IronWASP,代码行数:12,代码来源:ScanItemUniquenessChecker.cs
示例16: GetRequest
static Request GetRequest(string RequestHeaders, string RequestBody, bool IsRequestBinary)
{
Request Req;
if (IsRequestBinary)
{
if (RequestBody.Length > 0)
{
byte[] BodyArray;
try
{
BodyArray = Convert.FromBase64String(RequestBody);
}
catch (Exception Exp)
{
throw new Exception("Error retriving body array from base64 string", Exp);
}
Req = new Request(RequestHeaders, BodyArray);
}
else
{
Req = new Request(RequestHeaders, false, true);
}
}
else
{
Req = new Request(RequestHeaders + RequestBody, false, true);
}
return Req;
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:29,代码来源:Session.cs
示例17: ReadBurpRequest
static Request ReadBurpRequest(string RequestString, string MetaLine)
{
string[] MetaParts = MetaLine.Split(new string[] { "://" }, StringSplitOptions.RemoveEmptyEntries);
if (MetaParts.Length != 2) return null;
bool SSL = false;
if (MetaParts[0].EndsWith("https")) SSL = true;
try
{
Request Req = new Request(RequestString, SSL);
return Req;
}
catch
{
return null;
}
}
开发者ID:moon2l,项目名称:IronWASP,代码行数:16,代码来源:Import.cs
示例18: CanInterceptBasedOnFilter
internal static bool CanInterceptBasedOnFilter(Request Req, Response Res)
{
if (RequestRulesOnResponse)
{
if (!CanInterceptBasedOnFilter(Req)) return false;
}
//Check Hostnames
if (InterceptCheckHostNames)
{
if (InterceptCheckHostNamesPlus && InterceptHostNames.Count > 0)
{
bool Match = false;
foreach (string HostName in InterceptHostNames)
{
if (Res.Host.Equals(HostName, StringComparison.InvariantCultureIgnoreCase))
{
Match = true;
break;
}
}
if (!Match)
{
return false;
}
}
if (InterceptCheckHostNamesMinus && DontInterceptHostNames.Count > 0)
{
foreach (string HostName in DontInterceptHostNames)
{
if (Res.Host.Equals(HostName, StringComparison.InvariantCultureIgnoreCase))
{
return false;
}
}
}
}
//Check Methods Rule
int Code = Res.Code;
switch (Code)
{
case 200:
if (!Intercept200)
return false;
break;
case 301:
case 302:
if (!Intercept301_2)
return false;
break;
case 403:
if (!Intercept403)
return false;
break;
case 500:
if (!Intercept500)
return false;
break;
default:
if (Code > 199 && Code < 300)
{
if (!Intercept2xx)
return false;
}
else if (Code > 299 && Code < 400)
{
if (!Intercept3xx)
return false;
}
else if (Code > 399 && Code < 500)
{
if (!Intercept500)
return false;
}
else if (Code > 499 && Code < 600)
{
if (!Intercept5xx)
return false;
}
break;
}
if (Res.BodyLength > 0)
{
if (Res.ContentType.ToLower().Contains("html"))
{
if (!InterceptHTML) return false;
}
else if (Res.ContentType.ToLower().Contains("css"))
{
if (!InterceptCSS) return false;
}
else if (Res.ContentType.ToLower().Contains("javascript"))
{
if (!InterceptJS) return false;
}
else if (Res.ContentType.ToLower().Contains("xml"))
{
if (!InterceptXML) return false;
//.........这里部分代码省略.........
开发者ID:herotheo,项目名称:IronWASP,代码行数:101,代码来源:IronProxy.cs
示例19: UpdateCurrentSessionWithNewRequest
//internal static void UpdateCurrentSessionWithNewRequestHeader(string HeaderString)
//{
// string NewRequestHeaders = HeaderString.TrimEnd(new char[]{'\r','\n'});
// NewRequestHeaders += "\r\n\r\n";
// IronProxy.CurrentSession.Request = new Request(NewRequestHeaders, IronProxy.CurrentSession.Request.SSL, false);
// IronProxy.CurrentSession.Request.ID = IronProxy.CurrentSession.OriginalRequest.ID;
// byte[] OldBody = new byte[IronProxy.CurrentSession.OriginalRequest.BodyArray.Length];
// IronProxy.CurrentSession.OriginalRequest.BodyArray.CopyTo(OldBody, 0);
// IronProxy.CurrentSession.Request.BodyArray = OldBody;
// IronProxy.CurrentSession.FiddlerSession.oRequest.headers.AssignFromString(IronProxy.CurrentSession.Request.GetHeadersAsString());
//}
//internal static void UpdateFiddlerSessionWithNewRequestHeader()
//{
// IronProxy.CurrentSession.FiddlerSession.oRequest.headers.AssignFromString(IronProxy.CurrentSession.Request.GetHeadersAsString());
//}
//internal static void UpdateCurrentSessionWithNewRequestBodyText(string BodyString)
//{
// if (IronProxy.CurrentSession.Request.IsBinary)
// {
// IronProxy.CurrentSession.Request.BodyArray = Encoding.UTF8.GetBytes(BodyString);
// }
// else
// {
// IronProxy.CurrentSession.Request.BodyString = BodyString;
// }
// IronProxy.CurrentSession.FiddlerSession.utilSetRequestBody(IronProxy.CurrentSession.Request.BodyString);
//}
//internal static void UpdateFiddlerSessionWithNewRequestBody()
//{
// IronProxy.CurrentSession.FiddlerSession.utilSetRequestBody(IronProxy.CurrentSession.Request.BodyString);
//}
internal static void UpdateCurrentSessionWithNewRequest(Request Req)
{
IronProxy.CurrentSession.Request = Req;
IronProxy.CurrentSession.Request.ID = IronProxy.CurrentSession.OriginalRequest.ID;
//UpdateFiddlerSessionWithNewRequest();
}
开发者ID:herotheo,项目名称:IronWASP,代码行数:37,代码来源:IronProxy.cs
示例20: UpdateScan
internal static void UpdateScan(int ScanID, Request Req, string Status, string InjectionPoints, string FormatPlugin, string ScanPlugins, string SessionPlugin)
{
using(SQLiteConnection DB = new SQLiteConnection("data source=" + IronProjectFile))
{
DB.Open();
using(SQLiteCommand Cmd = DB.CreateCommand())
{
Cmd.CommandText = "UPDATE ScanQueue SET [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] WHERE [email protected]";
Cmd.Parameters.AddWithValue("@ScanID", ScanID);
Cmd.Parameters.AddWithValue("@RequestHeaders", Req.GetHeadersAsString());
if(Req.IsBinary)
Cmd.Parameters.AddWithValue("@RequestBody", Req.BinaryBodyString);
else
Cmd.Parameters.AddWithValue("@RequestBody", Req.BodyString);
Cmd.Parameters.AddWithValue("@BinaryRequest", AsInt(Req.IsBinary));
Cmd.Parameters.AddWithValue("@Status", Status);
Cmd.Parameters.AddWithValue("@Method", Req.Method);
Cmd.Parameters.AddWithValue("@URL", Req.FullUrl);
Cmd.Parameters.AddWithValue("@SessionPlugin", SessionPlugin);
Cmd.Parameters.AddWithValue("@InjectionPoints", InjectionPoints);
Cmd.Parameters.AddWithValue("@FormatPlugin", FormatPlugin);
Cmd.Parameters.AddWithValue("@ScanPlugins", ScanPlugins);
Cmd.ExecuteNonQuery();
}
}
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:26,代码来源:IronDB.cs
注:本文中的IronWASP.Request类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论