From 4c10a1c2f3e961c0b6bc55cd062d46e4fe7ae2b2 Mon Sep 17 00:00:00 2001 From: robiscool Date: Mon, 28 Dec 2009 17:12:32 -0800 Subject: snort-dev, add code to rules.php, code speed up start --- config/snort-dev/snort_gui.inc | 5 ----- config/snort-dev/snort_rules.php | 16 ++++++++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/config/snort-dev/snort_gui.inc b/config/snort-dev/snort_gui.inc index d8743b43..1746ab54 100644 --- a/config/snort-dev/snort_gui.inc +++ b/config/snort-dev/snort_gui.inc @@ -40,11 +40,6 @@ function print_info_box_np2($msg) { echo " \n"; echo " {$msg}\n"; echo " "; - if(stristr($msg, "apply") == true) { - echo " "; - echo " \n"; - echo " "; - } echo " \n"; echo " \n"; echo " \n"; diff --git a/config/snort-dev/snort_rules.php b/config/snort-dev/snort_rules.php index 2a9d4f2f..bc2f481d 100644 --- a/config/snort-dev/snort_rules.php +++ b/config/snort-dev/snort_rules.php @@ -29,6 +29,7 @@ */ require("guiconfig.inc"); require("config.inc"); +require("/usr/local/pkg/snort/snort_gui.inc"); if (!is_array($config['installedpackages']['snortglobal']['rule'])) { $config['installedpackages']['snortglobal']['rule'] = array(); @@ -384,17 +385,16 @@ else if ($_GET['act'] == "toggle") } -//if ($GET['saved'] == 'yes') -//{ - $message = "The Snort rule configuration has been changed.
You must apply the changes in order for them to take effect."; - echo "please work"; +if ($_GET['saved'] == 'yes') +{ + $message = "The Snort rule configuration has been changed.
You must restart this snort interface in order for the changes to take effect."; + // stop_service("snort"); // sleep(2); // start_service("snort"); // $savemsg = ""; // $stopMsg = false; - -//} +} $currentruleset = basename($file); @@ -409,7 +409,7 @@ include("head.inc"); "; ?> - +