aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev2/snort_download_rules.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/snort-dev2/snort_download_rules.php')
-rw-r--r--config/snort-dev2/snort_download_rules.php52
1 files changed, 26 insertions, 26 deletions
diff --git a/config/snort-dev2/snort_download_rules.php b/config/snort-dev2/snort_download_rules.php
index 7d61240e..3e6b41b3 100644
--- a/config/snort-dev2/snort_download_rules.php
+++ b/config/snort-dev2/snort_download_rules.php
@@ -388,20 +388,20 @@ if ($snortdownload == 'on')
if ($snort_md5_check_ok != 'on') {
if (file_exists("{$tmpfname}/{$snort_filename}")) {
- // find out if were in 1.2.3-RELEASE
- $pfsense_ver_chk = exec('/bin/cat /etc/version');
- if ($pfsense_ver_chk === '1.2.3-RELEASE') {
- $pfsense_stable = 'yes';
- }else{
- $pfsense_stable = 'no';
+ // find out if were in 1.2.3-RELEASE
+ $pfsense_ver_chk = exec('/bin/cat /etc/version');
+ if ($pfsense_ver_chk === '1.2.3-RELEASE') {
+ $pfsense_stable = 'yes';
+ }else{
+ $pfsense_stable = 'no';
}
- // get the system arch
- $snort_arch_ck = exec('/usr/bin/uname -m');
- if ($snort_arch_ck === 'i386') {
- $snort_arch = 'i386';
- }else{
- $snort_arch = 'x86-64'; // amd64
+ // get the system arch
+ $snort_arch_ck = exec('/usr/bin/uname -m');
+ if ($snort_arch_ck === 'i386') {
+ $snort_arch = 'i386';
+ }else{
+ $snort_arch = 'x86-64'; // amd64
}
if ($pfsense_stable === 'yes') {
@@ -419,19 +419,19 @@ if ($snortdownload == 'on')
chdir ("/usr/local/etc/snort/rules");
sleep(2);
- $snort_dirList = scandir("{$snortdir_rules}/rules"); // Waning: only in php 5
+ $snort_dirList = scandir("{$snortdir_rules}/rules"); // Waning: only in php 5
$snortrules_filterList = snortscandirfilter($snort_dirList, '/.*\.rules/', '/\.rules/', '');
- if (!empty($snortrules_filterList)) {
- foreach ($snortrules_filterList as $snort_rule_move)
- {
- exec("/bin/mv -f {$snortdir}/rules/{$snort_rule_move}.rules {$snortdir}/rules/snort_{$snort_rule_move}.rules");
- }
+ if (!empty($snortrules_filterList)) {
+ foreach ($snortrules_filterList as $snort_rule_move)
+ {
+ exec("/bin/mv -f {$snortdir}/rules/{$snort_rule_move}.rules {$snortdir}/rules/snort_{$snort_rule_move}.rules");
+ }
}
- /* extract so rules */
- exec('/bin/mkdir -p /usr/local/lib/snort/dynamicrules/');
- exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir} so_rules/precompiled/$freebsd_version_so/{$snort_arch}/2.9.2.2/");
+ /* extract so rules */
+ exec('/bin/mkdir -p /usr/local/lib/snort/dynamicrules/');
+ exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir} so_rules/precompiled/$freebsd_version_so/{$snort_arch}/2.9.2.2/");
exec("/bin/mv -f {$snortdir}/so_rules/precompiled/$freebsd_version_so/{$snort_arch}/2.9.2.2/* /usr/local/lib/snort/dynamicrules/");
/* extract so rules none bin and rename */
@@ -475,13 +475,13 @@ if ($snortdownload == 'on')
//// rob
- // list so_rules and exclude dir
+ // list so_rules and exclude dir
exec("/usr/bin/tar --exclude='precompiled' --exclude='src' -tf {$tmpfname}/{$snort_filename} so_rules", $so_rules_list);
- $so_rulesPattr = array('/\//', '/\.rules/');
- $so_rulesPattw = array('', '');
-
- // build list of so rules
+ $so_rulesPattr = array('/\//', '/\.rules/');
+ $so_rulesPattw = array('', '');
+
+ // build list of so rules
$so_rules_filterList = snortscandirfilter($so_rules_list, '/\/.*\.rules/', $so_rulesPattr, $so_rulesPattw);
//// end