[VS] Fix the CIDR input field and its usage with IPv4 NetScan. (#7943)

This commit is contained in:
Nicolo Maio 2024-03-27 16:16:50 +01:00
parent e58c60867e
commit e7aec4bd37
12 changed files with 89 additions and 78 deletions

View file

@ -16,7 +16,7 @@ local scan_type = _GET["scan_type"]
local ports = _GET["scan_ports"]
local single_host = toboolean(_GET["scan_single_host"]) or false
local scan_id = _GET["scan_id"]
local cidr = _GET["vs_cidr"]
if single_host then
if isEmptyString(host) or isEmptyString(scan_type) then
@ -27,7 +27,7 @@ if single_host then
local is_all = not single_host
local is_periodic = not single_host
local res = vs_utils.schedule_ondemand_single_host_scan(scan_type, host, ports, scan_id, is_periodic, is_all, is_single_scan)
local res = vs_utils.schedule_ondemand_single_host_scan(scan_type, host, ports, scan_id, is_periodic, is_all, is_single_scan, cidr)
if res then
rest_utils.answer(rest_utils.consts.success.ok)