make sure \!, <, >, and = are converted to hex equivalents
authorMichael Rash <mbr@cipherdyne.org>
Wed, 19 Sep 2012 00:43:11 +0000 (20:43 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Wed, 19 Sep 2012 00:43:11 +0000 (20:43 -0400)
fwsnort

diff --git a/fwsnort b/fwsnort
index cc11365..55c4a53 100755 (executable)
--- a/fwsnort
+++ b/fwsnort
@@ -2226,6 +2226,10 @@ sub convert_pattern_for_iptables() {
     $ipt_str =~ s/'/|27|/g;     ### ' -> |27|
     $ipt_str =~ s/\x2d/|2d|/g;  ### - -> |2d|
     $ipt_str =~ s/\x24/|24|/g;  ### $ -> |24|
+    $ipt_str =~ s/\x21/|21|/g;  ### ! -> |21|
+    $ipt_str =~ s/\x3c/|3c|/g;  ### < -> |3c|
+    $ipt_str =~ s/\x3e/|3e|/g;  ### > -> |3e|
+    $ipt_str =~ s/\x3d/|3d|/g;  ### = -> |3d|
 
     ### convert all escaped chars to their hex equivalents
     $ipt_str =~ s/\x5c(.)/sprintf "|%02x|", (ord($1))/eg;