mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Fix last details. (#7625)
This commit is contained in:
parent
217df4b012
commit
b51954f850
15 changed files with 403 additions and 368 deletions
|
|
@ -1,23 +0,0 @@
|
|||
--
|
||||
-- (C) 2013-23 - ntop.org
|
||||
--
|
||||
dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
local rest_utils = require "rest_utils"
|
||||
|
||||
local debug = false
|
||||
debug = true
|
||||
|
||||
|
||||
local res = {}
|
||||
res[#res+1] = {
|
||||
id = "nmap",
|
||||
value = "nmap",
|
||||
label = i18n("hosts_stats.page_scan_hosts.scan_type_list.nmap")
|
||||
}
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, res)
|
||||
|
||||
|
||||
|
|
@ -7,13 +7,10 @@ package.path = dirs.installdir .. "/scripts/lua/modules/host/?.lua;" .. package.
|
|||
|
||||
require "lua_utils"
|
||||
local rest_utils = require "rest_utils"
|
||||
local scan_utils = require "scan_utils"
|
||||
local debug = false
|
||||
|
||||
--debug = true
|
||||
local vulnerability_scan_utils = require "vulnerability_scan_utils"
|
||||
|
||||
local function retrieve_host()
|
||||
return scan_utils.retrieve_hosts_to_scan(debug)
|
||||
return vulnerability_scan_utils.retrieve_hosts_to_scan()
|
||||
end
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, retrieve_host())
|
||||
|
|
@ -7,11 +7,11 @@ package.path = dirs.installdir .. "/scripts/lua/modules/host/?.lua;" .. package.
|
|||
|
||||
require "lua_utils"
|
||||
local rest_utils = require "rest_utils"
|
||||
local scan_utils = require "scan_utils"
|
||||
local vulnerability_scan_utils = require "vulnerability_scan_utils"
|
||||
|
||||
|
||||
local function retrieve_host_scan_result(host, scan_type)
|
||||
return scan_utils.retrieve_hosts_scan_result(host, scan_type)
|
||||
return vulnerability_scan_utils.retrieve_hosts_scan_result(host, scan_type)
|
||||
end
|
||||
|
||||
local host = _GET["host"]
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--
|
||||
-- (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
|
||||
|
||||
require "lua_utils"
|
||||
local rest_utils = require "rest_utils"
|
||||
local vulnerability_scan_utils = require "vulnerability_scan_utils"
|
||||
|
||||
local debug = false
|
||||
debug = true
|
||||
|
||||
|
||||
local res = {}
|
||||
|
||||
res = vulnerability_scan_utils.retrieve_scan_types()
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, {rsp = res})
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue