Exemple #1
0
 static void ScanItem(ScanItemUniquenessChecker UniqueChecker, string LogSource, int LogID)
 {
     try
     {
         Request Req;
         if (LogSource.Equals("Proxy"))
         {
             Req = Request.FromProxyLog(LogID);
         }
         else
         {
             Req = Request.FromProbeLog(LogID);
         }
         if (!CanScan(Req))
         {
             //TotalScans--;
             IronUI.UpdateScanBranchStats(ScanDone, false, "Skipping previously scanned Request...." + ScanDone.ToString() + " Scan Jobs created", true, false);
             return;
         }
         if (!UniqueChecker.IsUniqueToScan(Req, ScannedRequests, !ScanUrl))
         {
             //TotalScans--;
             IronUI.UpdateScanBranchStats(ScanDone, false, "Skipping duplicate Request...." + ScanDone.ToString() + " Scan Jobs created", true, false);
             return;
         }
         ScannedRequests.Add(Req.GetClone());
         Scanner Scan = new Scanner(Req);
         Scan = SetSessionPlugin(Scan);
         Scan = SetRecording(Scan);
         Scan = SetFormatPlugin(Scan);
         Scan = AddActivePlugins(Scan);
         Scan = SetInjectionPoints(Scan);
         if (Scan.InjectionPointsCount == 0)
         {
             //TotalScans--;
             IronUI.UpdateScanBranchStats(ScanDone, false, "Skipping Request as no Injection Points were Identified...." + ScanDone.ToString() + " Scan Jobs created", true, false);
             return;
         }
         Scan.LaunchScan();
         ScanDone++;
         IronUI.UpdateScanBranchStats(ScanDone, false, "Creating and Queueing Scans...." + ScanDone.ToString() + " Scan Jobs created", true, false);
     }
     catch (Exception Exp)
     {
         IronException.Report("ScanBranch Error Creating Scan Job with " + LogSource + " Log ID - " + LogID.ToString(), Exp.Message, Exp.StackTrace);
     }
 }