Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Fix bug in export to respect general vuln display config
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1nb0rn committed Apr 4, 2024
1 parent de6174d commit 683909d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web_server_files/static/js/search_vulns.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ function createVulnsMarkDownTable() {
for (var i = 0; i < vulns.length; i++) {
if (selectedVulns != null && selectedVulns.length > 0 && !selectedVulns.includes(vulns[i]["id"]))
continue;
if (ignoreGeneralCpeVulns && vulns[i].vuln_match_reason == "general_cpe")
continue;
if (!showSingleVersionVulns && vulns[i].vuln_match_reason == "single_higher_version_cpe")
continue;

if (vulns[i].exploits !== undefined && vulns[i].exploits.length > 0) {
if (!onlyShowEDBExploits || reduceToEDBUrls(vulns[i].exploits).length > 0) {
has_exploits = true;
Expand Down Expand Up @@ -313,6 +318,10 @@ function createVulnsMarkDownTable() {
for (var i = 0; i < vulns.length; i++) {
if (selectedVulns != null && selectedVulns.length > 0 && !selectedVulns.includes(vulns[i]["id"]))
continue;
if (ignoreGeneralCpeVulns && vulns[i].vuln_match_reason == "general_cpe")
continue;
if (!showSingleVersionVulns && vulns[i].vuln_match_reason == "single_higher_version_cpe")
continue;

cur_vuln_has_exploits = false;
vulns_md += '|';
Expand Down Expand Up @@ -365,6 +374,11 @@ function createVulnsCSV() {
for (var i = 0; i < vulns.length; i++) {
if (selectedVulns != null && selectedVulns.length > 0 && !selectedVulns.includes(vulns[i]["id"]))
continue;
if (ignoreGeneralCpeVulns && vulns[i].vuln_match_reason == "general_cpe")
continue;
if (!showSingleVersionVulns && vulns[i].vuln_match_reason == "single_higher_version_cpe")
continue;

if (vulns[i].exploits !== undefined && vulns[i].exploits.length > 0) {
if (!onlyShowEDBExploits || reduceToEDBUrls(vulns[i].exploits).length > 0) {
has_exploits = true;
Expand Down Expand Up @@ -396,6 +410,10 @@ function createVulnsCSV() {
for (var i = 0; i < vulns.length; i++) {
if (selectedVulns != null && selectedVulns.length > 0 && !selectedVulns.includes(vulns[i]["id"]))
continue;
if (ignoreGeneralCpeVulns && vulns[i].vuln_match_reason == "general_cpe")
continue;
if (!showSingleVersionVulns && vulns[i].vuln_match_reason == "single_higher_version_cpe")
continue;

if (selectedColumns.length < 1 || selectedColumns.includes('cve'))
vulns_csv += `${vulns[i]["id"]},`
Expand Down

0 comments on commit 683909d

Please sign in to comment.