You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the added ; add the end of the line, this way SNORT loads the policy file correctly.
The instructions in the generated rules file is also incorrect, these can be updated with the following change:
# Prepare rules for output
log.info(f'Writing rules to: {conf.rule_path}')
header = ('#-------------------------------------------------------------------\n'
f'# Rules file created by {SCRIPT_NAME} at {conf.start_time}\n'
'# \n'
'# To Use this file: in your snort.lua, you need the following settings:\n'
'# ips =\n'
'# {{\n'
'# rules = [\n'
f'# include = "{conf.rule_path}",\n'
'# ],\n')
if conf.rule_mode == 'policy':
header += ('# states = [\n'
f'# include "{conf.policy_path}",\n'
'# ],\n'
'# ...\n'
'# }}\n#\n'
'# detection=\n'
'# {{\n'
'# global_default_rule_state = false,\n')
header += '# ...\n'
header += '# }}\n#\n'
The text was updated successfully, but these errors were encountered:
When using the policy mode, the rules is created with invalid syntax, the following code change will resolve this issue:
Note the added
;
add the end of the line, this way SNORT loads the policy file correctly.The instructions in the generated rules file is also incorrect, these can be updated with the following change:
The text was updated successfully, but these errors were encountered: