Add automatic scan frequency (#7625)

This commit is contained in:
Nicolo Maio 2023-08-02 12:44:08 +00:00
parent 9828ec3606
commit 5195007829
8 changed files with 78 additions and 18 deletions

View file

@ -13,13 +13,14 @@ local vs_utils = require "vs_utils"
local host = _GET["host"]
local scan_type = _GET["scan_type"]
local scan_ports = _GET["scan_ports"]
local scan_frequency = _GET["auto_scan_frequency"]
if isEmptyString(host) or isEmptyString(scan_type) then
rest_utils.answer(rest_utils.consts.err.bad_content)
return
end
local result = vs_utils.save_host_to_scan(scan_type, host, nil, nil, nil, 5, scan_ports)
local result = vs_utils.save_host_to_scan(scan_type, host, nil, nil, nil, 5, scan_ports, scan_frequency)
if result == 1 then
rest_utils.answer(rest_utils.consts.success.ok)