本文整理汇总了C#中IronWASP.Response类的典型用法代码示例。如果您正苦于以下问题:C# Response类的具体用法?C# Response怎么用?C# Response使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Response类属于IronWASP命名空间,在下文中一共展示了Response类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: SimilarityCheckerItem
internal SimilarityCheckerItem(string Key, Response Res, string Payload)
{
this.Key = Key;
this.Res = Res;
this.Payload = Payload;
this.isPayloadSet = true;
this.ProcessedBodyString = this.Res.BodyString.Replace(Payload, "").Replace(Tools.UrlEncode(Payload), "").Replace(Tools.HtmlEncode(Payload), "");
}
示例3: Is
public override bool Is(Response Res)
{
try
{
return Tools.IsSoap(Res.BodyString.Trim());
}
catch { return false; }
}
示例4: Add
public void Add(string Key, Response Item)
{
if (ItemsDictionary.ContainsKey(Key))
{
throw new Exception(string.Format("Key-{0} already exists!", Key));
}
ItemsDictionary[Key] = new SimilarityCheckerItem(Key, Item);
}
示例5: Is
public override bool Is(Response Res)
{
try
{
return Tools.IsJson(Res.BodyString);
}
catch { return false; }
}
示例6: 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);
}
}
示例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);
}
示例8: Get
public static List<FormatPlugin> Get(Response Response)
{
List<FormatPlugin> RightPlugins = new List<FormatPlugin>();
foreach (string Name in List())
{
if (Get(Name).Is(Response)) RightPlugins.Add(Get(Name));
}
return RightPlugins;
}
示例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);
}
}
示例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();
}
示例11: 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;
}
示例12: 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();
}
示例13: Is
public override bool Is(Response Res)
{
try
{
if (Res.Headers.Has("Content-Type"))
{
if (Res.Headers.Get("Content-Type").Trim().StartsWith("multipart", StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
return false;
}
catch { return false; }
}
示例14: Check
//Override the Check method of the base class with custom functionlity
public override void Check(Scanner Scnr)
{
this.Scnr = Scnr;
this.RequestTriggers = new List<string>();
this.ResponseTriggers = new List<string>();
this.RequestTriggerDescs = new List<string>();
this.ResponseTriggerDescs = new List<string>();
this.TriggerRequests = new List<Request>();
this.TriggerResponses = new List<Response>();
this.TriggerCount = 0;
this.reasons = new List<FindingReason>();
this.ConfidenceLevel = 0;
this.base_response = this.Scnr.BaseResponse;
this.ErrorCount = new int[] { 0, 0, 0 };
this.Errors = new List<string>();
this.ErrorTriggerCount = 0;
this.Scnr.Trace("<i<br>><i<h>>Checking for SQL Injection:<i</h>>");
int overall_error_score = this.CheckForErrorBasedSQLi();
int overall_blind_score = this.CheckForBlindSQLi();
int overall_score = overall_error_score + overall_blind_score;
if (this.RequestTriggers.Count == this.ErrorTriggerCount && (this.ErrorCount[0] + this.ErrorCount[1] + this.ErrorCount[2]) > 0 && (this.ErrorCount[0] == this.ErrorCount[1] && this.ErrorCount[1] == this.ErrorCount[2]))
{
this.ReportSQLError(this.Errors);
}
else if (overall_score > 7)
{
this.ReportSQLInjection(FindingConfidence.High);
}
else if (overall_score > 4)
{
this.ReportSQLInjection(FindingConfidence.Medium);
}
else if (overall_score > 3)
{
this.ReportSQLInjection(FindingConfidence.Low);
}
//overall_blind_score = this.CheckForBlindSQLi(Request, Scanner)
//overall_score = overall_error_score + overall_blind_score
//if(overall_score == 0):
// return
}
示例15: 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
{
}
}
}
}