Fix various bugs and add ports in the host scan modal. (#7698)

This commit is contained in:
Nicolo Maio 2023-08-01 10:56:54 +00:00
parent a7c49205ef
commit a93201e42f
20 changed files with 540 additions and 109 deletions

View file

@ -0,0 +1,25 @@
--
-- (C) 2013-23 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/host/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/vulnerability_scan/?.lua;" .. package.path
require "lua_utils"
local rest_utils = require "rest_utils"
local host = _GET["host"]
if isEmptyString(host) then
rest_utils.answer(rest_utils.consts.err.invalid_args)
end
local result = ntop.resolveHost(host,true)
-- FIXME
if result == nil then
result = "no_success"
end
rest_utils.answer(rest_utils.consts.success.ok, result)