";
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\: (.*)\", $text, $matches))
$last_update_date = trim($matches[1][0]);
echo " |
";
if($last_update_date)
echo "Last snort.org rule update: | {$last_update_date} | ";
if($last_ruleset_download)
echo "You last updated the ruleset: | {$last_ruleset_download} | ";
else
echo "You last updated the ruleset: | NEVER | ";
echo " ";
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. |
";
} 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 "Press here to start download. |
";
else
echo "Your snort rulesets are up to date. |
";
}
echo "";
echo " ";
echo "