mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
- Move score from status definition to user scripts - Separate flow score counter from the peers score - Create a new HostScore class to hold the score data
31 lines
810 B
Lua
31 lines
810 B
Lua
--
|
|
-- (C) 2019-20 - ntop.org
|
|
--
|
|
|
|
local flow_consts = require("flow_consts")
|
|
local user_scripts = require("user_scripts")
|
|
|
|
-- #################################################################
|
|
|
|
local script = {
|
|
-- NOTE: hooks defined below
|
|
hooks = {},
|
|
|
|
gui = {
|
|
i18n_title = "flow_callbacks_config.web_mining",
|
|
i18n_description = "flow_callbacks_config.web_mining_description",
|
|
}
|
|
}
|
|
|
|
-- #################################################################
|
|
|
|
function script.hooks.protocolDetected(now)
|
|
if(flow.getnDPICategoryName() == "Mining") then
|
|
flow.triggerStatus(flow_consts.status_types.status_web_mining_detected.status_id,
|
|
50--[[ flow score]], 50--[[ cli score ]], 10--[[ srv score ]])
|
|
end
|
|
end
|
|
|
|
-- #################################################################
|
|
|
|
return script
|