summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/libxt_string.c2
-rw-r--r--tests/options-most.rules4
2 files changed, 5 insertions, 1 deletions
diff --git a/extensions/libxt_string.c b/extensions/libxt_string.c
index 472035fb..fb15980e 100644
--- a/extensions/libxt_string.c
+++ b/extensions/libxt_string.c
@@ -242,7 +242,7 @@ print_string(const char *str, const unsigned short int len)
unsigned int i;
printf(" \"");
for (i=0; i < len; i++) {
- if (str[i] == '\"') /* escape any embedded quotes */
+ if (str[i] == '\"' || str[i] == '\\')
putchar('\\');
printf("%c", (unsigned char) str[i]);
}
diff --git a/tests/options-most.rules b/tests/options-most.rules
index e54eb127..ae28b82d 100644
--- a/tests/options-most.rules
+++ b/tests/options-most.rules
@@ -128,6 +128,10 @@
-A matches
-A matches -m statistic --mode nth ! --every 5 --packet 2
-A matches
+-A matches -m string --hex-string "action=|5C22|http|3A|" --algo bm
+-A matches
+-A matches -m string --hex-string "action=|5C|http|3A|" --algo bm
+-A matches
-A matches -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05 --localtz
-A matches
-A matches -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05 --kerneltz