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));
57 memset(&f, 0,
sizeof(f));
58 memset(&ssn, 0,
sizeof(ssn));
65 f.
proto = IPPROTO_TCP;
108 static int DetectEngineHttpHHTest01(
void)
110 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
112 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
113 uint32_t http_len =
sizeof(http_buf) - 1;
114 return RunTest(http_buf, http_len,
115 "alert http any any -> any any "
116 "(msg:\"http host header test\"; "
117 "content:\"connect\"; http_host; "
126 static int DetectEngineHttpHHTest02(
void)
129 "GET /index.html HTTP/1.0\r\n"
131 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
132 uint32_t http_len =
sizeof(http_buf) - 1;
133 return RunTest(http_buf, http_len,
134 "alert http any any -> any any "
135 "(msg:\"http host header test\"; "
136 "content:\"co\"; depth:4; http_host; "
145 static int DetectEngineHttpHHTest03(
void)
148 "GET /index.html HTTP/1.0\r\n"
150 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
151 uint32_t http_len =
sizeof(http_buf) - 1;
152 return RunTest(http_buf, http_len,
153 "alert http any any -> any any "
154 "(msg:\"http_host header test\"; "
155 "content:!\"ect\"; depth:4; http_host; "
164 static int DetectEngineHttpHHTest04(
void)
167 "GET /index.html HTTP/1.0\r\n"
169 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
170 uint32_t http_len =
sizeof(http_buf) - 1;
171 return RunTest(http_buf, http_len,
172 "alert http any any -> any any "
173 "(msg:\"http host header test\"; "
174 "content:\"ect\"; depth:4; http_host; "
183 static int DetectEngineHttpHHTest05(
void)
185 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
187 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
188 uint32_t http_len =
sizeof(http_buf) - 1;
189 return RunTest(http_buf, http_len,
190 "alert http any any -> any any "
191 "(msg:\"http host header test\"; "
192 "content:!\"con\"; depth:4; http_host; "
201 static int DetectEngineHttpHHTest06(
void)
203 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
205 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
206 uint32_t http_len =
sizeof(http_buf) - 1;
207 return RunTest(http_buf, http_len,
208 "alert http any any -> any any "
209 "(msg:\"http host header test\"; "
210 "content:\"ect\"; offset:3; http_host; "
219 static int DetectEngineHttpHHTest07(
void)
222 "GET /index.html HTTP/1.0\r\n"
224 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
225 uint32_t http_len =
sizeof(http_buf) - 1;
226 return RunTest(http_buf, http_len,
227 "alert http any any -> any any "
228 "(msg:\"http host header test\"; "
229 "content:!\"co\"; offset:3; http_host; "
238 static int DetectEngineHttpHHTest08(
void)
241 "GET /index.html HTTP/1.0\r\n"
243 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
244 uint32_t http_len =
sizeof(http_buf) - 1;
245 return RunTest(http_buf, http_len,
246 "alert http any any -> any any "
247 "(msg:\"http host header test\"; "
248 "content:!\"ect\"; offset:3; http_host; "
257 static int DetectEngineHttpHHTest09(
void)
259 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
261 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
262 uint32_t http_len =
sizeof(http_buf) - 1;
263 return RunTest(http_buf, http_len,
264 "alert http any any -> any any "
265 "(msg:\"http host header test\"; "
266 "content:\"con\"; offset:3; http_host; "
275 static int DetectEngineHttpHHTest10(
void)
277 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
279 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
280 uint32_t http_len =
sizeof(http_buf) - 1;
281 return RunTest(http_buf, http_len,
282 "alert http any any -> any any "
283 "(msg:\"http_host header test\"; "
284 "content:\"co\"; http_host; "
285 "content:\"ec\"; within:4; http_host; "
294 static int DetectEngineHttpHHTest11(
void)
297 "GET /index.html HTTP/1.0\r\n"
299 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
300 uint32_t http_len =
sizeof(http_buf) - 1;
301 return RunTest(http_buf, http_len,
302 "alert http any any -> any any "
303 "(msg:\"http_host header test\"; "
304 "content:\"co\"; http_host; "
305 "content:!\"ec\"; within:3; http_host; "
314 static int DetectEngineHttpHHTest12(
void)
316 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
318 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
319 uint32_t http_len =
sizeof(http_buf) - 1;
320 return RunTest(http_buf, http_len,
321 "alert http any any -> any any "
322 "(msg:\"http_host header test\"; "
323 "content:\"co\"; http_host; "
324 "content:\"ec\"; within:3; http_host; "
333 static int DetectEngineHttpHHTest13(
void)
335 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
337 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
338 uint32_t http_len =
sizeof(http_buf) - 1;
339 return RunTest(http_buf, http_len,
340 "alert http any any -> any any "
341 "(msg:\"http_host header test\"; "
342 "content:\"co\"; http_host; "
343 "content:!\"ec\"; within:4; http_host; "
352 static int DetectEngineHttpHHTest14(
void)
354 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
356 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
357 uint32_t http_len =
sizeof(http_buf) - 1;
358 return RunTest(http_buf, http_len,
359 "alert http any any -> any any "
360 "(msg:\"http_host header test\"; "
361 "content:\"co\"; http_host; "
362 "content:\"ec\"; distance:2; http_host; "
371 static int DetectEngineHttpHHTest15(
void)
373 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
375 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
376 uint32_t http_len =
sizeof(http_buf) - 1;
377 return RunTest(http_buf, http_len,
378 "alert http any any -> any any "
379 "(msg:\"http_host header test\"; "
380 "content:\"co\"; http_host; "
381 "content:!\"ec\"; distance:3; http_host; "
390 static int DetectEngineHttpHHTest16(
void)
392 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
394 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
395 uint32_t http_len =
sizeof(http_buf) - 1;
396 return RunTest(http_buf, http_len,
397 "alert http any any -> any any "
398 "(msg:\"http_host header test\"; "
399 "content:\"co\"; http_host; "
400 "content:\"ec\"; distance:3; http_host; "
409 static int DetectEngineHttpHHTest17(
void)
412 "GET /index.html HTTP/1.0\r\n"
414 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
415 uint32_t http_len =
sizeof(http_buf) - 1;
416 return RunTest(http_buf, http_len,
417 "alert http any any -> any any "
418 "(msg:\"http_host header test\"; "
419 "content:\"co\"; http_host; "
420 "content:!\"ec\"; distance:2; http_host; "
425 static int DetectEngineHttpHHTest18(
void)
427 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
428 "Host: www.kaboom.com\r\n"
429 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
430 uint32_t http_len =
sizeof(http_buf) - 1;
431 return RunTest(http_buf, http_len,
432 "alert http any any -> any any "
433 "(msg:\"http_host header test\"; "
434 "content:\"kaboom\"; http_host; "
439 static int DetectEngineHttpHHTest19(
void)
441 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
442 "Host: www.kaboom.com:8080\r\n"
443 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
444 uint32_t http_len =
sizeof(http_buf) - 1;
445 return RunTest(http_buf, http_len,
446 "alert http any any -> any any "
447 "(msg:\"http_host header test\"; "
448 "content:\"kaboom\"; http_host; "
453 static int DetectEngineHttpHHTest20(
void)
455 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
456 "Host: www.kaboom.com:8080\r\n"
457 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
458 uint32_t http_len =
sizeof(http_buf) - 1;
459 return RunTest(http_buf, http_len,
460 "alert http any any -> any any "
461 "(msg:\"http_host header test\"; "
462 "content:\"8080\"; http_host; "
467 static int DetectEngineHttpHHTest21(
void)
469 uint8_t http_buf[] =
"GET http://www.kaboom.com/index.html HTTP/1.0\r\n"
470 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
471 uint32_t http_len =
sizeof(http_buf) - 1;
472 return RunTest(http_buf, http_len,
473 "alert http any any -> any any "
474 "(msg:\"http_host header test\"; "
475 "content:\"kaboom\"; http_host; "
480 static int DetectEngineHttpHHTest22(
void)
482 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
483 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
484 uint32_t http_len =
sizeof(http_buf) - 1;
485 return RunTest(http_buf, http_len,
486 "alert http any any -> any any "
487 "(msg:\"http_host header test\"; "
488 "content:\"kaboom\"; http_host; "
493 static int DetectEngineHttpHHTest23(
void)
495 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
496 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
497 uint32_t http_len =
sizeof(http_buf) - 1;
498 return RunTest(http_buf, http_len,
499 "alert http any any -> any any "
500 "(msg:\"http_host header test\"; "
501 "content:\"8080\"; http_host; "
506 static int DetectEngineHttpHHTest24(
void)
508 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
509 "Host: www.rabbit.com\r\n"
510 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
511 uint32_t http_len =
sizeof(http_buf) - 1;
512 return RunTest(http_buf, http_len,
513 "alert http any any -> any any "
514 "(msg:\"http_host header test\"; "
515 "content:\"kaboom\"; http_host; "
520 static int DetectEngineHttpHHTest25(
void)
522 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
523 "Host: www.rabbit.com\r\n"
524 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
525 uint32_t http_len =
sizeof(http_buf) - 1;
526 return RunTest(http_buf, http_len,
527 "alert http any any -> any any "
528 "(msg:\"http_host header test\"; "
529 "content:\"rabbit\"; http_host; "
538 static int DetectHttpHHTest01(
void)
544 "content:\"one\"; http_host; sid:1;)");
554 static int DetectHttpHHTest03(
void)
560 "http_host; sid:1;)");
570 static int DetectHttpHHTest04(
void)
576 "content:\"one\"; rawbytes; http_host; sid:1;)");
585 static int DetectHttpHHTest05(
void)
591 "content:\"one\"; http_host; nocase; sid:1;)");
598 static int DetectHttpHHTest05a(
void)
605 "(content:\"ABC\"; http_host; sid:1;)");
616 static int DetectHttpHHTest06(
void)
618 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
619 "User-Agent: www.openinfosecfoundation.org\r\n"
620 "Host: This is dummy message body\r\n"
621 "Content-Type: text/html\r\n"
623 uint32_t http_len =
sizeof(http_buf) - 1;
624 return RunTest(http_buf, http_len,
625 "alert http any any -> any any "
626 "(msg:\"http host test\"; "
627 "content:\"message\"; http_host; "
636 static int DetectHttpHHTest07(
void)
645 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
646 "User-Agent: www.openinfosecfoundation.org\r\n"
647 "Host: This is dummy message";
648 uint8_t http2_buf[] =
"body1\r\n\r\n";
649 uint32_t http1_len =
sizeof(http1_buf) - 1;
650 uint32_t http2_len =
sizeof(http2_buf) - 1;
653 memset(&th_v, 0,
sizeof(th_v));
654 memset(&f, 0,
sizeof(f));
655 memset(&ssn, 0,
sizeof(ssn));
662 f.
proto = IPPROTO_TCP;
682 "(msg:\"http host test\"; "
683 "content:\"message\"; http_host; "
724 static int DetectHttpHHTest08(
void)
733 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
734 "User-Agent: www.openinfosecfoundation.org\r\n"
735 "host: This is dummy mess";
736 uint8_t http2_buf[] =
"age body\r\n\r\n";
737 uint32_t http1_len =
sizeof(http1_buf) - 1;
738 uint32_t http2_len =
sizeof(http2_buf) - 1;
741 memset(&th_v, 0,
sizeof(th_v));
742 memset(&f, 0,
sizeof(f));
743 memset(&ssn, 0,
sizeof(ssn));
750 f.
proto = IPPROTO_TCP;
770 "(msg:\"http host test\"; "
771 "content:\"message\"; http_host; "
813 static int DetectHttpHHTest09(
void)
822 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
823 "User-Agent: www.openinfosecfoundation.org\r\n"
824 "Host: This is dummy body1";
825 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
826 "Content-Type: text/html\r\n"
827 "Content-Length: 46\r\n"
829 "This is dummy body1";
830 uint32_t http1_len =
sizeof(http1_buf) - 1;
831 uint32_t http2_len =
sizeof(http2_buf) - 1;
834 memset(&th_v, 0,
sizeof(th_v));
835 memset(&f, 0,
sizeof(f));
836 memset(&ssn, 0,
sizeof(ssn));
843 f.
proto = IPPROTO_TCP;
863 "(msg:\"http host test\"; "
864 "content:\"body1this\"; http_host; "
906 static int DetectHttpHHTest10(
void)
916 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
917 "User-Agent: www.openinfosecfoundation.org\r\n"
918 "Host: This is dummy bodY1";
919 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
920 "Content-Type: text/html\r\n"
921 "Content-Length: 46\r\n"
923 "This is dummy bodY1";
924 uint32_t http1_len =
sizeof(http1_buf) - 1;
925 uint32_t http2_len =
sizeof(http2_buf) - 1;
929 memset(&th_v, 0,
sizeof(th_v));
930 memset(&f, 0,
sizeof(f));
931 memset(&ssn, 0,
sizeof(ssn));
938 f.
proto = IPPROTO_TCP;
960 "(msg:\"http host test\"; "
961 "content:\"body1this\"; http_host; "
972 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
978 if (http_state == NULL) {
979 printf(
"no http state: \n");
988 printf(
"sid 1 didn't match but should have\n");
995 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: \n", r);
1004 printf(
"sid 1 didn't match but should have");
1026 static int DetectHttpHHTest11(
void)
1028 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1029 "User-Agent: www.openinfosecfoundation.org\r\n"
1030 "Host: This is dummy message body\r\n"
1031 "Content-Type: text/html\r\n"
1033 uint32_t http_len =
sizeof(http_buf) - 1;
1034 return RunTest(http_buf, http_len,
1035 "alert http any any -> any any "
1036 "(msg:\"http host test\"; "
1037 "content:!\"message\"; http_host; "
1046 static int DetectHttpHHTest12(
void)
1048 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1049 "User-Agent: www.openinfosecfoundation.org\r\n"
1050 "Host: This is dummy body\r\n"
1052 uint32_t http_len =
sizeof(http_buf) - 1;
1053 return RunTest(http_buf, http_len,
1054 "alert http any any -> any any "
1055 "(msg:\"http host test\"; "
1056 "content:!\"message\"; http_host; "
1065 static int DetectHttpHHTest13(
void)
1067 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1068 "User-Agent: www.openinfosecfoundation.org\r\n"
1069 "Host: longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend\r\n"
1070 "Content-Type: text/html\r\n"
1072 uint32_t http_len =
sizeof(http_buf) - 1;
1073 return RunTest(http_buf, http_len,
1074 "alert http any any -> any any "
1075 "(msg:\"http host test\"; "
1076 "content:\"abcdefghijklmnopqrstuvwxyz0123456789\"; http_host; "
1084 static int DetectHttpHHTest14(
void)
1093 uint8_t httpbuf1[] =
"POST / HTTP/1.1\r\n";
1094 uint8_t httpbuf2[] =
"Cookie: dummy1\r\n";
1095 uint8_t httpbuf3[] =
"Host: Body one!!\r\n\r\n";
1096 uint32_t httplen1 =
sizeof(httpbuf1) - 1;
1097 uint32_t httplen2 =
sizeof(httpbuf2) - 1;
1098 uint32_t httplen3 =
sizeof(httpbuf3) - 1;
1099 uint8_t httpbuf4[] =
"GET /?var=val HTTP/1.1\r\n";
1100 uint8_t httpbuf5[] =
"Cookie: dummy2\r\n";
1101 uint8_t httpbuf6[] =
"Host: Body two\r\n\r\n";
1102 uint32_t httplen4 =
sizeof(httpbuf4) - 1;
1103 uint32_t httplen5 =
sizeof(httpbuf5) - 1;
1104 uint32_t httplen6 =
sizeof(httpbuf6) - 1;
1107 memset(&th_v, 0,
sizeof(th_v));
1108 memset(&f, 0,
sizeof(f));
1109 memset(&ssn, 0,
sizeof(ssn));
1115 f.
proto = IPPROTO_TCP;
1134 "alert tcp any any -> any any (content:\"POST\"; http_method; content:\"dummy1\"; "
1135 "http_cookie; content:\"body one\"; http_host; sid:1; rev:1;)");
1137 printf(
"sig parse failed: ");
1141 "alert tcp any any -> any any (content:\"GET\"; http_method; content:\"dummy2\"; "
1142 "http_cookie; content:\"body two\"; http_host; sid:2; rev:1;)");
1144 printf(
"sig2 parse failed: ");
1154 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1161 printf(
"sig 1 alerted: ");
1168 printf(
"toserver chunk 2 returned %" PRId32
", expected 0: ", r);
1175 printf(
"sig 1 alerted (2): ");
1182 printf(
"toserver chunk 3 returned %" PRId32
", expected 0: ", r);
1189 printf(
"sig 1 didn't alert: ");
1196 printf(
"toserver chunk 5 returned %" PRId32
", expected 0: ", r);
1203 printf(
"sig 1 alerted (4): ");
1210 printf(
"toserver chunk 6 returned %" PRId32
", expected 0: ", r);
1217 printf(
"sig 1 alerted (request 2, chunk 6): ");
1226 printf(
"toserver chunk 7 returned %" PRId32
", expected 0: ", r);
1233 printf(
"signature 2 didn't match or sig 1 matched, but shouldn't have: ");
1239 if (htp_state == NULL) {
1240 printf(
"no http state: ");
1246 printf(
"The http app layer doesn't have 2 transactions, but it should: ");
1254 if (det_ctx != NULL) {
1271 static int DetectHttpHRHTest06(
void)
1273 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1274 "User-Agent: www.openinfosecfoundation.org\r\n"
1275 "Host: This is dummy message body\r\n"
1276 "Content-Type: text/html\r\n"
1278 uint32_t http_len =
sizeof(http_buf) - 1;
1279 return RunTest(http_buf, http_len,
1280 "alert http any any -> any any "
1281 "(msg:\"http host test\"; "
1282 "content:\"message\"; http_raw_host; "
1291 static int DetectHttpHRHTest07(
void)
1301 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1302 "User-Agent: www.openinfosecfoundation.org\r\n"
1303 "Host: This is dummy message";
1304 uint8_t http2_buf[] =
"body1\r\n\r\n";
1305 uint32_t http1_len =
sizeof(http1_buf) - 1;
1306 uint32_t http2_len =
sizeof(http2_buf) - 1;
1310 memset(&th_v, 0,
sizeof(th_v));
1311 memset(&f, 0,
sizeof(f));
1312 memset(&ssn, 0,
sizeof(ssn));
1319 f.
proto = IPPROTO_TCP;
1341 "(msg:\"http host test\"; "
1342 "content:\"message\"; http_raw_host; "
1353 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1359 if (http_state == NULL) {
1360 printf(
"no http state: ");
1368 printf(
"sid 1 matched on p1 but shouldn't have: ");
1375 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1382 printf(
"sid 1 didn't match on p2 but should have: ");
1404 static int DetectHttpHRHTest08(
void)
1414 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1415 "User-Agent: www.openinfosecfoundation.org\r\n"
1416 "host: This is dummy mess";
1417 uint8_t http2_buf[] =
"age body\r\n\r\n";
1418 uint32_t http1_len =
sizeof(http1_buf) - 1;
1419 uint32_t http2_len =
sizeof(http2_buf) - 1;
1423 memset(&th_v, 0,
sizeof(th_v));
1424 memset(&f, 0,
sizeof(f));
1425 memset(&ssn, 0,
sizeof(ssn));
1432 f.
proto = IPPROTO_TCP;
1454 "(msg:\"http host test\"; "
1455 "content:\"message\"; http_raw_host; "
1466 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1472 if (http_state == NULL) {
1473 printf(
"no http state: ");
1482 printf(
"sid 1 didn't match but should have");
1489 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1498 printf(
"sid 1 didn't match but should have");
1520 static int DetectHttpHRHTest09(
void)
1530 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1531 "User-Agent: www.openinfosecfoundation.org\r\n"
1532 "Host: This is dummy body1";
1533 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
1534 "Content-Type: text/html\r\n"
1535 "Content-Length: 46\r\n"
1537 "This is dummy body1";
1538 uint32_t http1_len =
sizeof(http1_buf) - 1;
1539 uint32_t http2_len =
sizeof(http2_buf) - 1;
1543 memset(&th_v, 0,
sizeof(th_v));
1544 memset(&f, 0,
sizeof(f));
1545 memset(&ssn, 0,
sizeof(ssn));
1552 f.
proto = IPPROTO_TCP;
1574 "(msg:\"http host test\"; "
1575 "content:\"body1This\"; http_raw_host; "
1586 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1592 if (http_state == NULL) {
1593 printf(
"no http state: ");
1602 printf(
"sid 1 didn't match but should have");
1609 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1618 printf(
"sid 1 didn't match but should have");
1640 static int DetectHttpHRHTest10(
void)
1650 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
1651 "User-Agent: www.openinfosecfoundation.org\r\n"
1652 "Host: This is dummy bodY1";
1653 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
1654 "Content-Type: text/html\r\n"
1655 "Content-Length: 46\r\n"
1657 "This is dummy bodY1";
1658 uint32_t http1_len =
sizeof(http1_buf) - 1;
1659 uint32_t http2_len =
sizeof(http2_buf) - 1;
1663 memset(&th_v, 0,
sizeof(th_v));
1664 memset(&f, 0,
sizeof(f));
1665 memset(&ssn, 0,
sizeof(ssn));
1672 f.
proto = IPPROTO_TCP;
1694 "(msg:\"http host test\"; "
1695 "content:\"bodY1This\"; http_raw_host; "
1706 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1712 if (http_state == NULL) {
1713 printf(
"no http state: \n");
1722 printf(
"sid 1 didn't match but should have\n");
1729 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: \n", r);
1738 printf(
"sid 1 didn't match but should have");
1760 static int DetectHttpHRHTest11(
void)
1762 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1763 "User-Agent: www.openinfosecfoundation.org\r\n"
1764 "Host: This is dummy message body\r\n"
1765 "Content-Type: text/html\r\n"
1767 uint32_t http_len =
sizeof(http_buf) - 1;
1768 return RunTest(http_buf, http_len,
1769 "alert http any any -> any any "
1770 "(msg:\"http host test\"; "
1771 "content:!\"message\"; http_raw_host; "
1780 static int DetectHttpHRHTest12(
void)
1782 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1783 "User-Agent: www.openinfosecfoundation.org\r\n"
1784 "Host: This is dummy body\r\n"
1786 uint32_t http_len =
sizeof(http_buf) - 1;
1787 return RunTest(http_buf, http_len,
1788 "alert http any any -> any any "
1789 "(msg:\"http host test\"; "
1790 "content:!\"message\"; http_raw_host; "
1799 static int DetectHttpHRHTest13(
void)
1801 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
1802 "User-Agent: www.openinfosecfoundation.org\r\n"
1803 "Host: longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend\r\n"
1804 "Content-Type: text/html\r\n"
1806 uint32_t http_len =
sizeof(http_buf) - 1;
1807 return RunTest(http_buf, http_len,
1808 "alert http any any -> any any "
1809 "(msg:\"http host test\"; "
1810 "content:\"abcdefghijklmnopqrstuvwxyz0123456789\"; http_raw_host; "
1818 static int DetectHttpHRHTest14(
void)
1827 uint8_t httpbuf1[] =
"POST / HTTP/1.1\r\n";
1828 uint8_t httpbuf2[] =
"Cookie: dummy1\r\n";
1829 uint8_t httpbuf3[] =
"Host: Body one!!\r\n\r\n";
1830 uint32_t httplen1 =
sizeof(httpbuf1) - 1;
1831 uint32_t httplen2 =
sizeof(httpbuf2) - 1;
1832 uint32_t httplen3 =
sizeof(httpbuf3) - 1;
1833 uint8_t httpbuf4[] =
"GET /?var=val HTTP/1.1\r\n";
1834 uint8_t httpbuf5[] =
"Cookie: dummy2\r\n";
1835 uint8_t httpbuf6[] =
"Host: Body two\r\n\r\n";
1836 uint32_t httplen4 =
sizeof(httpbuf4) - 1;
1837 uint32_t httplen5 =
sizeof(httpbuf5) - 1;
1838 uint32_t httplen6 =
sizeof(httpbuf6) - 1;
1841 memset(&th_v, 0,
sizeof(th_v));
1842 memset(&f, 0,
sizeof(f));
1843 memset(&ssn, 0,
sizeof(ssn));
1849 f.
proto = IPPROTO_TCP;
1868 "alert tcp any any -> any any (content:\"POST\"; http_method; content:\"dummy1\"; "
1869 "http_cookie; content:\"Body one\"; http_raw_host; sid:1; rev:1;)");
1871 printf(
"sig parse failed: ");
1875 "alert tcp any any -> any any (content:\"GET\"; http_method; content:\"dummy2\"; "
1876 "http_cookie; content:\"Body two\"; http_raw_host; sid:2; rev:1;)");
1878 printf(
"sig2 parse failed: ");
1888 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
1895 printf(
"sig 1 alerted: ");
1902 printf(
"toserver chunk 2 returned %" PRId32
", expected 0: ", r);
1909 printf(
"sig 1 alerted (2): ");
1916 printf(
"toserver chunk 3 returned %" PRId32
", expected 0: ", r);
1923 printf(
"sig 1 didn't alert: ");
1930 printf(
"toserver chunk 5 returned %" PRId32
", expected 0: ", r);
1937 printf(
"sig 1 alerted (4): ");
1944 printf(
"toserver chunk 6 returned %" PRId32
", expected 0: ", r);
1951 printf(
"sig 1 alerted (request 2, chunk 6): ");
1960 printf(
"toserver chunk 7 returned %" PRId32
", expected 0: ", r);
1967 printf(
"signature 2 didn't match or sig 1 matched, but shouldn't have: ");
1973 if (htp_state == NULL) {
1974 printf(
"no http state: ");
1980 printf(
"The http app layer doesn't have 2 transactions, but it should: ");
1988 if (det_ctx != NULL) {
2005 static int DetectHttpHRHTest37(
void)
2015 uint8_t http1_buf[] =
"GET /index.html HTTP/1.0\r\n"
2016 "User-Agent: www.openinfosecfoundation.org\r\n"
2017 "Host: This is dummy bodY1";
2018 uint8_t http2_buf[] =
"This is dummy message body2\r\n"
2019 "Content-Type: text/html\r\n"
2020 "Content-Length: 46\r\n"
2022 "This is dummy bodY1";
2023 uint32_t http1_len =
sizeof(http1_buf) - 1;
2024 uint32_t http2_len =
sizeof(http2_buf) - 1;
2028 memset(&th_v, 0,
sizeof(th_v));
2029 memset(&f, 0,
sizeof(f));
2030 memset(&ssn, 0,
sizeof(ssn));
2037 f.
proto = IPPROTO_TCP;
2059 "(msg:\"http host test\"; "
2060 "content:\"body1this\"; http_raw_host; nocase; "
2071 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: ", r);
2077 if (http_state == NULL) {
2078 printf(
"no http state: \n");
2087 printf(
"sid 1 didn't match but should have\n");
2094 printf(
"toserver chunk 1 returned %" PRId32
", expected 0: \n", r);
2103 printf(
"sid 1 didn't match but should have");
2125 static int DetectEngineHttpHRHTest01(
void)
2127 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2129 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2130 uint32_t http_len =
sizeof(http_buf) - 1;
2131 return RunTest(http_buf, http_len,
2132 "alert http any any -> any any "
2133 "(msg:\"http host header test\"; "
2134 "content:\"CONNECT\"; http_raw_host; "
2143 static int DetectEngineHttpHRHTest02(
void)
2145 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2147 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2148 uint32_t http_len =
sizeof(http_buf) - 1;
2149 return RunTest(http_buf, http_len,
2150 "alert http any any -> any any "
2151 "(msg:\"http host header test\"; "
2152 "content:\"CO\"; depth:4; http_raw_host; "
2161 static int DetectEngineHttpHRHTest03(
void)
2163 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2165 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2166 uint32_t http_len =
sizeof(http_buf) - 1;
2167 return RunTest(http_buf, http_len,
2168 "alert http any any -> any any "
2169 "(msg:\"http_raw_host header test\"; "
2170 "content:!\"ECT\"; depth:4; http_raw_host; "
2179 static int DetectEngineHttpHRHTest04(
void)
2181 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2183 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2184 uint32_t http_len =
sizeof(http_buf) - 1;
2185 return RunTest(http_buf, http_len,
2186 "alert http any any -> any any "
2187 "(msg:\"http host header test\"; "
2188 "content:\"ECT\"; depth:4; http_raw_host; "
2197 static int DetectEngineHttpHRHTest05(
void)
2199 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2201 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2202 uint32_t http_len =
sizeof(http_buf) - 1;
2203 return RunTest(http_buf, http_len,
2204 "alert http any any -> any any "
2205 "(msg:\"http host header test\"; "
2206 "content:!\"CON\"; depth:4; http_raw_host; "
2215 static int DetectEngineHttpHRHTest06(
void)
2217 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2219 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2220 uint32_t http_len =
sizeof(http_buf) - 1;
2221 return RunTest(http_buf, http_len,
2222 "alert http any any -> any any "
2223 "(msg:\"http host header test\"; "
2224 "content:\"ECT\"; offset:3; http_raw_host; "
2233 static int DetectEngineHttpHRHTest07(
void)
2235 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2237 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2238 uint32_t http_len =
sizeof(http_buf) - 1;
2239 return RunTest(http_buf, http_len,
2240 "alert http any any -> any any "
2241 "(msg:\"http host header test\"; "
2242 "content:!\"CO\"; offset:3; http_raw_host; "
2251 static int DetectEngineHttpHRHTest08(
void)
2253 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2255 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2256 uint32_t http_len =
sizeof(http_buf) - 1;
2257 return RunTest(http_buf, http_len,
2258 "alert http any any -> any any "
2259 "(msg:\"http host header test\"; "
2260 "content:!\"ECT\"; offset:3; http_raw_host; "
2269 static int DetectEngineHttpHRHTest09(
void)
2271 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2273 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2274 uint32_t http_len =
sizeof(http_buf) - 1;
2275 return RunTest(http_buf, http_len,
2276 "alert http any any -> any any "
2277 "(msg:\"http host header test\"; "
2278 "content:\"CON\"; offset:3; http_raw_host; "
2287 static int DetectEngineHttpHRHTest10(
void)
2289 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2291 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2292 uint32_t http_len =
sizeof(http_buf) - 1;
2293 return RunTest(http_buf, http_len,
2294 "alert http any any -> any any "
2295 "(msg:\"http_raw_host header test\"; "
2296 "content:\"CO\"; http_raw_host; "
2297 "content:\"EC\"; within:4; http_raw_host; "
2306 static int DetectEngineHttpHRHTest11(
void)
2308 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2310 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2311 uint32_t http_len =
sizeof(http_buf) - 1;
2312 return RunTest(http_buf, http_len,
2313 "alert http any any -> any any "
2314 "(msg:\"http_raw_host header test\"; "
2315 "content:\"CO\"; http_raw_host; "
2316 "content:!\"EC\"; within:3; http_raw_host; "
2325 static int DetectEngineHttpHRHTest12(
void)
2327 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2329 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2330 uint32_t http_len =
sizeof(http_buf) - 1;
2331 return RunTest(http_buf, http_len,
2332 "alert http any any -> any any "
2333 "(msg:\"http_raw_host header test\"; "
2334 "content:\"CO\"; http_raw_host; "
2335 "content:\"EC\"; within:3; http_raw_host; "
2344 static int DetectEngineHttpHRHTest13(
void)
2346 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2348 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2349 uint32_t http_len =
sizeof(http_buf) - 1;
2350 return RunTest(http_buf, http_len,
2351 "alert http any any -> any any "
2352 "(msg:\"http_raw_host header test\"; "
2353 "content:\"CO\"; http_raw_host; "
2354 "content:!\"EC\"; within:4; http_raw_host; "
2363 static int DetectEngineHttpHRHTest14(
void)
2365 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2367 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2368 uint32_t http_len =
sizeof(http_buf) - 1;
2369 return RunTest(http_buf, http_len,
2370 "alert http any any -> any any "
2371 "(msg:\"http_raw_host header test\"; "
2372 "content:\"CO\"; http_raw_host; "
2373 "content:\"EC\"; distance:2; http_raw_host; "
2382 static int DetectEngineHttpHRHTest15(
void)
2384 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2386 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2387 uint32_t http_len =
sizeof(http_buf) - 1;
2388 return RunTest(http_buf, http_len,
2389 "alert http any any -> any any "
2390 "(msg:\"http_raw_host header test\"; "
2391 "content:\"CO\"; http_raw_host; "
2392 "content:!\"EC\"; distance:3; http_raw_host; "
2401 static int DetectEngineHttpHRHTest16(
void)
2403 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2405 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2406 uint32_t http_len =
sizeof(http_buf) - 1;
2407 return RunTest(http_buf, http_len,
2408 "alert http any any -> any any "
2409 "(msg:\"http_raw_host header test\"; "
2410 "content:\"CO\"; http_raw_host; "
2411 "content:\"EC\"; distance:3; http_raw_host; "
2420 static int DetectEngineHttpHRHTest17(
void)
2422 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2424 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2425 uint32_t http_len =
sizeof(http_buf) - 1;
2426 return RunTest(http_buf, http_len,
2427 "alert http any any -> any any "
2428 "(msg:\"http_raw_host header test\"; "
2429 "content:\"CO\"; http_raw_host; "
2430 "content:!\"EC\"; distance:2; http_raw_host; "
2435 static int DetectEngineHttpHRHTest18(
void)
2437 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2438 "Host: www.kaboom.com:8080\r\n"
2439 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2440 uint32_t http_len =
sizeof(http_buf) - 1;
2441 return RunTest(http_buf, http_len,
2442 "alert http any any -> any any "
2443 "(msg:\"http_raw_host header test\"; "
2444 "content:\"kaboom\"; http_raw_host; nocase; "
2449 static int DetectEngineHttpHRHTest19(
void)
2451 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2452 "Host: www.kaboom.com:8080\r\n"
2453 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2454 uint32_t http_len =
sizeof(http_buf) - 1;
2455 return RunTest(http_buf, http_len,
2456 "alert http any any -> any any "
2457 "(msg:\"http_raw_host header test\"; "
2458 "content:\"kaboom\"; http_raw_host; nocase; "
2463 static int DetectEngineHttpHRHTest20(
void)
2465 uint8_t http_buf[] =
"GET /index.html HTTP/1.0\r\n"
2466 "Host: www.kaboom.com:8080\r\n"
2467 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2468 uint32_t http_len =
sizeof(http_buf) - 1;
2469 return RunTest(http_buf, http_len,
2470 "alert http any any -> any any "
2471 "(msg:\"http_raw_host header test\"; "
2472 "content:\"8080\"; http_raw_host; nocase; "
2477 static int DetectEngineHttpHRHTest21(
void)
2479 uint8_t http_buf[] =
"GET http://www.kaboom.com/index.html HTTP/1.0\r\n"
2480 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2481 uint32_t http_len =
sizeof(http_buf) - 1;
2482 return RunTest(http_buf, http_len,
2483 "alert http any any -> any any "
2484 "(msg:\"http_raw_host header test\"; "
2485 "content:\"kaboom\"; http_raw_host; nocase; "
2490 static int DetectEngineHttpHRHTest22(
void)
2492 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2493 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2494 uint32_t http_len =
sizeof(http_buf) - 1;
2495 return RunTest(http_buf, http_len,
2496 "alert http any any -> any any "
2497 "(msg:\"http_raw_host header test\"; "
2498 "content:\"kaboom\"; http_raw_host; nocase; "
2503 static int DetectEngineHttpHRHTest23(
void)
2505 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2506 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2507 uint32_t http_len =
sizeof(http_buf) - 1;
2508 return RunTest(http_buf, http_len,
2509 "alert http any any -> any any "
2510 "(msg:\"http_raw_host header test\"; "
2511 "content:\"8080\"; http_raw_host; nocase; "
2516 static int DetectEngineHttpHRHTest24(
void)
2518 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2519 "Host: www.rabbit.com\r\n"
2520 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2521 uint32_t http_len =
sizeof(http_buf) - 1;
2522 return RunTest(http_buf, http_len,
2523 "alert http any any -> any any "
2524 "(msg:\"http_raw_host header test\"; "
2525 "content:\"kaboom\"; http_raw_host; nocase; "
2530 static int DetectEngineHttpHRHTest25(
void)
2532 uint8_t http_buf[] =
"GET http://www.kaboom.com:8080/index.html HTTP/1.0\r\n"
2533 "Host: www.rabbit.com\r\n"
2534 "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n";
2535 uint32_t http_len =
sizeof(http_buf) - 1;
2536 return RunTest(http_buf, http_len,
2537 "alert http any any -> any any "
2538 "(msg:\"http_raw_host header test\"; "
2539 "content:\"rabbit\"; http_raw_host; nocase; "
2561 UtRegisterTest(
"DetectEngineHttpHHTest01", DetectEngineHttpHHTest01);
2562 UtRegisterTest(
"DetectEngineHttpHHTest02", DetectEngineHttpHHTest02);
2563 UtRegisterTest(
"DetectEngineHttpHHTest03", DetectEngineHttpHHTest03);
2564 UtRegisterTest(
"DetectEngineHttpHHTest04", DetectEngineHttpHHTest04);
2565 UtRegisterTest(
"DetectEngineHttpHHTest05", DetectEngineHttpHHTest05);
2566 UtRegisterTest(
"DetectEngineHttpHHTest06", DetectEngineHttpHHTest06);
2567 UtRegisterTest(
"DetectEngineHttpHHTest07", DetectEngineHttpHHTest07);
2568 UtRegisterTest(
"DetectEngineHttpHHTest08", DetectEngineHttpHHTest08);
2569 UtRegisterTest(
"DetectEngineHttpHHTest09", DetectEngineHttpHHTest09);
2570 UtRegisterTest(
"DetectEngineHttpHHTest10", DetectEngineHttpHHTest10);
2571 UtRegisterTest(
"DetectEngineHttpHHTest11", DetectEngineHttpHHTest11);
2572 UtRegisterTest(
"DetectEngineHttpHHTest12", DetectEngineHttpHHTest12);
2573 UtRegisterTest(
"DetectEngineHttpHHTest13", DetectEngineHttpHHTest13);
2574 UtRegisterTest(
"DetectEngineHttpHHTest14", DetectEngineHttpHHTest14);
2575 UtRegisterTest(
"DetectEngineHttpHHTest15", DetectEngineHttpHHTest15);
2576 UtRegisterTest(
"DetectEngineHttpHHTest16", DetectEngineHttpHHTest16);
2577 UtRegisterTest(
"DetectEngineHttpHHTest17", DetectEngineHttpHHTest17);
2578 UtRegisterTest(
"DetectEngineHttpHHTest18", DetectEngineHttpHHTest18);
2579 UtRegisterTest(
"DetectEngineHttpHHTest19", DetectEngineHttpHHTest19);
2580 UtRegisterTest(
"DetectEngineHttpHHTest20", DetectEngineHttpHHTest20);
2581 UtRegisterTest(
"DetectEngineHttpHHTest21", DetectEngineHttpHHTest21);
2582 UtRegisterTest(
"DetectEngineHttpHHTest22", DetectEngineHttpHHTest22);
2583 UtRegisterTest(
"DetectEngineHttpHHTest23", DetectEngineHttpHHTest23);
2584 UtRegisterTest(
"DetectEngineHttpHHTest24", DetectEngineHttpHHTest24);
2585 UtRegisterTest(
"DetectEngineHttpHHTest25", DetectEngineHttpHHTest25);
2599 UtRegisterTest(
"DetectEngineHttpHRHTest01", DetectEngineHttpHRHTest01);
2600 UtRegisterTest(
"DetectEngineHttpHRHTest02", DetectEngineHttpHRHTest02);
2601 UtRegisterTest(
"DetectEngineHttpHRHTest03", DetectEngineHttpHRHTest03);
2602 UtRegisterTest(
"DetectEngineHttpHRHTest04", DetectEngineHttpHRHTest04);
2603 UtRegisterTest(
"DetectEngineHttpHRHTest05", DetectEngineHttpHRHTest05);
2604 UtRegisterTest(
"DetectEngineHttpHRHTest06", DetectEngineHttpHRHTest06);
2605 UtRegisterTest(
"DetectEngineHttpHRHTest07", DetectEngineHttpHRHTest07);
2606 UtRegisterTest(
"DetectEngineHttpHRHTest08", DetectEngineHttpHRHTest08);
2607 UtRegisterTest(
"DetectEngineHttpHRHTest09", DetectEngineHttpHRHTest09);
2608 UtRegisterTest(
"DetectEngineHttpHRHTest10", DetectEngineHttpHRHTest10);
2609 UtRegisterTest(
"DetectEngineHttpHRHTest11", DetectEngineHttpHRHTest11);
2610 UtRegisterTest(
"DetectEngineHttpHRHTest12", DetectEngineHttpHRHTest12);
2611 UtRegisterTest(
"DetectEngineHttpHRHTest13", DetectEngineHttpHRHTest13);
2612 UtRegisterTest(
"DetectEngineHttpHRHTest14", DetectEngineHttpHRHTest14);
2613 UtRegisterTest(
"DetectEngineHttpHRHTest15", DetectEngineHttpHRHTest15);
2614 UtRegisterTest(
"DetectEngineHttpHRHTest16", DetectEngineHttpHRHTest16);
2615 UtRegisterTest(
"DetectEngineHttpHRHTest17", DetectEngineHttpHRHTest17);
2616 UtRegisterTest(
"DetectEngineHttpHRHTest18", DetectEngineHttpHRHTest18);
2617 UtRegisterTest(
"DetectEngineHttpHRHTest19", DetectEngineHttpHRHTest19);
2618 UtRegisterTest(
"DetectEngineHttpHRHTest20", DetectEngineHttpHRHTest20);
2619 UtRegisterTest(
"DetectEngineHttpHRHTest21", DetectEngineHttpHRHTest21);
2620 UtRegisterTest(
"DetectEngineHttpHRHTest22", DetectEngineHttpHRHTest22);
2621 UtRegisterTest(
"DetectEngineHttpHRHTest23", DetectEngineHttpHRHTest23);
2622 UtRegisterTest(
"DetectEngineHttpHRHTest24", DetectEngineHttpHRHTest24);
2623 UtRegisterTest(
"DetectEngineHttpHRHTest25", DetectEngineHttpHRHTest25);