public static void showWebInspectResultsInO2DockWindow(WebInspectResults webInspectResults)
 {
     O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof (ascx_TableList), true,
                                                    PoC.dockContentTitle_WebInspectResults);
     var tableList = (ascx_TableList)O2AscxGUI.getAscx(PoC.dockContentTitle_WebInspectResults);
     showWebInspectResultsInTableList(webInspectResults, tableList);
 }
 public void webInspectResults()
 {
     var results = new WebInspectResults();
     results.loadWebInspectScanFiles(webInspectFileWithResults);
     Assert.IsTrue(results.processedWebInspectScanFiles.Count > 0, "No Files Processed");
     Assert.IsTrue(results.webInspectFindings.Count > 0, "No Findings in loaded files");
 }
Example #3
0
 private void processWebInspectFileAndShowResults(string fileToLoad)
 {
     var webInspectResults = new WebInspectResults();
     webInspectResults.loadWebInspectScanFiles(fileToLoad);
     WebInspectWindowsFormsUtils.showWebInspectResultsInO2DockWindow(webInspectResults);
     WebInspectWindowsFormsUtils.showFindingsCreatedFromWebInspectResults(webInspectResults);            
 }    
 public void webInspectToOzasmt()
 {
     var webInspectResults = new WebInspectResults();
     webInspectResults.loadWebInspectScanFiles(webInspectFileWithResults);
     Assert.IsTrue(webInspectResults.processedWebInspectScanFiles.Count > 0, "No Files Processed");
     Assert.IsTrue(webInspectResults.webInspectFindings.Count > 0, "No WebInspectFindings in webInspectResults");
     List<IO2Finding> o2Findings = WebInspectToOzasmt.createO2FindingsFromWebInspectResults(webInspectResults);
     Assert.IsTrue(o2Findings.Count > 0, "There were no findings created from webInspectResults");
 }
Example #5
0
 public static List<IO2Finding> createO2FindingsFromWebInspectResults(WebInspectResults webInspectResults)
 {
     var results = new List<IO2Finding>();
     foreach (WebInspectFinding webInspectFinding in webInspectResults.webInspectFindings)
     {
         foreach (string word in new FilteredUrl(webInspectFinding.fullUrl).words)
             results.Add(createO2FindingFromWebInspectFinding(webInspectFinding, word));
     }
     return results;
 }
Example #6
0
        public static List <IO2Finding> createO2FindingsFromWebInspectResults(WebInspectResults webInspectResults)
        {
            var results = new List <IO2Finding>();

            foreach (WebInspectFinding webInspectFinding in webInspectResults.webInspectFindings)
            {
                foreach (string word in new FilteredUrl(webInspectFinding.fullUrl).words)
                {
                    results.Add(createO2FindingFromWebInspectFinding(webInspectFinding, word));
                }
            }
            return(results);
        }
        internal static void showFindingsCreatedFromWebInspectResults(WebInspectResults webInspectResults)
        {
            //    var webInspectResults = (WebInspectResults)oObject;
            var o2Assessment = new O2Assessment
            {
                o2Findings =
                    WebInspectToOzasmt.createO2FindingsFromWebInspectResults(
                    webInspectResults)
            };

            O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof(ascx_FindingsViewer),
                                                           true,
                                                           PoC.dockContentTitle_FindingsViewer);
            var findingsViewer = (ascx_FindingsViewer)O2AscxGUI.getAscx(PoC.dockContentTitle_FindingsViewer);
            findingsViewer.loadO2Assessment(o2Assessment);
            findingsViewer.setFilter1Value("vulnName");
            findingsViewer.setFilter2Value("(no Filter)");
            //GlobalStaticVars.dO2LoadedO2DockContent[PoC.dockContentTitle_FindingsViewer].dockContent.ParentForm.Height = 500;
        }
        public static void showWebInspectResultsInTableList(WebInspectResults webInspectResults,
                                                            ascx_TableList tableList)
        {
            if (tableList != null)
            {
                var dataTable = new DataTable("WebInspect results");
                foreach (FieldInfo field in typeof (WebInspectFinding).GetFields())
                    dataTable.Columns.Add(field.Name);

                foreach (WebInspectFinding webInspectFinding in webInspectResults.webInspectFindings)
                {
                    DataRow row = dataTable.NewRow();
                    foreach (FieldInfo field in typeof (WebInspectFinding).GetFields())
                        row[field.Name] = DI.reflection.getFieldValue(field.Name, webInspectFinding);

                    dataTable.Rows.Add(row);
                }
                tableList.setDataTable(dataTable);
            }
        }
 private void llClearResults_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     webInspectResults = new WebInspectResults();
     showLoadedFindings();
 }