mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Fix various bugs and add ports in the host scan modal. (#7698)
This commit is contained in:
parent
a7c49205ef
commit
a93201e42f
20 changed files with 540 additions and 109 deletions
25
scripts/lua/rest/v2/get/host/resolve_host_name.lua
Normal file
25
scripts/lua/rest/v2/get/host/resolve_host_name.lua
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue