From c95dc3d12fa8429d537a4e0543ec4965156a9eff Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 24 Sep 2010 11:42:56 -0400 Subject: Kill DOS format in the repo. autocrlf=true is your friend. --- config/snort/help_and_info.php | 2 +- config/snort/snort_check_cron_misc.inc | 160 ++++++++--------- config/snort/snort_check_for_rule_updates.php | 2 +- config/snort/snort_dynamic_ip_reload.php | 2 +- config/snort/snort_head.inc | 248 +++++++++++++------------- 5 files changed, 207 insertions(+), 207 deletions(-) (limited to 'config') diff --git a/config/snort/help_and_info.php b/config/snort/help_and_info.php index 215a055e..2ab05d07 100644 --- a/config/snort/help_and_info.php +++ b/config/snort/help_and_info.php @@ -244,4 +244,4 @@ Please do not email individuals, the coreteam address, or private message people '; -?> \ No newline at end of file +?> diff --git a/config/snort/snort_check_cron_misc.inc b/config/snort/snort_check_cron_misc.inc index 0beff5dc..a20b42b4 100644 --- a/config/snort/snort_check_cron_misc.inc +++ b/config/snort/snort_check_cron_misc.inc @@ -1,80 +1,80 @@ - 1, -// 'KB' => 1024, -// 'MB' => 1024 * 1024, -// 'GB' => 1024 * 1024 * 1024, -// 'TB' => 1024 * 1024 * 1024 * 1024, -// 'PB' => 1024 * 1024 * 1024 * 1024 * 1024, - - -/* chk if snort log dir is full if so clear it */ -$snortloglimit = $config['installedpackages']['snortglobal']['snortloglimit']; -$snortloglimitsize = $config['installedpackages']['snortglobal']['snortloglimitsize']; - -if ($g['booting']==true) { - exit(0); -} - -if ($snortloglimit == 'off') { - exit(0); -} - -$snortloglimitDSKsize = exec('/bin/df -k /var | grep -v "Filesystem" | awk \'{print $4}\''); - -$snortlogAlertsizeKB = snort_Getdirsize('/var/log/snort/alert'); -$snortloglimitAlertsizeKB = round($snortlogAlertsizeKB * .70); -$snortloglimitsizeKB = round($snortloglimitsize * 1024); - -/* do I need HUP kill ? */ -if (snort_Getdirsize('/var/log/snort/') >= $snortloglimitsizeKB ) { - - conf_mount_rw(); - if(file_exists('/var/log/snort/alert')) { - if ($snortlogAlertsizeKB >= $snortloglimitAlertsizeKB) { - exec('/bin/echo "" > /var/log/snort/alert'); - } - post_delete_logs(); - exec('/usr/sbin/chown snort:snort /var/log/snort/*'); - exec('/bin/chmod 660 /var/log/snort/*'); - //sleep(2); - //exec('/usr/bin/killall -HUP snort'); - } - conf_mount_ro(); - -} - - -?> \ No newline at end of file + 1, +// 'KB' => 1024, +// 'MB' => 1024 * 1024, +// 'GB' => 1024 * 1024 * 1024, +// 'TB' => 1024 * 1024 * 1024 * 1024, +// 'PB' => 1024 * 1024 * 1024 * 1024 * 1024, + + +/* chk if snort log dir is full if so clear it */ +$snortloglimit = $config['installedpackages']['snortglobal']['snortloglimit']; +$snortloglimitsize = $config['installedpackages']['snortglobal']['snortloglimitsize']; + +if ($g['booting']==true) { + exit(0); +} + +if ($snortloglimit == 'off') { + exit(0); +} + +$snortloglimitDSKsize = exec('/bin/df -k /var | grep -v "Filesystem" | awk \'{print $4}\''); + +$snortlogAlertsizeKB = snort_Getdirsize('/var/log/snort/alert'); +$snortloglimitAlertsizeKB = round($snortlogAlertsizeKB * .70); +$snortloglimitsizeKB = round($snortloglimitsize * 1024); + +/* do I need HUP kill ? */ +if (snort_Getdirsize('/var/log/snort/') >= $snortloglimitsizeKB ) { + + conf_mount_rw(); + if(file_exists('/var/log/snort/alert')) { + if ($snortlogAlertsizeKB >= $snortloglimitAlertsizeKB) { + exec('/bin/echo "" > /var/log/snort/alert'); + } + post_delete_logs(); + exec('/usr/sbin/chown snort:snort /var/log/snort/*'); + exec('/bin/chmod 660 /var/log/snort/*'); + //sleep(2); + //exec('/usr/bin/killall -HUP snort'); + } + conf_mount_ro(); + +} + + +?> diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index 51d403d9..79cc7a0b 100644 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -849,4 +849,4 @@ if (file_exists("/tmp/snort_download_halt.pid")) { /* script finnished make system read only again */ conf_mount_ro(); -?> \ No newline at end of file +?> diff --git a/config/snort/snort_dynamic_ip_reload.php b/config/snort/snort_dynamic_ip_reload.php index 94004b94..290b0e3b 100644 --- a/config/snort/snort_dynamic_ip_reload.php +++ b/config/snort/snort_dynamic_ip_reload.php @@ -44,4 +44,4 @@ sync_snort_package(); exec('/bin/rm /var/run/snort_dynamic_ip_reload.dirty'); -?> \ No newline at end of file +?> diff --git a/config/snort/snort_head.inc b/config/snort/snort_head.inc index 70dece63..ca3afc5e 100644 --- a/config/snort/snort_head.inc +++ b/config/snort/snort_head.inc @@ -1,124 +1,124 @@ - "") -$g['theme'] = $config['theme']; -else -$g['theme'] = "pfsense"; - -/* - * If this device is an apple ipod/iphone - * switch the theme to one that works with it. - */ -$apple_ua = array("iPhone","iPod", "iPad"); -foreach($apple_ua as $useragent) -if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) -$g['theme'] = "pfsense"; - -$pagetitle = gentitle( $pgtitle ); - -?> - - - -<?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?> - - - -"; ?> - - - - - - - - - - - - - - \n"; ?> -\n"; - echo "\t\n"; -} - -/* only load javascript that you need, jquery and prototype dont play together */ -//if ($snort_load_jquery == 'yes') { -echo "\t\n"; -//} -//if ($snort_load_jquery_colorbox == 'yes') { -echo "\t\n"; -echo "\t\n"; -//} -if ($snort_load_mootools == 'yes') { - echo "\t\n"; -} -if ($snort_load_sortabletable == 'yes') { - echo "\t\n"; -} - -/* some pfsense commercial versions require prototype to be in every tab on the GUI, for custom logos */ -echo "\t\n"; -// echo "\t\n"; -// echo "\t\n"; -// echo "\t\n"; -// echo "\t\n"; - -if(file_exists("{$g['www_path']}/javascript/global.js")) -echo "\t\n"; -/* - * Find all javascript files that need to be included - * for this page ... from the arrays ... :) - * Coded by: Erik Kristensen - */ - -$dir = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php'); -$path = "{$g['www_path']}/javascript/" . $dir . "/"; -if (is_dir($path)) { - if ($dh = opendir($path)) { - while (($file = readdir($dh)) !== false) { - if (is_dir($file)) - continue; - echo "\t\n"; - } - closedir($dh); - } -} - -if (!isset($closehead)) -echo ""; - -/* If this page is being remotely managed then do not allow the loading of the contents. */ -if($config['remote_managed_pages']['item']) { - foreach($config['remote_managed_pages']['item'] as $rmp) { - if($rmp == $_SERVER['SCRIPT_NAME']) { - include("fbegin.inc"); - print_info_box_np("This page is currently being managed by a remote machine."); - include("fend.inc"); - exit; - } - } -} - -?> \ No newline at end of file + "") +$g['theme'] = $config['theme']; +else +$g['theme'] = "pfsense"; + +/* + * If this device is an apple ipod/iphone + * switch the theme to one that works with it. + */ +$apple_ua = array("iPhone","iPod", "iPad"); +foreach($apple_ua as $useragent) +if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) +$g['theme'] = "pfsense"; + +$pagetitle = gentitle( $pgtitle ); + +?> + + + +<?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?> + + + +"; ?> + + + + + + + + + + + + + + \n"; ?> +\n"; + echo "\t\n"; +} + +/* only load javascript that you need, jquery and prototype dont play together */ +//if ($snort_load_jquery == 'yes') { +echo "\t\n"; +//} +//if ($snort_load_jquery_colorbox == 'yes') { +echo "\t\n"; +echo "\t\n"; +//} +if ($snort_load_mootools == 'yes') { + echo "\t\n"; +} +if ($snort_load_sortabletable == 'yes') { + echo "\t\n"; +} + +/* some pfsense commercial versions require prototype to be in every tab on the GUI, for custom logos */ +echo "\t\n"; +// echo "\t\n"; +// echo "\t\n"; +// echo "\t\n"; +// echo "\t\n"; + +if(file_exists("{$g['www_path']}/javascript/global.js")) +echo "\t\n"; +/* + * Find all javascript files that need to be included + * for this page ... from the arrays ... :) + * Coded by: Erik Kristensen + */ + +$dir = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php'); +$path = "{$g['www_path']}/javascript/" . $dir . "/"; +if (is_dir($path)) { + if ($dh = opendir($path)) { + while (($file = readdir($dh)) !== false) { + if (is_dir($file)) + continue; + echo "\t\n"; + } + closedir($dh); + } +} + +if (!isset($closehead)) +echo ""; + +/* If this page is being remotely managed then do not allow the loading of the contents. */ +if($config['remote_managed_pages']['item']) { + foreach($config['remote_managed_pages']['item'] as $rmp) { + if($rmp == $_SERVER['SCRIPT_NAME']) { + include("fbegin.inc"); + print_info_box_np("This page is currently being managed by a remote machine."); + include("fend.inc"); + exit; + } + } +} + +?> -- cgit v1.2.3