aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_download_updates.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-12-18 00:03:40 -0800
committerErmal Luçi <eri@pfsense.org>2013-12-18 00:03:40 -0800
commit3d70590e1cd0a7b8bd309dd9d6b1f0278c3c197e (patch)
treec8823be639d342253b5cc26fdd28a861c3e9c0a4 /config/snort/snort_download_updates.php
parent419fe8a7818856bcc6badb4e8d601f0e01f31f5c (diff)
parentd1cf8edc0e9b4e4ad3ae0d14613047de4bfa2c90 (diff)
downloadpfsense-packages-3d70590e1cd0a7b8bd309dd9d6b1f0278c3c197e.tar.gz
pfsense-packages-3d70590e1cd0a7b8bd309dd9d6b1f0278c3c197e.tar.bz2
pfsense-packages-3d70590e1cd0a7b8bd309dd9d6b1f0278c3c197e.zip
Merge pull request #558 from bmeeks8/master
Snort Package 3.0.1 Update
Diffstat (limited to 'config/snort/snort_download_updates.php')
-rwxr-xr-xconfig/snort/snort_download_updates.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/snort/snort_download_updates.php b/config/snort/snort_download_updates.php
index 1db5b6a0..5c9b8210 100755
--- a/config/snort/snort_download_updates.php
+++ b/config/snort/snort_download_updates.php
@@ -43,9 +43,14 @@ $log = $snort_rules_upd_log;
/* Grab the Snort binary version programmatically and */
/* use it to construct the proper Snort VRT rules */
-/* tarball filename. */
+/* tarball filename. Fallback to a safe default if */
+/* we fail. */
+$snortver = array();
exec("/usr/local/bin/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver);
+if (empty($snortver[0]))
+ $snortver[0] = "2.9.5.5";
$snortver[0] = str_replace(".", "", $snortver[0]);
+
$snort_rules_file = "snortrules-snapshot-{$snortver[0]}.tar.gz";
//$snort_rules_file = VRT_DNLD_FILENAME;
$snort_community_rules_filename = GPLV2_DNLD_FILENAME;