Ejemplo n.º 1
0
        public void calculateFinalResults(
            string taintSources_SourceRegEx, string taintSources_SinkRegEx, string finalSinks_SourceRegEx, string finalSinks_SinkRegEx)
        {
            if (findingsWith_BaseO2Findings == null)
            {
                findingsWith_BaseO2Findings = XUtils_Findings_v0_1.loadFindingsFile(BaseO2Findings);
            }

            // calculate TaintSources
            findingsWith_FindingsFromTaintSources = O2FindingsHelpers.calculateFindings(
                findingsWith_BaseO2Findings,
                taintSources_SourceRegEx,
                taintSources_SinkRegEx,
                XUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sinks);

            // calculate FinalSinks
            findingsWith_FindingsToFinalSinks = O2FindingsHelpers.calculateFindings(
                findingsWith_BaseO2Findings,
                FinalSinks_SourceRegEx,
                finalSinks_SinkRegEx,
                XUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sources);

            // calculate strutsMapping object and findings
            if (StrutsMappings == null)
            {
                StrutsMappings = (IStrutsMappings)Serialize.getDeSerializedObjectFromBinaryFile(StrutsMappingsFile, typeof(KStrutsMappings));
            }
            findingsWith_StrutsMappings = StrutsMappingHelpers.createFindingsFromStrutsMappings(StrutsMappings);

            calculateResults();

            //            results = xUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sinks(results);


            /*runFilterFor_TaintSources(
             *  taintSources_SourceRegEx, taintSources_SinkRegEx, findingsViewer_BaseFindings.currentO2Findings,
             *  xUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sinks, filteredFindings_TaintSources);
             * runFilterFor_FinalSinks(
             *  finalSinks_SourceRegEx, finalSinks_SinkRegEx, findingsViewer_BaseFindings.currentO2Findings,
             *  xUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sources, filteredFindings_FinalSinks);
             *
             *
             * /*            runFilterFor_TaintSources(
             *  taintSources_SourceRegEx, taintSources_SinkRegEx, findingsViewer_BaseFindings.currentO2Findings,
             *  xUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sinks, filteredFindings_TaintSources);
             * runFilterFor_FinalSinks(
             *  finalSinks_SourceRegEx, finalSinks_SinkRegEx, findingsViewer_BaseFindings.currentO2Findings,
             *  xUtils_Findings_v0_1.mapJoinPoints_HashTagsOn_Sources, filteredFindings_FinalSinks);
             */

            /*
             * createFindingsFromStrutsMappings(strutsMappingsControl, findingsViewer_FromStrutsMappings);
             *
             * calculateResults(strutsMappingsControl,filteredFindings_TaintSources, filteredFindings_FinalSinks, findingsViewer_FinalFindings);
             */
        }
 public void openInNewWindow(List <IO2Finding> o2Findings)
 {
     XUtils_Findings_v0_1.openFindingsInNewWindow(o2Findings);
 }
 public List <IO2Finding> whereSourceAndSink_ContainsRegex(List <IO2Finding> o2Findings, string source, string sink)
 {
     return(XUtils_Findings_v0_1.calculateFindings(o2Findings, source, sink));
 }