1[
2  {
3    "enabled": 1,
4    "version_min": 300000,
5    "version_max": 0,
6    "title": "Testing variable variations :: count (1/3)",
7    "client": {
8      "ip": "200.249.12.31",
9      "port": 2313
10    },
11    "server": {
12      "ip": "200.249.12.31",
13      "port": 80
14    },
15    "request": {
16      "headers": {
17        "User-Agent": "Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)",
18        "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8",
19        "Accept-Language": "en-us,en;q=0.5",
20        "Accept-Encoding": "gzip,deflate",
21        "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
22        "Keep-Alive": "300",
23        "Connection": "keep-alive",
24        "Cookie": "PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120",
25        "Pragma": "no-cache",
26        "Cache-Control": "no-cache"
27      },
28      "uri": "\/test.pl?param1=   test   &param2=test2",
29      "method": "GET",
30      "http_version": 1.1,
31      "body": ""
32    },
33    "response": {
34      "headers": {
35        "Content-Type": "text\/xml; charset=utf-8\n\r",
36        "Content-Length": "length\n\r"
37      },
38      "body": [
39        "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\r",
40        "<soap:Envelope xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\n\r",
41        "  <soap:Body>\n\r",
42        "  <EnlightenResponse xmlns=\"http:\/\/clearforest.com\/\">\n\r",
43        "  <EnlightenResult>string<\/EnlightenResult>\n\r",
44        "  <\/EnlightenResponse>\n\r",
45        "  <\/soap:Body>\n\r",
46        "<\/soap:Envelope>\n\r"
47      ]
48    },
49    "expected": {
50      "audit_log": "",
51      "debug_log": "Target value: \"10\" \\(Variable: REQUEST_HEADERS\\)",
52      "error_log": ""
53    },
54    "rules": [
55      "SecRuleEngine On",
56      "SecRule &REQUEST_HEADERS \"@contains test \" \"id:1,t:lowercase,t:none\""
57    ]
58  },
59  {
60    "enabled": 1,
61    "version_min": 300000,
62    "version_max": 0,
63    "title": "Testing variable variations :: count (2/3)",
64    "client": {
65      "ip": "200.249.12.31",
66      "port": 2313
67    },
68    "server": {
69      "ip": "200.249.12.31",
70      "port": 80
71    },
72    "request": {
73      "headers": {
74        "User-Agent": "Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)",
75        "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8",
76        "Accept-Language": "en-us,en;q=0.5",
77        "Accept-Encoding": "gzip,deflate",
78        "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
79        "Keep-Alive": "300",
80        "Connection": "keep-alive",
81        "Cookie": "PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120",
82        "Pragma": "no-cache",
83        "Cache-Control": "no-cache"
84      },
85      "uri": "\/test.pl?param1=   test   &param2=test2",
86      "method": "GET",
87      "http_version": 1.1,
88      "body": ""
89    },
90    "response": {
91      "headers": {
92        "Content-Type": "text\/xml; charset=utf-8\n\r",
93        "Content-Length": "length\n\r"
94      },
95      "body": [
96        "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\r",
97        "<soap:Envelope xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\n\r",
98        "  <soap:Body>\n\r",
99        "  <EnlightenResponse xmlns=\"http:\/\/clearforest.com\/\">\n\r",
100        "  <EnlightenResult>string<\/EnlightenResult>\n\r",
101        "  <\/EnlightenResponse>\n\r",
102        "  <\/soap:Body>\n\r",
103        "<\/soap:Envelope>\n\r"
104      ]
105    },
106    "expected": {
107      "audit_log": "",
108      "debug_log": "Target value: \"1\" \\(Variable: REQUEST_HEADERS:Accept\\)",
109      "error_log": ""
110    },
111    "rules": [
112      "SecRuleEngine On",
113      "SecRule &REQUEST_HEADERS:Accept \"@contains test \" \"id:1,t:lowercase,t:none\""
114    ]
115  },
116  {
117    "enabled": 1,
118    "version_min": 300000,
119    "version_max": 0,
120    "title": "Testing variable variations :: count (3/3)",
121    "client": {
122      "ip": "200.249.12.31",
123      "port": 2313
124    },
125    "server": {
126      "ip": "200.249.12.31",
127      "port": 80
128    },
129    "request": {
130      "headers": {
131        "User-Agent": "Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)",
132        "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8",
133        "Accept-Language": "en-us,en;q=0.5",
134        "Accept-Encoding": "gzip,deflate",
135        "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
136        "Keep-Alive": "300",
137        "Connection": "keep-alive",
138        "Cookie": "PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120",
139        "Pragma": "no-cache",
140        "Cache-Control": "no-cache"
141      },
142      "uri": "\/test.pl?param1=   test   &param2=test2",
143      "method": "GET",
144      "http_version": 1.1,
145      "body": ""
146    },
147    "response": {
148      "headers": {
149        "Content-Type": "text\/xml; charset=utf-8\n\r",
150        "Content-Length": "length\n\r"
151      },
152      "body": [
153        "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\r",
154        "<soap:Envelope xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\n\r",
155        "  <soap:Body>\n\r",
156        "  <EnlightenResponse xmlns=\"http:\/\/clearforest.com\/\">\n\r",
157        "  <EnlightenResult>string<\/EnlightenResult>\n\r",
158        "  <\/EnlightenResponse>\n\r",
159        "  <\/soap:Body>\n\r",
160        "<\/soap:Envelope>\n\r"
161      ]
162    },
163    "expected": {
164      "audit_log": "",
165      "debug_log": "Target value: \"0\" \\(Variable: REQUEST_HEADERS:missing\\)",
166      "error_log": ""
167    },
168    "rules": [
169      "SecRuleEngine On",
170      "SecRule &REQUEST_HEADERS:missing \"@contains test \" \"id:1,t:lowercase,t:none\""
171    ]
172  }
173]
174