diff options
author | Scott Ullrich <sullrich@scott-ullrichs-mac-pro.local> | 2009-02-09 13:51:03 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@scott-ullrichs-mac-pro.local> | 2009-02-09 13:51:03 -0500 |
commit | 9f814f036b5cfb4c026bdee980f0d746bdbbec89 (patch) | |
tree | dbf9ff18cda8eacf47546331885323bcb4eec8e9 /config/snort | |
parent | b79fa46fc7b32176ce7f925b31b6bd62e51b07d2 (diff) | |
download | pfsense-packages-9f814f036b5cfb4c026bdee980f0d746bdbbec89.tar.gz pfsense-packages-9f814f036b5cfb4c026bdee980f0d746bdbbec89.tar.bz2 pfsense-packages-9f814f036b5cfb4c026bdee980f0d746bdbbec89.zip |
Fix snort download information
Diffstat (limited to 'config/snort')
-rw-r--r-- | config/snort/snort_download_rules.php | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/config/snort/snort_download_rules.php b/config/snort/snort_download_rules.php index 6326a5fe..bc37f5d8 100644 --- a/config/snort/snort_download_rules.php +++ b/config/snort/snort_download_rules.php @@ -178,13 +178,30 @@ ob_flush(); /* setup some variables */ $premium_subscriber = ""; -if($config['installedpackages']['snortadvanced']['config'][0]['subscriber']) + +/* Snort version */ +$snort_version = "2.8"; + +/* Are we using the premium subscriber subscription? */ +if($config['installedpackages']['snortadvanced']['config'][0]['subscriber']) { + // http://www.snort.org/pub-bin/downloads.cgi/Download/sub_rules/snortrules-snapshot-CURRENT_s.tar.gz.md5 $premium_subscriber = "_s"; -$snort_filename = "snortrules-snapshot-CURRENT{$premium_subscriber}.tar.gz"; -$snort_filename_md5 = "snortrules-snapshot-CURRENT.tar.gz.md5"; + $snort_download_prefix = "http://www.snort.org/pub-bin/oinkmaster.cgi"; +} else { + // http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_os/snortrules-snapshot-CURRENT.tar.gz.md5 + $snort_download_prefix = "http://www.snort.org/pub-bin/oinkmaster.cgi"; +} + +/* Set snort rules download filename */ +$snort_filename = "snortrules-snapshot-{$snort_version}{$premium_subscriber}.tar.gz"; +$snort_filename_md5 = "snortrules-snapshot-{$snort_version}{$premium_subscriber}.tar.gz.md5"; + +/* Set user agent to Mozilla */ ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)'); -$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}"; + +/* Set download URL */ +$dl = "{$snort_download_prefix}/{$oinkid}/{$snort_filename}"; +$dl_md5 = "{$snort_download_prefix}/{$oinkid}/{$snort_filename_md5}"; /* multi user system, request new filename and create directory */ $tmpfname = tempnam("/tmp", "snortRules"); |