diff options
author | Ermal <eri@pfsense.org> | 2012-07-18 21:48:15 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-07-18 21:48:15 +0000 |
commit | 97e40815938fbedd6a0d3018d7a0405ee1a161d7 (patch) | |
tree | 551113388bb22052ace61f39eab8765303ca606d | |
parent | fb9000df2131ee7ed51e99fbac7a8d9a2d7a5065 (diff) | |
download | pfsense-packages-97e40815938fbedd6a0d3018d7a0405ee1a161d7.tar.gz pfsense-packages-97e40815938fbedd6a0d3018d7a0405ee1a161d7.tar.bz2 pfsense-packages-97e40815938fbedd6a0d3018d7a0405ee1a161d7.zip |
Tune the regex
-rw-r--r-- | config/snort/snort_check_for_rule_updates.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index f6299faa..6c6440e9 100644 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -158,12 +158,10 @@ if ($emergingthreats == "on") { /* Normalize rulesets */ $sedcmd = "s/^#alert/# alert/g\n"; $sedcmd .= "s/^##alert/# alert/g\n"; -$sedcmd .= "s/^# alert/# alert/g\n"; -$sedcmd .= "s/^#\\talert/# alert/g\n"; -$sedcmd .= "s/^##i\talert/# alert/g\n"; +$sedcmd .= "s/^#[ \\t#]*alert/# alert/g\n"; +$sedcmd .= "s/^##\\talert/# alert/g\n"; $sedcmd .= "s/^\\talert/alert/g\n"; -$sedcmd .= "s/^ alert/alert/g\n"; -$sedcmd .= "s/^ alert/alert/g\n"; +$sedcmd .= "s/^[ \\t]*alert/alert/g\n"; @file_put_contents("{$snortdir}/tmp/sedcmd", $sedcmd); /* Untar snort rules file individually to help people with low system specs */ |