mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-12 12:41:16 +00:00
- Alerts and flow status cleanup - Community flow user scripts migration - Implement scripts filters by l7 proto and packet interface only - Migrate flow2statusinfojson - Lower flow periodic update to 30 seconds if there is flow activity - Display flow scripts without a gui section
35 lines
796 B
Lua
35 lines
796 B
Lua
--
|
|
-- (C) 2019 - ntop.org
|
|
--
|
|
|
|
local flow_consts = require("flow_consts")
|
|
|
|
-- #################################################################
|
|
|
|
local script = {
|
|
key = "web_mining",
|
|
|
|
-- NOTE: hooks defined below
|
|
hooks = {},
|
|
}
|
|
|
|
-- #################################################################
|
|
|
|
function script.setup()
|
|
local enabled = (ntop.getPref("ntopng.prefs.mining_alerts") == "1")
|
|
return(enabled)
|
|
end
|
|
|
|
-- #################################################################
|
|
|
|
function script.hooks.protocolDetected(params)
|
|
local info = params.flow_info
|
|
|
|
if(info["proto.ndpi_cat"] == "Mining") then
|
|
flow.triggerStatus(flow_consts.status_types.status_web_mining_detected.status_id)
|
|
end
|
|
end
|
|
|
|
-- #################################################################
|
|
|
|
return script
|