diff options
author | robiscool <robrob2626@yahoo.com> | 2010-05-26 21:23:49 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2010-05-26 21:23:49 -0700 |
commit | df86cce068c0c6f6e5c880c489336a847b44132a (patch) | |
tree | e715215f9d358b71f70751c4ef5863bd09d60933 /config/snort/snort_check_for_rule_updates.php | |
parent | 8c60e75c3818851807a4b1890f2cf5760a0ba2ba (diff) | |
download | pfsense-packages-df86cce068c0c6f6e5c880c489336a847b44132a.tar.gz pfsense-packages-df86cce068c0c6f6e5c880c489336a847b44132a.tar.bz2 pfsense-packages-df86cce068c0c6f6e5c880c489336a847b44132a.zip |
snort, update files to snort 2.8.6
Diffstat (limited to 'config/snort/snort_check_for_rule_updates.php')
-rw-r--r-- | config/snort/snort_check_for_rule_updates.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index ba953c73..9bc2d5b8 100644 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -211,7 +211,7 @@ if ($snortdownload == "basic" || $snortdownload == "premium") } else { echo "Downloading snort.org md5 file...\n"; ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)'); - $image = @file_get_contents("http://dl.snort.org/{$premium_url}/snortrules-snapshot-2.8{$premium_subscriber}.tar.gz.md5?oink_code={$oinkid}"); + $image = @file_get_contents("http://dl.snort.org/{$premium_url}/snortrules-snapshot-2860{$premium_subscriber}.tar.gz.md5?oink_code={$oinkid}"); // $image = @file_get_contents("http://www.mtest.local/pub-bin/oinkmaster.cgi/{$oinkid}/snortrules-snapshot-2.8{$premium_subscriber}.tar.gz.md5"); $f = fopen("{$tmpfname}/snortrules-snapshot-2.8.tar.gz.md5", 'w'); fwrite($f, $image); @@ -381,7 +381,7 @@ if ($snortdownload != "off") } else { echo "There is a new set of Snort.org rules posted. Downloading...\n"; echo "May take 4 to 10 min...\n"; - download_file_with_progress_bar2("http://dl.snort.org/{$premium_url}/snortrules-snapshot-2.8{$premium_subscriber}.tar.gz?oink_code={$oinkid}", $tmpfname . "/{$snort_filename}"); + download_file_with_progress_bar2("http://dl.snort.org/{$premium_url}/snortrules-snapshot-2860{$premium_subscriber}.tar.gz?oink_code={$oinkid}", $tmpfname . "/{$snort_filename}"); echo "Done downloading rules file.\n"; if (150000 > filesize("{$tmpfname}/{$snort_filename}")){ echo "Error with the snort rules download...\n"; @@ -455,6 +455,14 @@ if ($snortdownload != "off") { if ($snort_md5_check_ok != on) { if (file_exists("{$tmpfname}/{$snort_filename}")) { + + if ($pfsense_stable == 'yes') + { + $freebsd_version_so = 'FreeBSD-7-2'; + }else{ + $freebsd_version_so = 'FreeBSD-8-0'; + } + echo "Extracting Snort.org rules...\n"; echo "May take a while...\n"; /* extract snort.org rules and add prefix to all snort.org files*/ @@ -465,9 +473,9 @@ if ($snortdownload != "off") sleep(2); exec('/usr/local/bin/perl /usr/local/bin/snort_rename.pl s/^/snort_/ *.rules'); /* extract so rules */ - exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir} so_rules/precompiled/FreeBSD-7.0/i386/2.8.5.3/"); + exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir} so_rules/precompiled/$freebsd_version_so/i386/2.8.6.0/"); exec('/bin/mkdir -p /usr/local/lib/snort/dynamicrules/'); - exec("/bin/mv -f {$snortdir}/so_rules/precompiled/FreeBSD-7.0/i386/2.8.5.3/* /usr/local/lib/snort/dynamicrules/"); + exec("/bin/mv -f {$snortdir}/so_rules/precompiled/$freebsd_version_so/i386/2.8.6.0/* /usr/local/lib/snort/dynamicrules/"); /* extract so rules none bin and rename */ exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir} so_rules/bad-traffic.rules/" . " so_rules/chat.rules/" . |