aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorPerry Mason <crazypark2@yahoo.dk>2009-02-09 20:33:01 +0100
committerPerry Mason <crazypark2@yahoo.dk>2009-02-09 20:33:01 +0100
commit38563692dc156a16ef59027ef322a5fbb4085a82 (patch)
tree1a1d7eff65561c4fa0a0af6f3a0f34fc364ce203 /config
parent6dcf7659b156d598d960d440fa80a5de1756b187 (diff)
parent914898c0ff3c522e81e744bcc46fc27da7d4927a (diff)
downloadpfsense-packages-38563692dc156a16ef59027ef322a5fbb4085a82.tar.gz
pfsense-packages-38563692dc156a16ef59027ef322a5fbb4085a82.tar.bz2
pfsense-packages-38563692dc156a16ef59027ef322a5fbb4085a82.zip
Merge branch 'master' of http://gitweb.pfsense.org/pfsense-packages/mainline
Diffstat (limited to 'config')
-rw-r--r--config/snort/snort_download_rules.php27
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");