From 09e08e73db624cd24e072dba970a88b8b07c0dab Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 25 Sep 2006 03:57:15 +0000 Subject: * Hard code binary paths * Show both tabs --- packages/snort/snort_download_rules.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'packages') diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php index 3958937b..7537df5c 100644 --- a/packages/snort/snort_download_rules.php +++ b/packages/snort/snort_download_rules.php @@ -49,7 +49,7 @@ include("head.inc"); @@ -100,12 +100,13 @@ if(!$oinkid) { /* setup some variables */ $snort_filename = "snortrules-snapshot-CURRENT.tar.gz"; +$snort_filename_md5 = "snortrules-snapshot-CURRENT.tar.gz.md5"; $dl = "http://www.snort.org/pub-bin/oinkmaster.cgi/{$oinkid}/{$snort_filename}"; -$dl_md5 = "http://www.snort.org/pub-bin/oinkmaster.cgi/{$oinkid}/{$snort_filename}.md5"; +$dl_md5 = "http://www.snort.org/pub-bin/oinkmaster.cgi/{$oinkid}/{$snort_filename_md5}"; /* multi user system, request new filename and create directory */ $tmpfname = tempnam("/tmp", "snortRules"); -exec("rm -rf {$tmpfname}; mkdir -p {$tmpfname}"); +exec("/bin/rm -rf {$tmpfname};/bin/mkdir -p {$tmpfname}"); /* download snort rules */ $static_output = gettext("Downloading current snort rules... "); @@ -116,8 +117,8 @@ verify_downloaded_file($tmpfname . "/{$snort_filename}"); /* download snort rules md5 file */ $static_output = gettext("Downloading current snort rules md5... "); update_all_status($static_output); -download_file_with_progress_bar($dl_md5, $tmpfname . "/{$snort_filename}.md5"); -verify_downloaded_file($tmpfname . "/{$snort_filename}.md5"); +download_file_with_progress_bar($dl_md5, $tmpfname . "/{$snort_filename_md5}"); +verify_downloaded_file($tmpfname . "/{$snort_filename_md5}"); /* verify downloaded rules signature */ verify_snort_rules_md5($tmpfname); @@ -129,7 +130,7 @@ $static_output = gettext("Your snort rules are now up to date."); update_all_status($static_output); /* cleanup temporary directory */ -exec("rm -rf {$tmpfname};"); +exec("/bin/rm -rf {$tmpfname};"); /* hide progress bar and lets end this party */ hide_progress_bar_status(); @@ -142,7 +143,7 @@ hide_progress_bar_status(); $file_md5_ondisk) { $static_output = gettext("md5 signature of rules mismatch."); update_all_status($static_output); @@ -202,10 +203,12 @@ function verify_snort_rules_md5($tmpfname) { } function hide_progress_bar_status() { + global $snort_filename, $snort_filename_md5; echo "\n"; } function update_all_status($status) { + global $snort_filename, $snort_filename_md5; update_status($status); update_output_window($status); } -- cgit v1.2.3