Implements flow callbacks and alerts in C++

This commit is contained in:
Simone Mainardi 2021-03-22 09:51:36 +01:00
parent 3659188002
commit aea9138bfb
353 changed files with 10790 additions and 4455 deletions

View file

@ -13,9 +13,6 @@ local script = {
-- Script category
category = user_scripts.script_categories.security,
-- NOTE: hooks defined below
hooks = {},
filter = {
-- Overrides filter.default_fields in the flow entry of user_scripts.available_subdirs
-- This will make default filters populated only with the source IP
@ -31,20 +28,4 @@ local script = {
-- #################################################################
function script.hooks.protocolDetected(now)
if false then -- TODO: set to true to execute
local cli_score, srv_score, flow_score = 10, 10, 10
local alert = alert_consts.alert_types.alert_flow_new_api_demo.new(
"one_flow_param",
"another_flow_param"
)
alert:set_severity(alert_severities.error)
alert:trigger_status(cli_score, srv_score, flow_score)
end
end
-- #################################################################
return script