public GuiDataEntry(String pluginName,
                            String ip,
                            String description,
                            String impact,
                            RiskFactor riskFactor,
                            String recommendation,
                            List <String> cveList,
                            List <String> bidList,
                            List <String> osvdbList,
                            String referenceLink,
                            DataEntry.EntryType entryType)
        {
            this.pluginName = pluginName;

            ipList.Add(ip);
            this.description    = description == null ? "" : description;
            this.impact         = impact == null ? "" : impact;
            this.riskFactor     = riskFactor;
            this.recommendation = recommendation == null ? "" : recommendation;
            this.cveList        = cveList;
            this.bidList        = bidList;
            this.osvdbList      = osvdbList;
            this.referenceLink  = referenceLink;

            if (entryType != EntryType.NULL)
            {
                this.type = entryType;
            }
            else
            {
                this.type = EntryType.GUI;
            }
        }
Exemple #2
0
        public DataEntry.EntryType getEntryType(DataEntry entry)
        {
            DataEntry.EntryType tempEntryType = getEntryType(highRisk, entry);
            if (tempEntryType == DataEntry.EntryType.NULL)
            {
                tempEntryType = getEntryType(mediumRisk, entry);
                if (tempEntryType == DataEntry.EntryType.NULL)
                {
                    tempEntryType = getEntryType(lowRisk, entry);
                    if (tempEntryType == DataEntry.EntryType.NULL)
                    {
                        tempEntryType = getEntryType(noneRisk, entry);
                        if (tempEntryType == DataEntry.EntryType.NULL)
                        {
                            tempEntryType = getEntryType(openPort, entry);
                        }
                    }
                }
            }

            return(tempEntryType);
        }
Exemple #3
0
 public void setOutputEntryType(DataEntry.EntryType outputEntryType)
 {
     this.outputEntryType = outputEntryType;
 }
Exemple #4
0
        /// <summary>
        /// This is the constructor of GuiDataEntry.
        /// (With EntryType parameter)
        /// </summary>
        /// <param name="pluginName">pluginName of the DataEntry</param>
        /// <param name="ipString">string with all host name of the DataEntry</param>
        /// <param name="description">description of the DataEntry</param>
        /// <param name="impact">impact of the DataEntry</param>
        /// <param name="riskFactor">RiskFactor of the DataEntry</param>
        /// <param name="recommendation">recommendation of the DataEntry</param>
        /// <param name="cveList">cveList of the DataEntry</param>
        /// <param name="bidList">bidList of the DataEntry</param>
        /// <param name="osvdbList">osvdbList of the DataEntry</param>
        /// <param name="referenceLink">referenceLink of the DataEntry</param>
        /// <param name="entryType">EntryType of the DataEntry</param>
        public GuiDataEntry(String pluginName,
                            String ipString,
                            String description,
                            String impact,
                            RiskFactor riskFactor,
                            String recommendation,
                            List <String> cveList,
                            List <String> bidList,
                            List <String> osvdbList,
                            String referenceLink,
                            DataEntry.EntryType entryType,
                            String pluginversion,
                            String pluginID)
        {
            this.pluginID_nessusfinding      = pluginID;
            this.pluginversion_nessusfinding = pluginversion;
            //this.louise = louiselouise;
            this.pluginName = pluginName;

            if (ipString.Contains(","))
            {
                String[] ipListArray = ipString.Split(',');
                for (int i = 0; i < ipListArray.Length; i++)
                {
                    ipListArray[i] = ipListArray[i].Replace(" ", "");
                    //foreach (char c in ipListArray[i])
                    //{
                    //    if (c != ' ') {
                    //        tempString += c;
                    //    }
                    //}
                    ipListArray[i] = ipListArray[i].Replace("(", " (");
                }

                foreach (String s in ipListArray)
                {
                    if (!ipList.Contains(s))
                    {
                        ipList.Add(s);
                        hostlist_findingdetail.Add(s);
                        port_with_protocollist_findingdetail.Add("");
                        pluginoutputlist_findingdetail.Add("");
                    }
                }
            }
            else if (!ipList.Contains(ipString))
            {
                ipList.Add(ipString);
                hostlist_findingdetail.Add(ipString);
                port_with_protocollist_findingdetail.Add("");
                pluginoutputlist_findingdetail.Add("");
            }

            this.description    = description == null ? "" : description;
            this.impact         = impact == null ? "" : impact;
            this.riskFactor     = riskFactor;
            this.recommendation = recommendation == null ? "" : recommendation;
            this.cveList        = cveList;
            this.bidList        = bidList;
            this.osvdbList      = osvdbList;
            this.referenceLink  = referenceLink;

            if (entryType != EntryType.NULL)
            {
                this.type = entryType;
            }
            else
            {
                this.type = EntryType.GUI;
            }
        }