mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Fix last details. (#7625)
This commit is contained in:
parent
217df4b012
commit
b51954f850
15 changed files with 403 additions and 368 deletions
|
|
@ -6,27 +6,22 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|||
package.path = dirs.installdir .. "/scripts/lua/modules/host/?.lua;" .. package.path
|
||||
|
||||
local rest_utils = require "rest_utils"
|
||||
local scan_utils = require "scan_utils"
|
||||
local vulnerability_scan_utils = require "vulnerability_scan_utils"
|
||||
|
||||
|
||||
local host = _GET["host"]
|
||||
local scan_type = _GET["scan_type"]
|
||||
local scan_params = _GET["scan_params"]
|
||||
|
||||
if isEmptyString(host) or isEmptyString(scan_type) then
|
||||
tprint("HOST: ")
|
||||
tprint(host)
|
||||
tprint("SCAN_TYPE: ")
|
||||
tprint(scan_type)
|
||||
rest_utils.answer(rest_utils.consts.err.bad_content)
|
||||
end
|
||||
|
||||
local function set_host_to_scan(ip, scan_type, scan_params)
|
||||
return scan_utils.save_host_to_scan(scan_type, scan_params, ip)
|
||||
local function set_host_to_scan(ip, scan_type)
|
||||
return vulnerability_scan_utils.save_host_to_scan(scan_type, ip)
|
||||
end
|
||||
|
||||
|
||||
local result = set_host_to_scan(host, scan_type, scan_params)
|
||||
local result = set_host_to_scan(host, scan_type)
|
||||
|
||||
if result == 1 then
|
||||
rest_utils.answer(rest_utils.consts.success.ok)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue