public MBSADataEntry(String pluginName, String ip, String description, int severity, RiskFactor riskFactor, List <String> cveList, List <String> bidList, List <String> osvdbList) { if (severity <= 1 && riskFactor == RiskFactor.NULL) { this.valid = false; return; } else if (riskFactor == RiskFactor.NULL) { riskFactor = RiskFactorFunction.getEnum(severity); } this.pluginName = pluginName; ipList.Add(ip); this.description = description == null ? "" : description; this.riskFactor = riskFactor; this.valid = true; this.cveList = cveList; this.bidList = bidList; this.osvdbList = osvdbList; this.type = EntryType.MBSA; }
public NessusDataEntry(String pluginName, String ip, String description, String impact, int severity, RiskFactor riskFactor, String recommendation, List <String> cveList, List <String> bidList, List <String> osvdbList) { if (severity <= 1 && riskFactor == RiskFactor.NULL) { this.valid = false; return; } else if (riskFactor == RiskFactor.NULL) { riskFactor = RiskFactorFunction.getEnum(severity); } this.pluginName = pluginName; ipList.Add(ip); this.description = description == null ? "" : processString(description); this.impact = impact == null ? "" : processString(impact); this.riskFactor = riskFactor; this.recommendation = recommendation == null ? "" : processString(recommendation); this.cveList = cveList; this.bidList = bidList; this.osvdbList = osvdbList; this.referenceLink = ""; this.valid = true; this.type = EntryType.NESSUS; }
String severityString = null; // for output excel /// <summary> /// This is the constructor of NessusDataEntry. /// (With/Without referenceLink) /// </summary> /// <param name="pluginName">plugin name of the DataEntry</param> /// <param name="ip">host name of the DataEntry</param> /// <param name="description">description of the DataEntry</param> /// <param name="impact">impact of the DataEntry</param> /// <param name="severity">int represents the risk 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 (default without = "")</param> public NessusDataEntry(String pluginName, String ip, String description, String impact, int severity, RiskFactor riskFactor, String recommendation, List <String> cveList, List <String> bidList, List <String> osvdbList, String fileName, String port, String protocol, String svc_name, String pluginFamily, String plugin_publication_date, String plugin_modification_date, String cvss_vector, String cvss_base_score, String plugin_output, String plugin_version, List <String> see_alsoList, String pluginID, String microSoftID, String referenceLink = "") { if (severity <= 1 && riskFactor == RiskFactor.NULL) { this.valid = false; return; } else if (riskFactor == RiskFactor.NULL) { riskFactor = RiskFactorFunction.getEnum(severity); } this.pluginName = pluginName; ipList.Add(ip); this.description = description == null ? "" : processString(description); this.impact = impact == null ? "" : processString(impact); this.riskFactor = riskFactor; this.recommendation = recommendation == null ? "" : processString(recommendation); this.cveList = cveList; this.bidList = bidList; this.osvdbList = osvdbList; this.port = port == null ? "" : port; this.protocol = protocol == null ? "" : protocol; this.svc_name = svc_name == null ? "" : svc_name; this.pluginFamily = pluginFamily == null ? "" : pluginFamily; this.plugin_publication_date = plugin_publication_date == null ? "" :plugin_publication_date; this.plugin_modification_date = plugin_modification_date == null ? "" :plugin_modification_date; this.cvss_vector = cvss_vector == null ? "" :cvss_vector; this.cvss_base_score = cvss_base_score == null ? "" :cvss_base_score; this.plugin_output = plugin_output == null ? "" :plugin_output; this.plugin_version = plugin_version == null ? "" :plugin_version; this.see_alsoList = see_alsoList; this.pluginID = pluginID == null ? "" :pluginID; this.severity = severity; this.microSoftID = microSoftID == null ? "" :microSoftID; this.referenceLink = referenceLink == null ? "" :referenceLink; this.fileName = fileName == null ? "" : fileName; this.valid = true; this.type = EntryType.NESSUS; this.port_with_protocol = ("(" + port + "/" + protocol + ")"); //@@@@@ this.hostlist_findingdetail.Add(ip); this.port_with_protocollist_findingdetail.Add("(" + port + "/" + protocol + ")"); this.pluginoutputlist_findingdetail.Add(plugin_output); this.pluginoutput_findingdetail = plugin_output; this.pluginversion_nessusfinding = plugin_version == null ? "" : plugin_version; this.pluginID_nessusfinding = pluginID == null ? "" : pluginID; }