"; echo ""; echo ""; echo "
"; echo "
"; echo ""; echo ""; echo ""; } else { /* get time stamps for comparison operations */ $date1ts = strtotime($last_ruleset_download); $date2ts = strtotime($last_ruleset_download); /* is there a newer ruleset available? */ if($date1ts > $date2ts or !$last_ruleset_download) echo ""; else echo ""; } echo ""; echo " "; echo "
"; $last_ruleset_download = $config['installedpackages']['snort']['last_ruleset_download']; $text = file_get_contents("http://www.snort.org/pub-bin/downloads.cgi"); if (preg_match_all("/.*RELEASED\: (.*)\"; if($last_update_date) echo ""; if($last_ruleset_download) echo ""; else echo ""; echo "
Last snort.org rule update:{$last_update_date}
You last updated the ruleset:{$last_ruleset_download}
You last updated the ruleset:NEVER
"; if(!$oinkid) { echo "
You must obtain an oinkid from snort.com and set its value in the Snort settings tab in order to start the download process.
Press here to start download.
Your snort rulesets are up to date.
"; echo "
"; echo "
"; include("fend.inc"); exit; } ?>
/images/misc/progress_bar.gif' width='280' height='23' name='progressbar' id='progressbar' alt='' />

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The following error occured while downloading the snort rules file from snort.org:

{$contents}

 

 

 

 

 

 

 

"; scroll_down_to_bottom_of_page(); exit; } } function scroll_down_to_bottom_of_page() { global $snort_filename; ob_flush(); echo "\n"; } function verify_downloaded_file($filename) { global $snort_filename, $snort_filename_md5; ob_flush(); if(filesize($filename)<99500) { update_all_status("Checking {$filename}..."); check_for_common_errors($filename); } update_all_status("Verifying {$filename}..."); if(!file_exists($filename)) { update_all_status("Could not fetch snort rules ({$filename}). Check oinkid key and dns and try again."); hide_progress_bar_status(); exit; } update_all_status("Verifyied {$filename}."); } function extract_snort_rules_md5($tmpfname) { global $snort_filename, $snort_filename_md5; ob_flush(); $static_output = gettext("Extracting snort rules..."); update_all_status($static_output); exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C /usr/local/etc/snort/"); $static_output = gettext("Snort rules extracted."); update_all_status($static_output); } function verify_snort_rules_md5($tmpfname) { global $snort_filename, $snort_filename_md5; ob_flush(); $static_output = gettext("Verifying md5 signature..."); update_all_status($static_output); $md5 = file_get_contents("{$tmpfname}/{$snort_filename_md5}"); $file_md5_ondisk = `/sbin/md5 {$tmpfname}/{$snort_filename} | /usr/bin/awk '{ print $4 }'`; if($md5 <> $file_md5_ondisk) { $static_output = gettext("md5 signature of rules mismatch."); update_all_status($static_output); hide_progress_bar_status(); exit; } } function hide_progress_bar_status() { global $snort_filename, $snort_filename_md5; ob_flush(); echo "\n"; } function update_all_status($status) { global $snort_filename, $snort_filename_md5; ob_flush(); update_status($status); update_output_window($status); } ?>