本文整理汇总了C#中IronWASP.Response类的典型用法代码示例。如果您正苦于以下问题:C# Response类的具体用法?C# Response怎么用?C# Response使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Response类属于IronWASP命名空间,在下文中一共展示了Response类的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: 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), "");
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:SimilarityCheckerItem.cs
示例3: Is
public override bool Is(Response Res)
{
try
{
return Tools.IsSoap(Res.BodyString.Trim());
}
catch { return false; }
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:SoapFormatPlugin.cs
示例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);
}
开发者ID:moon2l,项目名称:IronWASP,代码行数:8,代码来源:SimilarityChecker.cs
示例5: Is
public override bool Is(Response Res)
{
try
{
return Tools.IsJson(Res.BodyString);
}
catch { return false; }
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:JsonFormatPlugin.cs
示例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);
}
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:8,代码来源:Triggers.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(Response Response)
{
List<FormatPlugin> RightPlugins = new List<FormatPlugin>();
foreach (string Name in List())
{
if (Get(Name).Is(Response)) 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: 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
示例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();
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:15,代码来源:Highlighter.cs
示例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; }
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:15,代码来源:MultipartFormatPlugin.cs
示例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
}
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:46,代码来源:SqlInjectionCheck.cs
示例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
{
}
}
}
}
开发者ID:moon2l,项目名称:IronWASP,代码行数:34,代码来源:Import.cs
示例16: 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
示例17: UpdateCurrentSessionWithNewResponse
//internal static void UpdateFiddlerSessionWithNewRequest()
//{
// IronProxy.CurrentSession.FiddlerSession.oRequest.headers.AssignFromString(IronProxy.CurrentSession.Request.GetHeadersAsString());
// IronProxy.CurrentSession.FiddlerSession.requestBodyBytes = IronProxy.CurrentSession.Request.BodyArray;
//}
//internal static void UpdateCurrentSessionWithNewResponseHeader(string HeaderString)
//{
// string NewResponseHeaders = HeaderString.TrimEnd(new char[]{'\r','\n'});
// NewResponseHeaders += "\r\n\r\n";
// IronProxy.CurrentSession.Response = new Response(NewResponseHeaders);
// IronProxy.CurrentSession.Response.ID = IronProxy.CurrentSession.OriginalResponse.ID;
// IronProxy.CurrentSession.Response.BodyArray = new byte[IronProxy.CurrentSession.OriginalResponse.BodyArray.Length];
// IronProxy.CurrentSession.OriginalResponse.BodyArray.CopyTo(IronProxy.CurrentSession.Response.BodyArray, 0);
// IronProxy.CurrentSession.FiddlerSession.oResponse.headers.AssignFromString(IronProxy.CurrentSession.Response.GetHeadersAsString());
//}
//internal static void UpdateCurrentSessionWithNewResponseBodyText(string BodyString)
//{
// IronProxy.CurrentSession.Response.BodyString = BodyString;
// IronProxy.CurrentSession.FiddlerSession.utilSetResponseBody(IronProxy.CurrentSession.Response.BodyString);
//}
internal static void UpdateCurrentSessionWithNewResponse(Response Res)
{
IronProxy.CurrentSession.Response = Res;
IronProxy.CurrentSession.Response.ID = IronProxy.CurrentSession.OriginalResponse.ID;
//UpdateFiddlerSessionWithNewResponse();
}
开发者ID:herotheo,项目名称:IronWASP,代码行数:26,代码来源:IronProxy.cs
示例18: 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
示例19: GetClone
internal Response GetClone(bool CopyID)
{
Response ClonedResponse = new Response(this.ToString());
if (CopyID) ClonedResponse.ID = this.ID;
ClonedResponse.TTL = this.TTL;
ClonedResponse.Source = this.Source;
return ClonedResponse;
}
开发者ID:kartikeyap,项目名称:IronWASP,代码行数:8,代码来源:Response.cs
示例20: Scan
public void Scan()
{
try
{
if (this.StartedFromASTab) AddActiveScanID(this.ScanID);
this.OriginalRequest.SessionHandler = this.SessionHandler;
this.OriginalResponse = this.OriginalRequest.Send();//this is just a temp value since calling inject from GetBaseLine would require a response object
this.TestResponse = this.OriginalResponse;
this.CurrentRequest = this.OriginalRequest;
this.OriginalResponse = SessionHandler.GetBaseLine(this, this.OriginalRequest);
this.CurrentRequest = this.OriginalRequest;
this.TestResponse = this.OriginalResponse;
foreach (ActivePlugin AP in this.Plugins.Values)
{
this.CurrentPlugin = AP.Name;
this.CurrentSection = "URL";
foreach (int URLPartPosition in this.URLInjections)
{
this.CurrentURLPartPosition = URLPartPosition;
this.CurrentParameterName = "";
this.CurrentSubParameterPosition = 0;
this.CurrentParameterValue = this.CurrentRequest.UrlPathParts[URLPartPosition];
this.CheckWithActivePlugin(AP);
}
this.CurrentSection = "Query";
foreach (string ParameterName in this.QueryInjections.GetAll())
{
this.CurrentParameterName = ParameterName;
foreach (int SubParameterPosition in this.QueryInjections.GetAll(ParameterName))
{
this.CurrentSubParameterPosition = SubParameterPosition;
this.CurrentParameterValue = this.CurrentRequest.Query.GetAll(ParameterName)[SubParameterPosition];
this.CheckWithActivePlugin(AP);
}
}
this.CurrentSection = "Body";
if (BodyFormat.Name.Length == 0)
{
foreach (string ParameterName in this.BodyInjections.GetAll())
{
this.CurrentParameterName = ParameterName;
foreach (int SubParameterPosition in this.BodyInjections.GetAll(ParameterName))
{
this.CurrentSubParameterPosition = SubParameterPosition;
this.CurrentParameterValue = this.CurrentRequest.Body.GetAll(ParameterName)[SubParameterPosition];
this.CheckWithActivePlugin(AP);
}
}
}
else
{
if (this.BodyXmlInjections.Count != XmlInjectionArray.GetLength(0) || !XmlInjectionSignature.Equals(Tools.MD5("Name:" + BodyFormat.Name + "|Body" + this.OriginalRequest.BodyString)))
{
string Xml = BodyFormat.ToXmlFromRequest(this.OriginalRequest);
XmlInjectionArray = FormatPlugin.XmlToArray(Xml);
XmlInjectionSignature = Tools.MD5("Name:" + BodyFormat.Name + "|Body" + this.OriginalRequest.BodyString);
}
foreach (int BodyXmlPosition in this.BodyXmlInjections)
{
this.CurrentBodyXmlPosition = BodyXmlPosition;
if (XmlInjectionArray.GetLength(0) > BodyXmlPosition)
{
this.CurrentParameterName = XmlInjectionArray[BodyXmlPosition, 0];
this.CurrentParameterValue = XmlInjectionArray[BodyXmlPosition, 1];
}
else
{
this.CurrentParameterName = "";
this.CurrentParameterValue = "";
}
this.CurrentSubParameterPosition = 0;
this.CheckWithActivePlugin(AP);
}
}
this.CurrentSection = "Cookie";
foreach (string ParameterName in this.CookieInjections.GetAll())
{
this.CurrentParameterName = ParameterName;
foreach (int SubParameterPosition in this.CookieInjections.GetAll(ParameterName))
{
this.CurrentSubParameterPosition = SubParameterPosition;
this.CurrentParameterValue = this.CurrentRequest.Cookie.GetAll(ParameterName)[SubParameterPosition];
this.CheckWithActivePlugin(AP);
}
}
this.CurrentSection = "Headers";
foreach (string ParameterName in this.HeadersInjections.GetAll())
{
this.CurrentParameterName = ParameterName;
foreach (int SubParameterPosition in this.HeadersInjections.GetAll(ParameterName))
{
this.CurrentSubParameterPosition = SubParameterPosition;
this.CurrentParameterValue = this.CurrentRequest.Headers.GetAll(ParameterName)[SubParameterPosition];
this.CheckWithActivePlugin(AP);
}
}
}
if (this.StartedFromASTab)
//.........这里部分代码省略.........
开发者ID:welias,项目名称:IronWASP,代码行数:101,代码来源:Scanner.cs
注:本文中的IronWASP.Response类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论