de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:\"CONNECT\"; http_host; nocase; "
+ "content:\"connect\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:\"CO\"; depth:4; http_host; nocase; "
+ "content:\"co\"; depth:4; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:!\"ECT\"; depth:4; http_host; nocase; "
+ "content:!\"ect\"; depth:4; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:\"ECT\"; depth:4; http_host; nocase; "
+ "content:\"ect\"; depth:4; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:!\"CON\"; depth:4; http_host; nocase; "
+ "content:!\"con\"; depth:4; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:\"ECT\"; offset:3; http_host; nocase; "
+ "content:\"ect\"; offset:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:!\"CO\"; offset:3; http_host; nocase; "
+ "content:!\"co\"; offset:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:!\"ECT\"; offset:3; http_host; nocase; "
+ "content:!\"ect\"; offset:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host header test\"; "
- "content:\"CON\"; offset:3; http_host; nocase; "
+ "content:\"con\"; offset:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:\"EC\"; within:4; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:\"ec\"; within:4; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:!\"EC\"; within:3; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:!\"ec\"; within:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:\"EC\"; within:3; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:\"ec\"; within:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:!\"EC\"; within:4; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:!\"ec\"; within:4; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:\"EC\"; distance:2; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:\"ec\"; distance:2; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:!\"EC\"; distance:3; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:!\"ec\"; distance:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:\"EC\"; distance:3; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:\"ec\"; distance:3; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"CO\"; http_host; nocase; "
- "content:!\"EC\"; distance:2; http_host; nocase; "
+ "content:\"co\"; http_host; "
+ "content:!\"ec\"; distance:2; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"kaboom\"; http_host; nocase; "
+ "content:\"kaboom\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"kaboom\"; http_host; nocase; "
+ "content:\"kaboom\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"8080\"; http_host; nocase; "
+ "content:\"8080\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"kaboom\"; http_host; nocase; "
+ "content:\"kaboom\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"kaboom\"; http_host; nocase; "
+ "content:\"kaboom\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"8080\"; http_host; nocase; "
+ "content:\"8080\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"kaboom\"; http_host; nocase; "
+ "content:\"kaboom\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http_host header test\"; "
- "content:\"rabbit\"; http_host; nocase; "
+ "content:\"rabbit\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
ud->flags & DETECT_CONTENT_NEGATED &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; fast_pattern:only; http_host; nocase; "
+ "(content:\"one\"; fast_pattern:only; http_host; "
"msg:\"Testing fast_pattern\"; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
sm = de_ctx->sig_list->sm_lists[DETECT_SM_LIST_HHHDMATCH];
if (sm != NULL) {
if ( (((DetectContentData *)sm->ctx)->flags &
- DETECT_CONTENT_FAST_PATTERN) &&
- (((DetectContentData *)sm->ctx)->flags &
- DETECT_CONTENT_NOCASE)) {
+ DETECT_CONTENT_FAST_PATTERN)) {
result = 1;
} else {
result = 0;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"oneoneone\"; fast_pattern:3,4; http_host; nocase; "
+ "(content:\"oneoneone\"; fast_pattern:3,4; http_host; "
"msg:\"Testing fast_pattern\"; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
sm = de_ctx->sig_list->sm_lists[DETECT_SM_LIST_HHHDMATCH];
if (sm != NULL) {
if ( (((DetectContentData *)sm->ctx)->flags &
- DETECT_CONTENT_FAST_PATTERN) &&
- (((DetectContentData *)sm->ctx)->flags &
- DETECT_CONTENT_NOCASE)) {
+ DETECT_CONTENT_FAST_PATTERN)) {
result = 1;
} else {
result = 0;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
}
DetectContentData *ud = sm->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP) &&
ud->fp_chop_offset == 0 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"oneoneone\"; fast_pattern:3,4; http_host; nocase; sid:1;)");
+ "(content:\"oneoneone\"; fast_pattern:3,4; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = sm->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; distance:10; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; fast_pattern:only; http_host; distance:10; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; distance:10; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; distance:10; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; within:10; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; fast_pattern:only; http_host; within:10; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; within:10; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; within:10; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; offset:10; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; fast_pattern:only; http_host; offset:10; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; offset:10; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; offset:10; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; depth:10; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; fast_pattern:only; http_host; depth:10; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; depth:10; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; depth:10; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"two\"; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"two\"; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\" one\"; http_host; nocase; "
- "content:\"two\"; http_host; distance:30; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\" one\"; http_host; "
+ "content:\"two\"; http_host; distance:30; "
+ "content:\"two\"; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP) &&
ud->fp_chop_offset == 0 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; within:30; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; within:30; "
+ "content:\"two\"; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP) &&
ud->fp_chop_offset == 0 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; offset:30; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; offset:30; "
+ "content:\"two\"; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP) &&
ud->fp_chop_offset == 0 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; depth:30; nocase; "
- "content:\"two\"; fast_pattern:only; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; depth:30; "
+ "content:\"two\"; fast_pattern:only; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP) &&
ud->fp_chop_offset == 0 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:!\"one\"; fast_pattern; http_host; nocase; "
- "content:\"two\"; http_host; nocase; sid:1;)");
+ "(content:!\"one\"; fast_pattern; http_host; "
+ "content:\"two\"; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_NEGATED &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP) &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"two\"; http_host; nocase; "
- "content:!\"one\"; fast_pattern; http_host; distance:20; nocase; sid:1;)");
+ "(content:\"two\"; http_host; "
+ "content:!\"one\"; fast_pattern; http_host; distance:20; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"two\"; http_host; nocase; "
- "content:!\"one\"; fast_pattern; http_host; within:20; nocase; sid:1;)");
+ "(content:\"two\"; http_host; "
+ "content:!\"one\"; fast_pattern; http_host; within:20; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"two\"; http_host; nocase; "
- "content:!\"one\"; fast_pattern; http_host; offset:20; nocase; sid:1;)");
+ "(content:\"two\"; http_host; "
+ "content:!\"one\"; fast_pattern; http_host; offset:20; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"two\"; http_host; nocase; "
- "content:!\"one\"; fast_pattern; http_host; depth:20; nocase; sid:1;)");
+ "(content:\"two\"; http_host; "
+ "content:!\"one\"; fast_pattern; http_host; depth:20; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; distance:30; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; distance:30; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; within:30; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; within:30; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; offset:30; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; offset:30; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; depth:30; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; depth:30; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; distance:10; nocase; "
- "content:\"oneonethree\"; fast_pattern:3,4; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; distance:10; "
+ "content:\"oneonethree\"; fast_pattern:3,4; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; within:10; nocase; "
- "content:\"oneonethree\"; fast_pattern:3,4; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; within:10; "
+ "content:\"oneonethree\"; fast_pattern:3,4; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; offset:10; nocase; "
- "content:\"oneonethree\"; fast_pattern:3,4; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; offset:10; "
+ "content:\"oneonethree\"; fast_pattern:3,4; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; http_host; depth:10; nocase; "
- "content:\"oneonethree\"; fast_pattern:3,4; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; http_host; depth:10; "
+ "content:\"oneonethree\"; fast_pattern:3,4; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
ud->fp_chop_offset == 3 &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; fast_pattern:65977,4; http_host; nocase; "
- "content:\"three\"; http_host; distance:10; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; fast_pattern:65977,4; http_host; "
+ "content:\"three\"; http_host; distance:10; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"oneonetwo\"; fast_pattern:3,65977; http_host; nocase; "
- "content:\"three\"; distance:10; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"oneonetwo\"; fast_pattern:3,65977; http_host; "
+ "content:\"three\"; distance:10; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; fast_pattern:65534,4; http_host; nocase; "
- "content:\"three\"; http_host; distance:10; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; fast_pattern:65534,4; http_host; "
+ "content:\"three\"; http_host; distance:10; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_NEGATED &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; distance:10; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; distance:10; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; within:10; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; within:10; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; offset:10; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; offset:10; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; depth:10; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; depth:10; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; nocase; "
- "content:\"three\"; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:!\"oneonetwo\"; fast_pattern:3,4; http_host; "
+ "content:\"three\"; http_host; sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
DetectContentData *ud = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
if (ud->flags & DETECT_CONTENT_FAST_PATTERN &&
- ud->flags & DETECT_CONTENT_NOCASE &&
ud->flags & DETECT_CONTENT_NEGATED &&
!(ud->flags & DETECT_CONTENT_FAST_PATTERN_ONLY) &&
ud->flags & DETECT_CONTENT_FAST_PATTERN_CHOP &&
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"Testing http_host\"; "
- "content:\"one\"; http_host; nocase; sid:1;)");
+ "content:\"one\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL) {
result = 1;
} else {
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"Testing http_host\"; "
- "content:\"one\"; http_host; nocase; sid:1;)");
+ "content:\"one\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
result = 1;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"Testing http_host\"; "
- "content:\"one\"; http_host; nocase; sid:1;)");
+ "content:\"one\"; http_host; sid:1;)");
if (de_ctx->sig_list != NULL)
result = 1;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:\"message\"; http_host; nocase; "
+ "content:\"message\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:\"message\"; http_host; nocase; "
+ "content:\"message\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:\"message\"; http_host; nocase; "
+ "content:\"message\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:\"body1This\"; http_host; nocase; "
+ "content:\"body1this\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:\"body1this\"; http_host; nocase;"
+ "content:\"body1this\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:!\"message\"; http_host; nocase; "
+ "content:!\"message\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:!\"message\"; http_host; nocase; "
+ "content:!\"message\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any "
"(msg:\"http host test\"; "
- "content:\"abcdefghijklmnopqrstuvwxyz0123456789\"; http_host; nocase; "
+ "content:\"abcdefghijklmnopqrstuvwxyz0123456789\"; http_host; "
"sid:1;)");
if (de_ctx->sig_list == NULL)
goto end;
de_ctx->flags |= DE_QUIET;
- s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any (content:\"POST\"; http_method; content:\"dummy1\"; http_cookie; content:\"Body one\"; http_host; nocase; sid:1; rev:1;)");
+ s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any (content:\"POST\"; http_method; content:\"dummy1\"; http_cookie; content:\"body one\"; http_host; sid:1; rev:1;)");
if (s == NULL) {
printf("sig parse failed: ");
goto end;
}
- s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any (content:\"GET\"; http_method; content:\"dummy2\"; http_cookie; content:\"Body two\"; http_host; nocase; sid:2; rev:1;)");
+ s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any (content:\"GET\"; http_method; content:\"dummy2\"; http_cookie; content:\"body two\"; http_host; sid:2; rev:1;)");
if (s == NULL) {
printf("sig2 parse failed: ");
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; content:\"two\"; http_host; nocase; "
- "content:\"three\"; distance:10; http_host; nocase; content:\"four\"; sid:1;)");
+ "(content:\"one\"; content:\"two\"; http_host; "
+ "content:\"three\"; distance:10; http_host; content:\"four\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (cd1->flags != 0 || memcmp(cd1->content, "one", cd1->content_len) != 0 ||
cd2->flags != 0 || memcmp(cd2->content, "four", cd2->content_len) != 0 ||
- hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "two", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE) ||
memcmp(hhhd2->content, "three", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; pcre:/two/; "
- "content:\"three\"; distance:10; http_host; nocase; content:\"four\"; sid:1;)");
+ "(content:\"one\"; http_host; pcre:/two/; "
+ "content:\"three\"; distance:10; http_host; content:\"four\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (pd1->flags != 0 ||
cd2->flags != 0 || memcmp(cd2->content, "four", cd2->content_len) != 0 ||
- hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE) ||
memcmp(hhhd2->content, "three", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; pcre:/two/; "
- "content:\"three\"; distance:10; within:15; http_host; nocase; content:\"four\"; sid:1;)");
+ "(content:\"one\"; http_host; pcre:/two/; "
+ "content:\"three\"; distance:10; within:15; http_host; content:\"four\"; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
if (pd1->flags != 0 ||
cd2->flags != 0 || memcmp(cd2->content, "four", cd2->content_len) != 0 ||
- hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_WITHIN | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_WITHIN) ||
memcmp(hhhd2->content, "three", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; pcre:/two/; "
- "content:\"three\"; distance:10; http_host; nocase; "
+ "(content:\"one\"; http_host; pcre:/two/; "
+ "content:\"three\"; distance:10; http_host; "
"content:\"four\"; distance:10; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
if (pd1->flags != DETECT_PCRE_RELATIVE_NEXT ||
cd2->flags != DETECT_CONTENT_DISTANCE ||
memcmp(cd2->content, "four", cd2->content_len) != 0 ||
- hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE) ||
memcmp(hhhd2->content, "three", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; offset:10; http_host; nocase; pcre:/two/; "
- "content:\"three\"; distance:10; http_host; nocase; within:10; "
+ "(content:\"one\"; offset:10; http_host; pcre:/two/; "
+ "content:\"three\"; distance:10; http_host; within:10; "
"content:\"four\"; distance:10; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
if (pd1->flags != (DETECT_PCRE_RELATIVE_NEXT) ||
cd2->flags != DETECT_CONTENT_DISTANCE ||
memcmp(cd2->content, "four", cd2->content_len) != 0 ||
- hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_OFFSET | DETECT_CONTENT_NOCASE) ||
+ hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_OFFSET) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_WITHIN | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_WITHIN) ||
memcmp(hhhd2->content, "three", hhhd1->content_len) != 0) {
printf ("failed: http_host incorrect flags");
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; offset:10; http_host; nocase; pcre:/two/; "
- "content:\"three\"; distance:10; http_host; nocase; within:10; "
+ "(content:\"one\"; offset:10; http_host; pcre:/two/; "
+ "content:\"three\"; distance:10; http_host; within:10; "
"content:\"four\"; distance:10; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; pcre:/two/; "
- "content:\"three\"; http_host; nocase; depth:10; "
+ "(content:\"one\"; http_host; pcre:/two/; "
+ "content:\"three\"; http_host; depth:10; "
"content:\"four\"; distance:10; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
if (pd1->flags != (DETECT_PCRE_RELATIVE_NEXT) ||
cd2->flags != DETECT_CONTENT_DISTANCE ||
memcmp(cd2->content, "four", cd2->content_len) != 0 ||
- hhhd1->flags != (DETECT_CONTENT_NOCASE) ||
+ hhhd1->flags != (0) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DEPTH | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DEPTH) ||
memcmp(hhhd2->content, "three", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; distance:0; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; distance:0; http_host; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectContentData *hhhd1 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
- if (hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ if (hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE) ||
memcmp(hhhd2->content, "two", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; "
- "content:\"two\"; within:5; http_host; nocase; sid:1;)");
+ "(content:\"one\"; http_host; "
+ "content:\"two\"; within:5; http_host; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectContentData *hhhd1 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
- if (hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ if (hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "one", hhhd1->content_len) != 0 ||
- hhhd2->flags != (DETECT_CONTENT_WITHIN | DETECT_CONTENT_NOCASE) ||
+ hhhd2->flags != (DETECT_CONTENT_WITHIN) ||
memcmp(hhhd2->content, "two", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; within:5; http_host; nocase; sid:1;)");
+ "(content:\"one\"; within:5; http_host; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"one\"; http_host; nocase; within:5; sid:1;)");
+ "(content:\"one\"; http_host; within:5; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list != NULL\n");
goto end;
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(pcre:/one/Wi; "
- "content:\"two\"; within:5; http_host; nocase; sid:1;)");
+ "(pcre:/one/W; "
+ "content:\"two\"; within:5; http_host; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectPcreData *pd1 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
- if (pd1->flags != (DETECT_PCRE_RELATIVE_NEXT | DETECT_PCRE_HTTP_HOST | DETECT_PCRE_CASELESS) ||
- hhhd2->flags != (DETECT_CONTENT_WITHIN | DETECT_CONTENT_NOCASE) ||
+ if (pd1->flags != (DETECT_PCRE_RELATIVE_NEXT | DETECT_PCRE_HTTP_HOST) ||
+ hhhd2->flags != (DETECT_CONTENT_WITHIN) ||
memcmp(hhhd2->content, "two", hhhd2->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(content:\"two\"; http_host; nocase; "
- "pcre:/one/WRi; sid:1;)");
+ "(content:\"two\"; http_host; "
+ "pcre:/one/WR; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectContentData *hhhd1 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
DetectPcreData *pd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
- if (pd2->flags != (DETECT_PCRE_RELATIVE | DETECT_PCRE_HTTP_HOST | DETECT_PCRE_CASELESS) ||
- hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT | DETECT_CONTENT_NOCASE) ||
+ if (pd2->flags != (DETECT_PCRE_RELATIVE | DETECT_PCRE_HTTP_HOST) ||
+ hhhd1->flags != (DETECT_CONTENT_RELATIVE_NEXT) ||
memcmp(hhhd1->content, "two", hhhd1->content_len) != 0) {
goto end;
}
de_ctx->flags |= DE_QUIET;
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
- "(pcre:/one/Wi; "
- "content:\"two\"; distance:5; http_host; nocase; sid:1;)");
+ "(pcre:/one/W; "
+ "content:\"two\"; distance:5; http_host; sid:1;)");
if (de_ctx->sig_list == NULL) {
printf("de_ctx->sig_list == NULL\n");
goto end;
DetectPcreData *pd1 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->prev->ctx;
DetectContentData *hhhd2 = de_ctx->sig_list->sm_lists_tail[DETECT_SM_LIST_HHHDMATCH]->ctx;
- if (pd1->flags != (DETECT_PCRE_RELATIVE_NEXT | DETECT_PCRE_HTTP_HOST | DETECT_PCRE_CASELESS) ||
- hhhd2->flags != (DETECT_CONTENT_DISTANCE | DETECT_CONTENT_NOCASE) ||
+ if (pd1->flags != (DETECT_PCRE_RELATIVE_NEXT | DETECT_PCRE_HTTP_HOST) ||
+ hhhd2->flags != (DETECT_CONTENT_DISTANCE) ||
memcmp(hhhd2->content, "two", hhhd2->content_len) != 0) {
goto end;
}
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-debug.h"
+#include "util-memcmp.h"
#include "string.h"
#include "detect-parse.h"
#include "detect-engine-iponly.h"
sm != NULL; sm = sm->next) {
if (sm->type == DETECT_CONTENT) {
DetectContentData *cd = (DetectContentData *)sm->ctx;
- if (!(cd->flags & DETECT_CONTENT_NOCASE)) {
- SCLogError(SC_ERR_INVALID_SIGNATURE, "http_host keyword "
- "requires the \"nocase\" modifier to be set.");
- SCReturnInt(0);
- }
- } else if (sm->type == DETECT_PCRE) {
- DetectPcreData *pd = (DetectPcreData *)sm->ctx;
- if (!(pd->flags & DETECT_PCRE_CASELESS)) {
- SCLogError(SC_ERR_INVALID_SIGNATURE, "pcre http_host "
- "modifier requires the nocase modifier "
- "\"i\"to be set");
- SCReturnInt(0);
- }
+ if (cd->flags & DETECT_CONTENT_NOCASE) {
+ SCLogWarning(SC_ERR_INVALID_SIGNATURE, "http_host keyword "
+ "specified along with \"nocase\". "
+ "Since the hostname buffer we match against "
+ "is actually lowercase. So having a "
+ "nocase is redundant.");
+ } else {
+ uint8_t u = 0;
+ for (u = 0; u < cd->content_len; u++) {
+ if (isupper(cd->content[u]))
+ break;
+ }
+ if (u != cd->content_len) {
+ SCLogWarning(SC_ERR_INVALID_SIGNATURE, "A pattern with "
+ "uppercase chars detected for http_host. "
+ "Since the hostname buffer we match against "
+ "is lowercase only, please specify a "
+ "lowercase pattern.");
+ SCReturnInt(0);
+ }
+ } /* else */
}
}
}
uint16_t slen = strlen(regexstr);
uint16_t pos = 0;
uint8_t negate = 0;
+ uint16_t re_len = 0;
+ uint32_t u = 0;
while (pos < slen && isspace((unsigned char)regexstr[pos])) {
pos++;
}
}
- //printf("DetectPcreParse: \"%s\"\n", re);
+ SCLogDebug("DetectPcreParse: \"%s\"", re);
+
+ if (pd->flags & DETECT_PCRE_HTTP_HOST) {
+ if (pd->flags & DETECT_PCRE_CASELESS) {
+ SCLogWarning(SC_ERR_INVALID_SIGNATURE, "http host pcre(\"W\") "
+ "specified along with \"i(caseless)\" modifier. "
+ "Since the hostname buffer we match against "
+ "is actually lowercase, having a "
+ "nocase is redundant.");
+ } else {
+ re_len = strlen(re);
+ for (u = 0; u < re_len; u++) {
+ if (isupper(re[u])) {
+ SCLogError(SC_ERR_INVALID_SIGNATURE, "pcre host(\"W\") "
+ "specified has an uppercase char. "
+ "Since the hostname buffer we match against "
+ "is actually lowercase, please specify an "
+ "all lowercase based pcre.");
+ goto error;
+ }
+ }
+ }
+ }
/* Try to compile as if all (...) groups had been meant as (?:...),
* which is the common case in most rules.