From afba4e722681c35163ec48b7cacffa8b8cb88e5f Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 22 Jul 2015 20:31:30 -0400 Subject: Add new feature to hide deprecated rules categories in GUI. --- config/suricata/suricata_global.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'config/suricata/suricata_global.php') diff --git a/config/suricata/suricata_global.php b/config/suricata/suricata_global.php index 8eea8d2d..013cde3e 100644 --- a/config/suricata/suricata_global.php +++ b/config/suricata/suricata_global.php @@ -67,6 +67,7 @@ else { $pconfig['snortcommunityrules'] = $config['installedpackages']['suricata']['config'][0]['snortcommunityrules']; $pconfig['snort_rules_file'] = $config['installedpackages']['suricata']['config'][0]['snort_rules_file']; $pconfig['autogeoipupdate'] = $config['installedpackages']['suricata']['config'][0]['autogeoipupdate']; + $pconfig['hide_deprecated_rules'] = $config['installedpackages']['suricata']['config'][0]['hide_deprecated_rules'] == "on" ? 'on' : 'off'; } // Do input validation on parameters @@ -99,6 +100,7 @@ if (!$input_errors) { $config['installedpackages']['suricata']['config'][0]['enable_etopen_rules'] = $_POST['enable_etopen_rules'] ? 'on' : 'off'; $config['installedpackages']['suricata']['config'][0]['enable_etpro_rules'] = $_POST['enable_etpro_rules'] ? 'on' : 'off'; $config['installedpackages']['suricata']['config'][0]['autogeoipupdate'] = $_POST['autogeoipupdate'] ? 'on' : 'off'; + $config['installedpackages']['suricata']['config'][0]['hide_deprecated_rules'] = $_POST['hide_deprecated_rules'] ? 'on' : 'off'; // If any rule sets are being turned off, then remove them // from the active rules section of each interface. Start @@ -135,6 +137,12 @@ if (!$input_errors) { } } + // If deprecated rules should be removed, then do it + if ($config['installedpackages']['suricata']['config'][0]['hide_deprecated_rules'] == "on") { + log_error(gettext("[Suricata] Hide Deprecated Rules is enabled. Removing obsoleted rules categories.")); + suricata_remove_dead_rules(); + } + $config['installedpackages']['suricata']['config'][0]['snort_rules_file'] = $_POST['snort_rules_file']; $config['installedpackages']['suricata']['config'][0]['oinkcode'] = $_POST['oinkcode']; $config['installedpackages']['suricata']['config'][0]['etprocode'] = $_POST['etprocode']; @@ -328,6 +336,13 @@ if ($input_errors) + + + /> +   " . gettext("Not Checked") . "" . gettext("."); ?> + -- cgit v1.2.3