48 static int RunTest(
const uint8_t *buf,
const uint32_t size,
const char *sig_str,
const int expect)
56 memset(&th_v, 0,
sizeof(th_v));
58 memset(&f, 0,
sizeof(f));
59 memset(&ssn, 0,
sizeof(ssn));
66 f.
proto = IPPROTO_TCP;
109 static int DetectEngineHttpHHTest01(
void)
111 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
113 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
114 uint32_t http_len =
sizeof(http_buf) - 1;
115 return RunTest(http_buf, http_len,
116 "alert http any any -> any any "
117 "(msg:\"http host header test\"; "
118 "content:\"connect\"; http_host; "
127 static int DetectEngineHttpHHTest02(
void)
130 "GET /index.html HTTP/1.0\r\n"
132 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
133 uint32_t http_len =
sizeof(http_buf) - 1;
134 return RunTest(http_buf, http_len,
135 "alert http any any -> any any "
136 "(msg:\"http host header test\"; "
137 "content:\"co\"; depth:4; http_host; "
146 static int DetectEngineHttpHHTest03(
void)
149 "GET /index.html HTTP/1.0\r\n"
151 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
152 uint32_t http_len =
sizeof(http_buf) - 1;
153 return RunTest(http_buf, http_len,
154 "alert http any any -> any any "
155 "(msg:\"http_host header test\"; "
156 "content:!\"ect\"; depth:4; http_host; "
165 static int DetectEngineHttpHHTest04(
void)
168 "GET /index.html HTTP/1.0\r\n"
170 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
171 uint32_t http_len =
sizeof(http_buf) - 1;
172 return RunTest(http_buf, http_len,
173 "alert http any any -> any any "
174 "(msg:\"http host header test\"; "
175 "content:\"ect\"; depth:4; http_host; "
184 static int DetectEngineHttpHHTest05(
void)
186 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
188 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
189 uint32_t http_len =
sizeof(http_buf) - 1;
190 return RunTest(http_buf, http_len,
191 "alert http any any -> any any "
192 "(msg:\"http host header test\"; "
193 "content:!\"con\"; depth:4; http_host; "
202 static int DetectEngineHttpHHTest06(
void)
204 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
206 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
207 uint32_t http_len =
sizeof(http_buf) - 1;
208 return RunTest(http_buf, http_len,
209 "alert http any any -> any any "
210 "(msg:\"http host header test\"; "
211 "content:\"ect\"; offset:3; http_host; "
220 static int DetectEngineHttpHHTest07(
void)
223 "GET /index.html HTTP/1.0\r\n"
225 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
226 uint32_t http_len =
sizeof(http_buf) - 1;
227 return RunTest(http_buf, http_len,
228 "alert http any any -> any any "
229 "(msg:\"http host header test\"; "
230 "content:!\"co\"; offset:3; http_host; "
239 static int DetectEngineHttpHHTest08(
void)
242 "GET /index.html HTTP/1.0\r\n"
244 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
245 uint32_t http_len =
sizeof(http_buf) - 1;
246 return RunTest(http_buf, http_len,
247 "alert http any any -> any any "
248 "(msg:\"http host header test\"; "
249 "content:!\"ect\"; offset:3; http_host; "
258 static int DetectEngineHttpHHTest09(
void)
260 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
262 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
263 uint32_t http_len =
sizeof(http_buf) - 1;
264 return RunTest(http_buf, http_len,
265 "alert http any any -> any any "
266 "(msg:\"http host header test\"; "
267 "content:\"con\"; offset:3; http_host; "
276 static int DetectEngineHttpHHTest10(
void)
278 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
280 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
281 uint32_t http_len =
sizeof(http_buf) - 1;
282 return RunTest(http_buf, http_len,
283 "alert http any any -> any any "
284 "(msg:\"http_host header test\"; "
285 "content:\"co\"; http_host; "
286 "content:\"ec\"; within:4; http_host; "
295 static int DetectEngineHttpHHTest11(
void)
298 "GET /index.html HTTP/1.0\r\n"
300 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
301 uint32_t http_len =
sizeof(http_buf) - 1;
302 return RunTest(http_buf, http_len,
303 "alert http any any -> any any "
304 "(msg:\"http_host header test\"; "
305 "content:\"co\"; http_host; "
306 "content:!\"ec\"; within:3; http_host; "
315 static int DetectEngineHttpHHTest12(
void)
317 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
319 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
320 uint32_t http_len =
sizeof(http_buf) - 1;
321 return RunTest(http_buf, http_len,
322 "alert http any any -> any any "
323 "(msg:\"http_host header test\"; "
324 "content:\"co\"; http_host; "
325 "content:\"ec\"; within:3; http_host; "
334 static int DetectEngineHttpHHTest13(
void)
336 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
338 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
339 uint32_t http_len =
sizeof(http_buf) - 1;
340 return RunTest(http_buf, http_len,
341 "alert http any any -> any any "
342 "(msg:\"http_host header test\"; "
343 "content:\"co\"; http_host; "
344 "content:!\"ec\"; within:4; http_host; "
353 static int DetectEngineHttpHHTest14(
void)
355 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
357 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
358 uint32_t http_len =
sizeof(http_buf) - 1;
359 return RunTest(http_buf, http_len,
360 "alert http any any -> any any "
361 "(msg:\"http_host header test\"; "
362 "content:\"co\"; http_host; "
363 "content:\"ec\"; distance:2; http_host; "
372 static int DetectEngineHttpHHTest15(
void)
374 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
376 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
377 uint32_t http_len =
sizeof(http_buf) - 1;
378 return RunTest(http_buf, http_len,
379 "alert http any any -> any any "
380 "(msg:\"http_host header test\"; "
381 "content:\"co\"; http_host; "
382 "content:!\"ec\"; distance:3; http_host; "
391 static int DetectEngineHttpHHTest16(
void)
393 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
395 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
396 uint32_t http_len =
sizeof(http_buf) - 1;
397 return RunTest(http_buf, http_len,
398 "alert http any any -> any any "
399 "(msg:\"http_host header test\"; "
400 "content:\"co\"; http_host; "
401 "content:\"ec\"; distance:3; http_host; "
410 static int DetectEngineHttpHHTest17(
void)
413 "GET /index.html HTTP/1.0\r\n"
415 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
416 uint32_t http_len =
sizeof(http_buf) - 1;
417 return RunTest(http_buf, http_len,
418 "alert http any any -> any any "
419 "(msg:\"http_host header test\"; "
420 "content:\"co\"; http_host; "
421 "content:!\"ec\"; distance:2; http_host; "
426 static int DetectEngineHttpHHTest18(
void)
428 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
429 "Host: www.kaboom.com\r\n"
430 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
431 uint32_t http_len =
sizeof(http_buf) - 1;
432 return RunTest(http_buf, http_len,
433 "alert http any any -> any any "
434 "(msg:\"http_host header test\"; "
435 "content:\"kaboom\"; http_host; "
440 static int DetectEngineHttpHHTest19(
void)
442 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
443 "Host: www.kaboom.com:8080\r\n"
444 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
445 uint32_t http_len =
sizeof(http_buf) - 1;
446 return RunTest(http_buf, http_len,
447 "alert http any any -> any any "
448 "(msg:\"http_host header test\"; "
449 "content:\"kaboom\"; http_host; "
454 static int DetectEngineHttpHHTest20(
void)
456 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
457 "Host: www.kaboom.com:8080\r\n"
458 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
459 uint32_t http_len =
sizeof(http_buf) - 1;
460 return RunTest(http_buf, http_len,
461 "alert http any any -> any any "
462 "(msg:\"http_host header test\"; "
463 "content:\"8080\"; http_host; "
468 static int DetectEngineHttpHHTest21(
void)
470 uint8_t http_buf[] =
"GET http://www.kaboom.com/index.html HTTP/1.0\r\n"
471 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
472 uint32_t http_len =
sizeof(http_buf) - 1;
473 return RunTest(http_buf, http_len,
474 "alert http any any -> any any "
475 "(msg:\"http_host header test\"; "
476 "content:\"kaboom\"; http_host; "
481 static int DetectEngineHttpHHTest22(
void)
483 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
484 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
485 uint32_t http_len =
sizeof(http_buf) - 1;
486 return RunTest(http_buf, http_len,
487 "alert http any any -> any any "
488 "(msg:\"http_host header test\"; "
489 "content:\"kaboom\"; http_host; "
494 static int DetectEngineHttpHHTest23(
void)
496 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
497 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
498 uint32_t http_len =
sizeof(http_buf) - 1;
499 return RunTest(http_buf, http_len,
500 "alert http any any -> any any "
501 "(msg:\"http_host header test\"; "
502 "content:\"8080\"; http_host; "
507 static int DetectEngineHttpHHTest24(
void)
509 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
510 "Host: www.rabbit.com\r\n"
511 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
512 uint32_t http_len =
sizeof(http_buf) - 1;
513 return RunTest(http_buf, http_len,
514 "alert http any any -> any any "
515 "(msg:\"http_host header test\"; "
516 "content:\"kaboom\"; http_host; "
521 static int DetectEngineHttpHHTest25(
void)
523 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
524 "Host: www.rabbit.com\r\n"
525 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
526 uint32_t http_len =
sizeof(http_buf) - 1;
527 return RunTest(http_buf, http_len,
528 "alert http any any -> any any "
529 "(msg:\"http_host header test\"; "
530 "content:\"rabbit\"; http_host; "
539 static int DetectHttpHHTest01(
void)
545 "content:\"one\"; http_host; sid:1;)");
555 static int DetectHttpHHTest03(
void)
561 "http_host; sid:1;)");
571 static int DetectHttpHHTest04(
void)
577 "content:\"one\"; rawbytes; http_host; sid:1;)");
586 static int DetectHttpHHTest05(
void)
592 "content:\"one\"; http_host; nocase; sid:1;)");
599 static int DetectHttpHHTest05a(
void)
606 "(content:\"ABC\"; http_host; sid:1;)");
617 static int DetectHttpHHTest06(
void)
619 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
620 "User-Agent: www.openinfosecfoundation.org\r\n"
621 "Host: This is dummy message body\r\n"
622 "Content-Type: text/html\r\n"
624 uint32_t http_len =
sizeof(http_buf) - 1;
625 return RunTest(http_buf, http_len,
626 "alert http any any -> any any "
627 "(msg:\"http host test\"; "
628 "content:\"message\"; http_host; "
637 static int DetectHttpHHTest07(
void)
646 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
647 "User-Agent: www.openinfosecfoundation.org\r\n"
648 "Host: This is dummy message";
649 uint8_t http2_buf[] =
"body1\r\n\r\n";
650 uint32_t http1_len =
sizeof(http1_buf) - 1;
651 uint32_t http2_len =
sizeof(http2_buf) - 1;
654 memset(&th_v, 0,
sizeof(th_v));
656 memset(&f, 0,
sizeof(f));
657 memset(&ssn, 0,
sizeof(ssn));
664 f.
proto = IPPROTO_TCP;
684 "(msg:\"http host test\"; "
685 "content:\"message\"; http_host; "
728 static int DetectHttpHHTest08(
void)
737 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
738 "User-Agent: www.openinfosecfoundation.org\r\n"
739 "host: This is dummy mess";
740 uint8_t http2_buf[] =
"age body\r\n\r\n";
741 uint32_t http1_len =
sizeof(http1_buf) - 1;
742 uint32_t http2_len =
sizeof(http2_buf) - 1;
745 memset(&th_v, 0,
sizeof(th_v));
747 memset(&f, 0,
sizeof(f));
748 memset(&ssn, 0,
sizeof(ssn));
755 f.
proto = IPPROTO_TCP;
775 "(msg:\"http host test\"; "
776 "content:\"message\"; http_host; "
820 static int DetectHttpHHTest09(
void)
829 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
830 "User-Agent: www.openinfosecfoundation.org\r\n"
831 "Host: This is dummy body1";
832 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
833 "Content-Type: text/html\r\n"
834 "Content-Length: 46\r\n"
836 "This is dummy body1";
837 uint32_t http1_len =
sizeof(http1_buf) - 1;
838 uint32_t http2_len =
sizeof(http2_buf) - 1;
841 memset(&th_v, 0,
sizeof(th_v));
843 memset(&f, 0,
sizeof(f));
844 memset(&ssn, 0,
sizeof(ssn));
851 f.
proto = IPPROTO_TCP;
871 "(msg:\"http host test\"; "
872 "content:\"body1this\"; http_host; "
916 static int DetectHttpHHTest10(
void)
926 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
927 "User-Agent: www.openinfosecfoundation.org\r\n"
928 "Host: This is dummy bodY1";
929 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
930 "Content-Type: text/html\r\n"
931 "Content-Length: 46\r\n"
933 "This is dummy bodY1";
934 uint32_t http1_len =
sizeof(http1_buf) - 1;
935 uint32_t http2_len =
sizeof(http2_buf) - 1;
939 memset(&th_v, 0,
sizeof(th_v));
941 memset(&f, 0,
sizeof(f));
942 memset(&ssn, 0,
sizeof(ssn));
949 f.
proto = IPPROTO_TCP;
971 "(msg:\"http host test\"; "
972 "content:\"body1this\"; http_host; "
983 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
989 if (http_state == NULL) {
990 printf(
"no http state: \n");
999 printf(
"sid 1 didn't match but should have\n");
1006 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: \n", r);
1015 printf(
"sid 1 didn't match but should have");
1039 static int DetectHttpHHTest11(
void)
1041 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1042 "User-Agent: www.openinfosecfoundation.org\r\n"
1043 "Host: This is dummy message body\r\n"
1044 "Content-Type: text/html\r\n"
1046 uint32_t http_len =
sizeof(http_buf) - 1;
1047 return RunTest(http_buf, http_len,
1048 "alert http any any -> any any "
1049 "(msg:\"http host test\"; "
1050 "content:!\"message\"; http_host; "
1059 static int DetectHttpHHTest12(
void)
1061 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1062 "User-Agent: www.openinfosecfoundation.org\r\n"
1063 "Host: This is dummy body\r\n"
1065 uint32_t http_len =
sizeof(http_buf) - 1;
1066 return RunTest(http_buf, http_len,
1067 "alert http any any -> any any "
1068 "(msg:\"http host test\"; "
1069 "content:!\"message\"; http_host; "
1078 static int DetectHttpHHTest13(
void)
1080 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1081 "User-Agent: www.openinfosecfoundation.org\r\n"
1082 "Host: longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend\r\n"
1083 "Content-Type: text/html\r\n"
1085 uint32_t http_len =
sizeof(http_buf) - 1;
1086 return RunTest(http_buf, http_len,
1087 "alert http any any -> any any "
1088 "(msg:\"http host test\"; "
1089 "content:\"abcdefghijklmnopqrstuvwxyz0123456789\"; http_host; "
1097 static int DetectHttpHHTest14(
void)
1106 uint8_t httpbuf1[] =
"POST / HTTP/1.1\r\n";
1107 uint8_t httpbuf2[] =
"Cookie: dummy1\r\n";
1108 uint8_t httpbuf3[] =
"Host: Body one!!\r\n\r\n";
1109 uint32_t httplen1 =
sizeof(httpbuf1) - 1;
1110 uint32_t httplen2 =
sizeof(httpbuf2) - 1;
1111 uint32_t httplen3 =
sizeof(httpbuf3) - 1;
1112 uint8_t httpbuf4[] =
"GET /?var=val HTTP/1.1\r\n";
1113 uint8_t httpbuf5[] =
"Cookie: dummy2\r\n";
1114 uint8_t httpbuf6[] =
"Host: Body two\r\n\r\n";
1115 uint32_t httplen4 =
sizeof(httpbuf4) - 1;
1116 uint32_t httplen5 =
sizeof(httpbuf5) - 1;
1117 uint32_t httplen6 =
sizeof(httpbuf6) - 1;
1120 memset(&th_v, 0,
sizeof(th_v));
1122 memset(&f, 0,
sizeof(f));
1123 memset(&ssn, 0,
sizeof(ssn));
1129 f.
proto = IPPROTO_TCP;
1148 "alert tcp any any -> any any (content:\"POST\"; http_method; content:\"dummy1\"; "
1149 "http_cookie; content:\"body one\"; http_host; sid:1; rev:1;)");
1151 printf(
"sig parse failed: ");
1155 "alert tcp any any -> any any (content:\"GET\"; http_method; content:\"dummy2\"; "
1156 "http_cookie; content:\"body two\"; http_host; sid:2; rev:1;)");
1158 printf(
"sig2 parse failed: ");
1168 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1175 printf(
"sig 1 alerted: ");
1182 printf(
"toserver chunk 2 returned %" PRId32
", expected 0: ", r);
1189 printf(
"sig 1 alerted (2): ");
1196 printf(
"toserver chunk 3 returned %" PRId32
", expected 0: ", r);
1203 printf(
"sig 1 didn't alert: ");
1210 printf(
"toserver chunk 5 returned %" PRId32
", expected 0: ", r);
1217 printf(
"sig 1 alerted (4): ");
1224 printf(
"toserver chunk 6 returned %" PRId32
", expected 0: ", r);
1231 printf(
"sig 1 alerted (request 2, chunk 6): ");
1240 printf(
"toserver chunk 7 returned %" PRId32
", expected 0: ", r);
1247 printf(
"signature 2 didn't match or sig 1 matched, but shouldn't have: ");
1253 if (htp_state == NULL) {
1254 printf(
"no http state: ");
1260 printf(
"The http app layer doesn't have 2 transactions, but it should: ");
1268 if (det_ctx != NULL) {
1286 static int DetectHttpHRHTest06(
void)
1288 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1289 "User-Agent: www.openinfosecfoundation.org\r\n"
1290 "Host: This is dummy message body\r\n"
1291 "Content-Type: text/html\r\n"
1293 uint32_t http_len =
sizeof(http_buf) - 1;
1294 return RunTest(http_buf, http_len,
1295 "alert http any any -> any any "
1296 "(msg:\"http host test\"; "
1297 "content:\"message\"; http_raw_host; "
1306 static int DetectHttpHRHTest07(
void)
1316 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1317 "User-Agent: www.openinfosecfoundation.org\r\n"
1318 "Host: This is dummy message";
1319 uint8_t http2_buf[] =
"body1\r\n\r\n";
1320 uint32_t http1_len =
sizeof(http1_buf) - 1;
1321 uint32_t http2_len =
sizeof(http2_buf) - 1;
1325 memset(&th_v, 0,
sizeof(th_v));
1327 memset(&f, 0,
sizeof(f));
1328 memset(&ssn, 0,
sizeof(ssn));
1335 f.
proto = IPPROTO_TCP;
1357 "(msg:\"http host test\"; "
1358 "content:\"message\"; http_raw_host; "
1369 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1375 if (http_state == NULL) {
1376 printf(
"no http state: ");
1384 printf(
"sid 1 matched on p1 but shouldn't have: ");
1391 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1398 printf(
"sid 1 didn't match on p2 but should have: ");
1422 static int DetectHttpHRHTest08(
void)
1432 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1433 "User-Agent: www.openinfosecfoundation.org\r\n"
1434 "host: This is dummy mess";
1435 uint8_t http2_buf[] =
"age body\r\n\r\n";
1436 uint32_t http1_len =
sizeof(http1_buf) - 1;
1437 uint32_t http2_len =
sizeof(http2_buf) - 1;
1441 memset(&th_v, 0,
sizeof(th_v));
1443 memset(&f, 0,
sizeof(f));
1444 memset(&ssn, 0,
sizeof(ssn));
1451 f.
proto = IPPROTO_TCP;
1473 "(msg:\"http host test\"; "
1474 "content:\"message\"; http_raw_host; "
1485 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1491 if (http_state == NULL) {
1492 printf(
"no http state: ");
1501 printf(
"sid 1 didn't match but should have");
1508 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1517 printf(
"sid 1 didn't match but should have");
1541 static int DetectHttpHRHTest09(
void)
1551 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1552 "User-Agent: www.openinfosecfoundation.org\r\n"
1553 "Host: This is dummy body1";
1554 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
1555 "Content-Type: text/html\r\n"
1556 "Content-Length: 46\r\n"
1558 "This is dummy body1";
1559 uint32_t http1_len =
sizeof(http1_buf) - 1;
1560 uint32_t http2_len =
sizeof(http2_buf) - 1;
1564 memset(&th_v, 0,
sizeof(th_v));
1566 memset(&f, 0,
sizeof(f));
1567 memset(&ssn, 0,
sizeof(ssn));
1574 f.
proto = IPPROTO_TCP;
1596 "(msg:\"http host test\"; "
1597 "content:\"body1This\"; http_raw_host; "
1608 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1614 if (http_state == NULL) {
1615 printf(
"no http state: ");
1624 printf(
"sid 1 didn't match but should have");
1631 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1640 printf(
"sid 1 didn't match but should have");
1664 static int DetectHttpHRHTest10(
void)
1674 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1675 "User-Agent: www.openinfosecfoundation.org\r\n"
1676 "Host: This is dummy bodY1";
1677 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
1678 "Content-Type: text/html\r\n"
1679 "Content-Length: 46\r\n"
1681 "This is dummy bodY1";
1682 uint32_t http1_len =
sizeof(http1_buf) - 1;
1683 uint32_t http2_len =
sizeof(http2_buf) - 1;
1687 memset(&th_v, 0,
sizeof(th_v));
1689 memset(&f, 0,
sizeof(f));
1690 memset(&ssn, 0,
sizeof(ssn));
1697 f.
proto = IPPROTO_TCP;
1719 "(msg:\"http host test\"; "
1720 "content:\"bodY1This\"; http_raw_host; "
1731 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1737 if (http_state == NULL) {
1738 printf(
"no http state: \n");
1747 printf(
"sid 1 didn't match but should have\n");
1754 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: \n", r);
1763 printf(
"sid 1 didn't match but should have");
1787 static int DetectHttpHRHTest11(
void)
1789 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1790 "User-Agent: www.openinfosecfoundation.org\r\n"
1791 "Host: This is dummy message body\r\n"
1792 "Content-Type: text/html\r\n"
1794 uint32_t http_len =
sizeof(http_buf) - 1;
1795 return RunTest(http_buf, http_len,
1796 "alert http any any -> any any "
1797 "(msg:\"http host test\"; "
1798 "content:!\"message\"; http_raw_host; "
1807 static int DetectHttpHRHTest12(
void)
1809 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1810 "User-Agent: www.openinfosecfoundation.org\r\n"
1811 "Host: This is dummy body\r\n"
1813 uint32_t http_len =
sizeof(http_buf) - 1;
1814 return RunTest(http_buf, http_len,
1815 "alert http any any -> any any "
1816 "(msg:\"http host test\"; "
1817 "content:!\"message\"; http_raw_host; "
1826 static int DetectHttpHRHTest13(
void)
1828 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1829 "User-Agent: www.openinfosecfoundation.org\r\n"
1830 "Host: longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend\r\n"
1831 "Content-Type: text/html\r\n"
1833 uint32_t http_len =
sizeof(http_buf) - 1;
1834 return RunTest(http_buf, http_len,
1835 "alert http any any -> any any "
1836 "(msg:\"http host test\"; "
1837 "content:\"abcdefghijklmnopqrstuvwxyz0123456789\"; http_raw_host; "
1845 static int DetectHttpHRHTest14(
void)
1854 uint8_t httpbuf1[] =
"POST / HTTP/1.1\r\n";
1855 uint8_t httpbuf2[] =
"Cookie: dummy1\r\n";
1856 uint8_t httpbuf3[] =
"Host: Body one!!\r\n\r\n";
1857 uint32_t httplen1 =
sizeof(httpbuf1) - 1;
1858 uint32_t httplen2 =
sizeof(httpbuf2) - 1;
1859 uint32_t httplen3 =
sizeof(httpbuf3) - 1;
1860 uint8_t httpbuf4[] =
"GET /?var=val HTTP/1.1\r\n";
1861 uint8_t httpbuf5[] =
"Cookie: dummy2\r\n";
1862 uint8_t httpbuf6[] =
"Host: Body two\r\n\r\n";
1863 uint32_t httplen4 =
sizeof(httpbuf4) - 1;
1864 uint32_t httplen5 =
sizeof(httpbuf5) - 1;
1865 uint32_t httplen6 =
sizeof(httpbuf6) - 1;
1868 memset(&th_v, 0,
sizeof(th_v));
1870 memset(&f, 0,
sizeof(f));
1871 memset(&ssn, 0,
sizeof(ssn));
1877 f.
proto = IPPROTO_TCP;
1896 "alert tcp any any -> any any (content:\"POST\"; http_method; content:\"dummy1\"; "
1897 "http_cookie; content:\"Body one\"; http_raw_host; sid:1; rev:1;)");
1899 printf(
"sig parse failed: ");
1903 "alert tcp any any -> any any (content:\"GET\"; http_method; content:\"dummy2\"; "
1904 "http_cookie; content:\"Body two\"; http_raw_host; sid:2; rev:1;)");
1906 printf(
"sig2 parse failed: ");
1916 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1923 printf(
"sig 1 alerted: ");
1930 printf(
"toserver chunk 2 returned %" PRId32
", expected 0: ", r);
1937 printf(
"sig 1 alerted (2): ");
1944 printf(
"toserver chunk 3 returned %" PRId32
", expected 0: ", r);
1951 printf(
"sig 1 didn't alert: ");
1958 printf(
"toserver chunk 5 returned %" PRId32
", expected 0: ", r);
1965 printf(
"sig 1 alerted (4): ");
1972 printf(
"toserver chunk 6 returned %" PRId32
", expected 0: ", r);
1979 printf(
"sig 1 alerted (request 2, chunk 6): ");
1988 printf(
"toserver chunk 7 returned %" PRId32
", expected 0: ", r);
1995 printf(
"signature 2 didn't match or sig 1 matched, but shouldn't have: ");
2001 if (htp_state == NULL) {
2002 printf(
"no http state: ");
2008 printf(
"The http app layer doesn't have 2 transactions, but it should: ");
2016 if (det_ctx != NULL) {
2034 static int DetectHttpHRHTest37(
void)
2044 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
2045 "User-Agent: www.openinfosecfoundation.org\r\n"
2046 "Host: This is dummy bodY1";
2047 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
2048 "Content-Type: text/html\r\n"
2049 "Content-Length: 46\r\n"
2051 "This is dummy bodY1";
2052 uint32_t http1_len =
sizeof(http1_buf) - 1;
2053 uint32_t http2_len =
sizeof(http2_buf) - 1;
2057 memset(&th_v, 0,
sizeof(th_v));
2059 memset(&f, 0,
sizeof(f));
2060 memset(&ssn, 0,
sizeof(ssn));
2067 f.
proto = IPPROTO_TCP;
2089 "(msg:\"http host test\"; "
2090 "content:\"body1this\"; http_raw_host; nocase; "
2101 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
2107 if (http_state == NULL) {
2108 printf(
"no http state: \n");
2117 printf(
"sid 1 didn't match but should have\n");
2124 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: \n", r);
2133 printf(
"sid 1 didn't match but should have");
2157 static int DetectEngineHttpHRHTest01(
void)
2159 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2161 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2162 uint32_t http_len =
sizeof(http_buf) - 1;
2163 return RunTest(http_buf, http_len,
2164 "alert http any any -> any any "
2165 "(msg:\"http host header test\"; "
2166 "content:\"CONNECT\"; http_raw_host; "
2175 static int DetectEngineHttpHRHTest02(
void)
2177 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2179 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2180 uint32_t http_len =
sizeof(http_buf) - 1;
2181 return RunTest(http_buf, http_len,
2182 "alert http any any -> any any "
2183 "(msg:\"http host header test\"; "
2184 "content:\"CO\"; depth:4; http_raw_host; "
2193 static int DetectEngineHttpHRHTest03(
void)
2195 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2197 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2198 uint32_t http_len =
sizeof(http_buf) - 1;
2199 return RunTest(http_buf, http_len,
2200 "alert http any any -> any any "
2201 "(msg:\"http_raw_host header test\"; "
2202 "content:!\"ECT\"; depth:4; http_raw_host; "
2211 static int DetectEngineHttpHRHTest04(
void)
2213 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2215 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2216 uint32_t http_len =
sizeof(http_buf) - 1;
2217 return RunTest(http_buf, http_len,
2218 "alert http any any -> any any "
2219 "(msg:\"http host header test\"; "
2220 "content:\"ECT\"; depth:4; http_raw_host; "
2229 static int DetectEngineHttpHRHTest05(
void)
2231 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2233 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2234 uint32_t http_len =
sizeof(http_buf) - 1;
2235 return RunTest(http_buf, http_len,
2236 "alert http any any -> any any "
2237 "(msg:\"http host header test\"; "
2238 "content:!\"CON\"; depth:4; http_raw_host; "
2247 static int DetectEngineHttpHRHTest06(
void)
2249 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2251 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2252 uint32_t http_len =
sizeof(http_buf) - 1;
2253 return RunTest(http_buf, http_len,
2254 "alert http any any -> any any "
2255 "(msg:\"http host header test\"; "
2256 "content:\"ECT\"; offset:3; http_raw_host; "
2265 static int DetectEngineHttpHRHTest07(
void)
2267 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2269 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2270 uint32_t http_len =
sizeof(http_buf) - 1;
2271 return RunTest(http_buf, http_len,
2272 "alert http any any -> any any "
2273 "(msg:\"http host header test\"; "
2274 "content:!\"CO\"; offset:3; http_raw_host; "
2283 static int DetectEngineHttpHRHTest08(
void)
2285 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2287 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2288 uint32_t http_len =
sizeof(http_buf) - 1;
2289 return RunTest(http_buf, http_len,
2290 "alert http any any -> any any "
2291 "(msg:\"http host header test\"; "
2292 "content:!\"ECT\"; offset:3; http_raw_host; "
2301 static int DetectEngineHttpHRHTest09(
void)
2303 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2305 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2306 uint32_t http_len =
sizeof(http_buf) - 1;
2307 return RunTest(http_buf, http_len,
2308 "alert http any any -> any any "
2309 "(msg:\"http host header test\"; "
2310 "content:\"CON\"; offset:3; http_raw_host; "
2319 static int DetectEngineHttpHRHTest10(
void)
2321 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2323 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2324 uint32_t http_len =
sizeof(http_buf) - 1;
2325 return RunTest(http_buf, http_len,
2326 "alert http any any -> any any "
2327 "(msg:\"http_raw_host header test\"; "
2328 "content:\"CO\"; http_raw_host; "
2329 "content:\"EC\"; within:4; http_raw_host; "
2338 static int DetectEngineHttpHRHTest11(
void)
2340 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2342 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2343 uint32_t http_len =
sizeof(http_buf) - 1;
2344 return RunTest(http_buf, http_len,
2345 "alert http any any -> any any "
2346 "(msg:\"http_raw_host header test\"; "
2347 "content:\"CO\"; http_raw_host; "
2348 "content:!\"EC\"; within:3; http_raw_host; "
2357 static int DetectEngineHttpHRHTest12(
void)
2359 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2361 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2362 uint32_t http_len =
sizeof(http_buf) - 1;
2363 return RunTest(http_buf, http_len,
2364 "alert http any any -> any any "
2365 "(msg:\"http_raw_host header test\"; "
2366 "content:\"CO\"; http_raw_host; "
2367 "content:\"EC\"; within:3; http_raw_host; "
2376 static int DetectEngineHttpHRHTest13(
void)
2378 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2380 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2381 uint32_t http_len =
sizeof(http_buf) - 1;
2382 return RunTest(http_buf, http_len,
2383 "alert http any any -> any any "
2384 "(msg:\"http_raw_host header test\"; "
2385 "content:\"CO\"; http_raw_host; "
2386 "content:!\"EC\"; within:4; http_raw_host; "
2395 static int DetectEngineHttpHRHTest14(
void)
2397 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2399 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2400 uint32_t http_len =
sizeof(http_buf) - 1;
2401 return RunTest(http_buf, http_len,
2402 "alert http any any -> any any "
2403 "(msg:\"http_raw_host header test\"; "
2404 "content:\"CO\"; http_raw_host; "
2405 "content:\"EC\"; distance:2; http_raw_host; "
2414 static int DetectEngineHttpHRHTest15(
void)
2416 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2418 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2419 uint32_t http_len =
sizeof(http_buf) - 1;
2420 return RunTest(http_buf, http_len,
2421 "alert http any any -> any any "
2422 "(msg:\"http_raw_host header test\"; "
2423 "content:\"CO\"; http_raw_host; "
2424 "content:!\"EC\"; distance:3; http_raw_host; "
2433 static int DetectEngineHttpHRHTest16(
void)
2435 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2437 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2438 uint32_t http_len =
sizeof(http_buf) - 1;
2439 return RunTest(http_buf, http_len,
2440 "alert http any any -> any any "
2441 "(msg:\"http_raw_host header test\"; "
2442 "content:\"CO\"; http_raw_host; "
2443 "content:\"EC\"; distance:3; http_raw_host; "
2452 static int DetectEngineHttpHRHTest17(
void)
2454 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2456 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2457 uint32_t http_len =
sizeof(http_buf) - 1;
2458 return RunTest(http_buf, http_len,
2459 "alert http any any -> any any "
2460 "(msg:\"http_raw_host header test\"; "
2461 "content:\"CO\"; http_raw_host; "
2462 "content:!\"EC\"; distance:2; http_raw_host; "
2467 static int DetectEngineHttpHRHTest18(
void)
2469 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2470 "Host: www.kaboom.com:8080\r\n"
2471 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2472 uint32_t http_len =
sizeof(http_buf) - 1;
2473 return RunTest(http_buf, http_len,
2474 "alert http any any -> any any "
2475 "(msg:\"http_raw_host header test\"; "
2476 "content:\"kaboom\"; http_raw_host; nocase; "
2481 static int DetectEngineHttpHRHTest19(
void)
2483 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2484 "Host: www.kaboom.com:8080\r\n"
2485 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2486 uint32_t http_len =
sizeof(http_buf) - 1;
2487 return RunTest(http_buf, http_len,
2488 "alert http any any -> any any "
2489 "(msg:\"http_raw_host header test\"; "
2490 "content:\"kaboom\"; http_raw_host; nocase; "
2495 static int DetectEngineHttpHRHTest20(
void)
2497 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2498 "Host: www.kaboom.com:8080\r\n"
2499 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2500 uint32_t http_len =
sizeof(http_buf) - 1;
2501 return RunTest(http_buf, http_len,
2502 "alert http any any -> any any "
2503 "(msg:\"http_raw_host header test\"; "
2504 "content:\"8080\"; http_raw_host; nocase; "
2509 static int DetectEngineHttpHRHTest21(
void)
2511 uint8_t http_buf[] =
"GET http://www.kaboom.com/index.html HTTP/1.0\r\n"
2512 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2513 uint32_t http_len =
sizeof(http_buf) - 1;
2514 return RunTest(http_buf, http_len,
2515 "alert http any any -> any any "
2516 "(msg:\"http_raw_host header test\"; "
2517 "content:\"kaboom\"; http_raw_host; nocase; "
2522 static int DetectEngineHttpHRHTest22(
void)
2524 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2525 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2526 uint32_t http_len =
sizeof(http_buf) - 1;
2527 return RunTest(http_buf, http_len,
2528 "alert http any any -> any any "
2529 "(msg:\"http_raw_host header test\"; "
2530 "content:\"kaboom\"; http_raw_host; nocase; "
2535 static int DetectEngineHttpHRHTest23(
void)
2537 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2538 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2539 uint32_t http_len =
sizeof(http_buf) - 1;
2540 return RunTest(http_buf, http_len,
2541 "alert http any any -> any any "
2542 "(msg:\"http_raw_host header test\"; "
2543 "content:\"8080\"; http_raw_host; nocase; "
2548 static int DetectEngineHttpHRHTest24(
void)
2550 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2551 "Host: www.rabbit.com\r\n"
2552 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2553 uint32_t http_len =
sizeof(http_buf) - 1;
2554 return RunTest(http_buf, http_len,
2555 "alert http any any -> any any "
2556 "(msg:\"http_raw_host header test\"; "
2557 "content:\"kaboom\"; http_raw_host; nocase; "
2562 static int DetectEngineHttpHRHTest25(
void)
2564 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2565 "Host: www.rabbit.com\r\n"
2566 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2567 uint32_t http_len =
sizeof(http_buf) - 1;
2568 return RunTest(http_buf, http_len,
2569 "alert http any any -> any any "
2570 "(msg:\"http_raw_host header test\"; "
2571 "content:\"rabbit\"; http_raw_host; nocase; "
2593 UtRegisterTest(
"DetectEngineHttpHHTest01", DetectEngineHttpHHTest01);
2594 UtRegisterTest(
"DetectEngineHttpHHTest02", DetectEngineHttpHHTest02);
2595 UtRegisterTest(
"DetectEngineHttpHHTest03", DetectEngineHttpHHTest03);
2596 UtRegisterTest(
"DetectEngineHttpHHTest04", DetectEngineHttpHHTest04);
2597 UtRegisterTest(
"DetectEngineHttpHHTest05", DetectEngineHttpHHTest05);
2598 UtRegisterTest(
"DetectEngineHttpHHTest06", DetectEngineHttpHHTest06);
2599 UtRegisterTest(
"DetectEngineHttpHHTest07", DetectEngineHttpHHTest07);
2600 UtRegisterTest(
"DetectEngineHttpHHTest08", DetectEngineHttpHHTest08);
2601 UtRegisterTest(
"DetectEngineHttpHHTest09", DetectEngineHttpHHTest09);
2602 UtRegisterTest(
"DetectEngineHttpHHTest10", DetectEngineHttpHHTest10);
2603 UtRegisterTest(
"DetectEngineHttpHHTest11", DetectEngineHttpHHTest11);
2604 UtRegisterTest(
"DetectEngineHttpHHTest12", DetectEngineHttpHHTest12);
2605 UtRegisterTest(
"DetectEngineHttpHHTest13", DetectEngineHttpHHTest13);
2606 UtRegisterTest(
"DetectEngineHttpHHTest14", DetectEngineHttpHHTest14);
2607 UtRegisterTest(
"DetectEngineHttpHHTest15", DetectEngineHttpHHTest15);
2608 UtRegisterTest(
"DetectEngineHttpHHTest16", DetectEngineHttpHHTest16);
2609 UtRegisterTest(
"DetectEngineHttpHHTest17", DetectEngineHttpHHTest17);
2610 UtRegisterTest(
"DetectEngineHttpHHTest18", DetectEngineHttpHHTest18);
2611 UtRegisterTest(
"DetectEngineHttpHHTest19", DetectEngineHttpHHTest19);
2612 UtRegisterTest(
"DetectEngineHttpHHTest20", DetectEngineHttpHHTest20);
2613 UtRegisterTest(
"DetectEngineHttpHHTest21", DetectEngineHttpHHTest21);
2614 UtRegisterTest(
"DetectEngineHttpHHTest22", DetectEngineHttpHHTest22);
2615 UtRegisterTest(
"DetectEngineHttpHHTest23", DetectEngineHttpHHTest23);
2616 UtRegisterTest(
"DetectEngineHttpHHTest24", DetectEngineHttpHHTest24);
2617 UtRegisterTest(
"DetectEngineHttpHHTest25", DetectEngineHttpHHTest25);
2631 UtRegisterTest(
"DetectEngineHttpHRHTest01", DetectEngineHttpHRHTest01);
2632 UtRegisterTest(
"DetectEngineHttpHRHTest02", DetectEngineHttpHRHTest02);
2633 UtRegisterTest(
"DetectEngineHttpHRHTest03", DetectEngineHttpHRHTest03);
2634 UtRegisterTest(
"DetectEngineHttpHRHTest04", DetectEngineHttpHRHTest04);
2635 UtRegisterTest(
"DetectEngineHttpHRHTest05", DetectEngineHttpHRHTest05);
2636 UtRegisterTest(
"DetectEngineHttpHRHTest06", DetectEngineHttpHRHTest06);
2637 UtRegisterTest(
"DetectEngineHttpHRHTest07", DetectEngineHttpHRHTest07);
2638 UtRegisterTest(
"DetectEngineHttpHRHTest08", DetectEngineHttpHRHTest08);
2639 UtRegisterTest(
"DetectEngineHttpHRHTest09", DetectEngineHttpHRHTest09);
2640 UtRegisterTest(
"DetectEngineHttpHRHTest10", DetectEngineHttpHRHTest10);
2641 UtRegisterTest(
"DetectEngineHttpHRHTest11", DetectEngineHttpHRHTest11);
2642 UtRegisterTest(
"DetectEngineHttpHRHTest12", DetectEngineHttpHRHTest12);
2643 UtRegisterTest(
"DetectEngineHttpHRHTest13", DetectEngineHttpHRHTest13);
2644 UtRegisterTest(
"DetectEngineHttpHRHTest14", DetectEngineHttpHRHTest14);
2645 UtRegisterTest(
"DetectEngineHttpHRHTest15", DetectEngineHttpHRHTest15);
2646 UtRegisterTest(
"DetectEngineHttpHRHTest16", DetectEngineHttpHRHTest16);
2647 UtRegisterTest(
"DetectEngineHttpHRHTest17", DetectEngineHttpHRHTest17);
2648 UtRegisterTest(
"DetectEngineHttpHRHTest18", DetectEngineHttpHRHTest18);
2649 UtRegisterTest(
"DetectEngineHttpHRHTest19", DetectEngineHttpHRHTest19);
2650 UtRegisterTest(
"DetectEngineHttpHRHTest20", DetectEngineHttpHRHTest20);
2651 UtRegisterTest(
"DetectEngineHttpHRHTest21", DetectEngineHttpHRHTest21);
2652 UtRegisterTest(
"DetectEngineHttpHRHTest22", DetectEngineHttpHRHTest22);
2653 UtRegisterTest(
"DetectEngineHttpHRHTest23", DetectEngineHttpHRHTest23);
2654 UtRegisterTest(
"DetectEngineHttpHRHTest24", DetectEngineHttpHRHTest24);
2655 UtRegisterTest(
"DetectEngineHttpHRHTest25", DetectEngineHttpHRHTest25);