|
1 | 1 | ### Test the SecStatusEngine |
2 | 2 |
|
3 | | -# On |
4 | | -{ |
5 | | - type => "misc", |
6 | | - comment => "Setting SecStatusEngine to On", |
7 | | - conf => qq( |
8 | | - SecRuleEngine On |
9 | | - SecStatusEngine On |
10 | | - ), |
11 | | - match_log => { |
12 | | - error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], |
13 | | - -error => [ qr/Status engine is currently disabled, enable it by set SecStatusEngine to On/, 1], |
14 | | - }, |
15 | | - match_response => { |
16 | | - status => qr/^200$/, |
17 | | - }, |
18 | | - request => new HTTP::Request( |
19 | | - POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
20 | | - [ |
21 | | - "Content-Type" => "application/x-www-form-urlencoded", |
22 | | - ], |
23 | | - "arg1=val1&arg2=val2", |
24 | | - ), |
25 | | -}, |
| 3 | +## On |
| 4 | +#{ |
| 5 | +# type => "misc", |
| 6 | +# comment => "Setting SecStatusEngine to On", |
| 7 | +# conf => qq( |
| 8 | +# SecRuleEngine On |
| 9 | +# SecStatusEngine On |
| 10 | +# ), |
| 11 | +# match_log => { |
| 12 | +# error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], |
| 13 | +# -error => [ qr/Status engine is currently disabled, enable it by set SecStatusEngine to On/, 1], |
| 14 | +# }, |
| 15 | +# match_response => { |
| 16 | +# status => qr/^200$/, |
| 17 | +# }, |
| 18 | +# request => new HTTP::Request( |
| 19 | +# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
| 20 | +# [ |
| 21 | +# "Content-Type" => "application/x-www-form-urlencoded", |
| 22 | +# ], |
| 23 | +# "arg1=val1&arg2=val2", |
| 24 | +# ), |
| 25 | +#}, |
26 | 26 | # Off |
27 | 27 | { |
28 | 28 | type => "misc", |
|
46 | 46 | "arg1=val1&arg2=val2", |
47 | 47 | ), |
48 | 48 | }, |
49 | | -# On and SecServerSignature |
50 | | -{ |
51 | | - type => "misc", |
52 | | - comment => "SecStatusEngine On using SecServerSignature", |
53 | | - conf => qq( |
54 | | - SecRuleEngine On |
55 | | - SecServerSignature "SpiderServer v0.1a" |
56 | | - SecStatusEngine On |
57 | | - ), |
58 | | - match_log => { |
59 | | - error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], |
60 | | - -error => [ qr/StatusEngine call: .*SpiderServer v0.1a.*/, 1], |
61 | | - }, |
62 | | - match_response => { |
63 | | - status => qr/^200$/, |
64 | | - }, |
65 | | - request => new HTTP::Request( |
66 | | - POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
67 | | - [ |
68 | | - "Content-Type" => "application/x-www-form-urlencoded", |
69 | | - ], |
70 | | - "arg1=val1&arg2=val2", |
71 | | - ), |
72 | | -}, |
73 | | -# On and SecServerSignature |
74 | | -{ |
75 | | - type => "misc", |
76 | | - comment => "SecStatusEngine On/SecServerSignature - checking signature", |
77 | | - conf => qq( |
78 | | - SecRuleEngine On |
79 | | - SecServerSignature "SpiderServer v0.1a" |
80 | | - SecStatusEngine On |
81 | | - ), |
82 | | - match_log => { |
83 | | - error => { |
84 | | - apache => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1], |
85 | | - nginx => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 1], |
86 | | - } |
87 | | - }, |
88 | | - match_response => { |
89 | | - status => qr/^200$/, |
90 | | - }, |
91 | | - request => new HTTP::Request( |
92 | | - POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
93 | | - [ |
94 | | - "Content-Type" => "application/x-www-form-urlencoded", |
95 | | - ], |
96 | | - "arg1=val1&arg2=val2", |
97 | | - ), |
98 | | -}, |
99 | | -# On and SecServerSignature |
100 | | -{ |
101 | | - type => "misc", |
102 | | - comment => "SecStatusEngine On - checking signature", |
103 | | - conf => qq( |
104 | | - SecStatusEngine On |
105 | | - ), |
106 | | - match_log => { |
107 | | - error => { |
108 | | - apache => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1], |
109 | | - nginx => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 1], |
110 | | - } |
111 | | - }, |
112 | | - match_response => { |
113 | | - status => qr/^200$/, |
114 | | - }, |
115 | | - request => new HTTP::Request( |
116 | | - POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
117 | | - [ |
118 | | - "Content-Type" => "application/x-www-form-urlencoded", |
119 | | - ], |
120 | | - "arg1=val1&arg2=val2", |
121 | | - ), |
122 | | -}, |
| 49 | +## On and SecServerSignature |
| 50 | +#{ |
| 51 | +# type => "misc", |
| 52 | +# comment => "SecStatusEngine On using SecServerSignature", |
| 53 | +# conf => qq( |
| 54 | +# SecRuleEngine On |
| 55 | +# SecServerSignature "SpiderServer v0.1a" |
| 56 | +# SecStatusEngine On |
| 57 | +# ), |
| 58 | +# match_log => { |
| 59 | +# error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], |
| 60 | +# -error => [ qr/StatusEngine call: .*SpiderServer v0.1a.*/, 1], |
| 61 | +# }, |
| 62 | +# match_response => { |
| 63 | +# status => qr/^200$/, |
| 64 | +# }, |
| 65 | +# request => new HTTP::Request( |
| 66 | +# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
| 67 | +# [ |
| 68 | +# "Content-Type" => "application/x-www-form-urlencoded", |
| 69 | +# ], |
| 70 | +# "arg1=val1&arg2=val2", |
| 71 | +# ), |
| 72 | +#}, |
| 73 | +## On and SecServerSignature |
| 74 | +#{ |
| 75 | +# type => "misc", |
| 76 | +# comment => "SecStatusEngine On/SecServerSignature - checking signature", |
| 77 | +# conf => qq( |
| 78 | +# SecRuleEngine On |
| 79 | +# SecServerSignature "SpiderServer v0.1a" |
| 80 | +# SecStatusEngine On |
| 81 | +# ), |
| 82 | +# match_log => { |
| 83 | +# error => { |
| 84 | +# apache => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1], |
| 85 | +# nginx => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 1], |
| 86 | +# } |
| 87 | +# }, |
| 88 | +# match_response => { |
| 89 | +# status => qr/^200$/, |
| 90 | +# }, |
| 91 | +# request => new HTTP::Request( |
| 92 | +# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
| 93 | +# [ |
| 94 | +# "Content-Type" => "application/x-www-form-urlencoded", |
| 95 | +# ], |
| 96 | +# "arg1=val1&arg2=val2", |
| 97 | +# ), |
| 98 | +#}, |
| 99 | +## On and SecServerSignature |
| 100 | +#{ |
| 101 | +# type => "misc", |
| 102 | +# comment => "SecStatusEngine On - checking signature", |
| 103 | +# conf => qq( |
| 104 | +# SecStatusEngine On |
| 105 | +# ), |
| 106 | +# match_log => { |
| 107 | +# error => { |
| 108 | +# apache => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1], |
| 109 | +# nginx => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 1], |
| 110 | +# } |
| 111 | +# }, |
| 112 | +# match_response => { |
| 113 | +# status => qr/^200$/, |
| 114 | +# }, |
| 115 | +# request => new HTTP::Request( |
| 116 | +# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", |
| 117 | +# [ |
| 118 | +# "Content-Type" => "application/x-www-form-urlencoded", |
| 119 | +# ], |
| 120 | +# "arg1=val1&arg2=val2", |
| 121 | +# ), |
| 122 | +#}, |
123 | 123 |
|
0 commit comments