From 66b707c4573b14c71097f58e4f9ad5181b5747ac Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 16 Jul 2012 13:44:25 +0000 Subject: Remove reset button and enable_change --- config/snort/snort_interfaces_global.php | 87 ++++---------------------------- 1 file changed, 9 insertions(+), 78 deletions(-) (limited to 'config/snort/snort_interfaces_global.php') diff --git a/config/snort/snort_interfaces_global.php b/config/snort/snort_interfaces_global.php index 005e1fdd..cbd49b94 100644 --- a/config/snort/snort_interfaces_global.php +++ b/config/snort/snort_interfaces_global.php @@ -91,71 +91,6 @@ if (!$input_errors) { } } - -if ($_POST["Reset"]) { - - function snort_deinstall_settings() { - global $config, $g, $id, $if_real, $snortdir; - - exec("/usr/usr/bin/killall snort"); - sleep(2); - exec("/usr/usr/bin/killall -9 snort"); - sleep(2); - exec("/usr/usr/bin/killall barnyard2"); - sleep(2); - exec("/usr/usr/bin/killall -9 barnyard2"); - sleep(2); - - /* Remove snort cron entries Ugly code needs smoothness*/ - if (!function_exists('snort_deinstall_cron')) { - function snort_deinstall_cron($cronmatch) { - global $config, $g; - - - if(!$config['cron']['item']) - return; - - $x=0; - $is_installed = false; - foreach($config['cron']['item'] as $item) { - if (strstr($item['command'], $cronmatch)) { - $is_installed = true; - break; - } - $x++; - } - if($is_installed == true) - unset($config['cron']['item'][$x]); - - configure_cron(); - } - } - - snort_deinstall_cron("snort2c"); - snort_deinstall_cron("snort_check_for_rule_updates.php"); - - - /* Unset snort registers in conf.xml IMPORTANT snort will not start with out this */ - /* Keep this as a last step */ - unset($config['installedpackages']['snortglobal']); - - /* remove all snort iface dir */ - exec("rm -r {$snortdir}/snort_*"); - exec('rm /var/log/snort/*'); - } - - snort_deinstall_settings(); - write_config(); /* XXX */ - - header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); - header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); - header( 'Cache-Control: no-store, no-cache, must-revalidate' ); - header( 'Cache-Control: post-check=0, pre-check=0', false ); - header( 'Pragma: no-cache' ); - header("Location: /snort/snort_interfaces_global.php"); - exit; -} - $pgtitle = 'Services: Snort: Global Settings'; include_once("head.inc"); @@ -202,13 +137,13 @@ if ($input_errors) @@ -279,13 +214,13 @@ if ($input_errors)
> Do NOT Install
> Install Basic Rules or Premium rules
          - onClick="enable_change(false)">
+ >
Emerging Threats is an open source community that produces fastest moving and diverse Snort Rules.
- - -- cgit v1.2.3
> Enable directory size limit (Default)
> Disable directory size limit

@@ -331,17 +266,13 @@ if ($input_errors)
- onClick="enable_change(false)">
+ >
Settings will not be removed during deinstall.
 WARNING:
- This will reset all global and interface settings.
+ + +