Skip to content

Commit

Permalink
Use port list we got from ospd-openvas
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoStiefvater committed Aug 26, 2020
1 parent af0f1bd commit 81402f1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions boreas/alivedetection.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,17 @@ alive_detection_init (gvm_hosts_t *hosts, alive_test_t alive_test)

/* Init ports used for scanning. */
scanner.ports = NULL;
port_list = "80,137,587,3128,8081";

port_list = get_alive_test_ports ();
if (NULL == port_list)
port_list = "80,137,587,3128,8081";
if (validate_port_range (port_list))
{
g_warning ("%s: Invalid port range supplied for alive detection module. "
"Using global port range instead.",
__func__);
/* This port list was already validated by openvas so we don't do it here
* again. */
/* This port list is also used by openvas for scanning and was already
* validated by openvas so we don't do it here again. */
port_list = prefs_get ("port_range");
}
scanner.ports = g_array_new (FALSE, TRUE, sizeof (int));
Expand Down

0 comments on commit 81402f1

Please sign in to comment.