@Override public void onScannerSuccess(Set<Vulnerability> vulnerabilities) { for (Vulnerability vulnerability : vulnerabilities) { // update cache domains.get(domainName) .getSoftware() .get(software.getKey()) .getVulnerabilities() .add(vulnerability); } // update gui component tabComponent.getSoftwareTable().refreshTable(domains, tabComponent.getCbxSoftwareShowVuln().isSelected()); // add Burp issue callbacks.addScanIssue(new SoftwareIssue( baseRequestResponse, helpers, callbacks, startStop, domains.get(domainName).getSoftware().get(software.getKey()) )); }
public void refreshTable(Map<String, Domain> domains , boolean showOnlyVulnerable) { defaultModel.setRowCount(0); for(Map.Entry<String, Domain> d: domains.entrySet()) { for (Map.Entry<String, Software> s: d.getValue().getSoftware().entrySet()) { if (showOnlyVulnerable && s.getValue().getVulnerabilities().size() <= 0) { continue; } defaultModel.addRow(new Object[] { d.getKey(), s.getValue().getName(), s.getValue().getVersion(), Utils.getMaxScore(s.getValue().getVulnerabilities()), //TODO move maxScore field to model Utils.getVulnersList(s.getValue().getVulnerabilities()) }); } } }
@Override public void onFail(JSONObject error) { // update gui component tabComponent.getSoftwareTable().refreshTable(domains, tabComponent.getCbxSoftwareShowVuln().isSelected()); callbacks.addScanIssue(new SoftwareIssue( baseRequestResponse, helpers, callbacks, startStop, domains.get(domainName).getSoftware().get(software.getKey()) )); } });
if (domain.getSoftware().get(match.getType() + match.getMatchGroup()) != null) { continue; .getSoftware() .put(software.getKey(), software);