int result = 0;
char sig[] = "alert tcp any any -> any any (content:\"abc\"; content:\"d\"; distance:0; within:1; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
int result = 0;
char sig[] = "alert tcp any any -> any any (content:\"abc\"; nocase; content:\"d\"; distance:0; within:1; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
int result = 0;
char sig[] = "alert tcp any any -> any any (content:\"aBc\"; nocase; content:\"abca\"; distance:-10; within:4; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"this\"; content:\"is\"; within:6; content:\"big\"; within:8; "
"content:\"string\"; within:8; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"this\"; content:\"is\"; within:9; content:\"big\"; within:12; "
"content:\"string\"; within:8; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"now\"; content:\"this\"; content:\"is\"; within:12; content:\"big\"; within:8; "
"content:\"string\"; within:8; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"thus\"; offset:8; content:\"is\"; within:6; content:\"big\"; within:8; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"fix\"; content:\"this\"; within:6; content:!\"and\"; distance:0; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) != 1) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) != 1) {
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"pcre:/super/; content:\"nova\"; within:7; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert udp any any -> any any (msg:\"crash\"; "
"byte_test:4,>,2,0,relative; sid:11;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 1) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 1) {
result = 0;
goto end;
}
char sig[] = "alert udp any any -> any any (msg:\"crash\"; "
"byte_jump:1,0,relative; sid:11;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 1) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 1) {
result = 0;
goto end;
}
char sig[] = "alert udp any any -> any any (msg:\"crash\"; "
"isdataat:10,relative; sid:11;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 1) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 1) {
result = 0;
goto end;
}
uint16_t buflen = strlen((char *)buf);
Packet *p = UTHBuildPacket( buf, buflen, IPPROTO_TCP);
int result = 0;
- uint16_t mpm_type = DEFAULT_MPM;
+ uint16_t mpm_type = mpm_default_matcher;
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"aa\"; content:\"aa\"; distance:0; content:\"aa\"; distance:0; "
//char sig[] = "alert tcp any any -> any any (content:\"User-Agent: Mozilla/5.0 (Macintosh; \"; content:\"Firefox/3.\"; distance:0; content:!\"Firefox/3.6.12\"; distance:-10; content:!\"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4) Gecko/20090423 Firefox/3.6 GTB5\"; sid:1; rev:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 1) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 1) {
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"nova\"; isdataat:18,relative; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"content:\"nova\"; isdataat:!20,relative; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"content:\"%\"; depth:4; offset:0; "
"content:\"%\"; within:2; distance:1; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,2,one,string,dec,relative; "
"content:\"|0C 0D 0E 0F|\"; distance:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,2,one,string,hex,relative; "
"content:\"|0C 0D 0E 0F|\"; distance:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,2,one,string,dec,relative; "
"content:\"|06 35 07 08|\"; offset:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,2,one,string,dec,relative; "
"content:\"|03 04 05 06|\"; depth:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,2,one,string,dec,relative; "
"content:\"|09 0A 0B 0C|\"; within:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,3,two,string,dec,relative; "
"byte_test:1,=,one,two,string,dec,relative; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_jump:1,one,string,dec,relative; "
"content:\"|0D 0E 0F|\"; distance:0; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,-4,one,string,dec,relative; "
"content:\"|0C 0D 0E 0F|\"; distance:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
"byte_extract:1,-3000,one,string,dec,relative; "
"content:\"|0C 0D 0E 0F|\"; distance:one; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) != 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) != 0) {
result = 0;
goto end;
}
"depth:5; sid:1;)";
p->flags |= PKT_STREAM_ADD;
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) != 1)
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) != 1)
goto end;
result = 1;
"offset:4; depth:12; sid:1;)";
p->flags |= PKT_STREAM_ADD;
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) != 1)
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) != 1)
goto end;
result = 1;
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"pcre:/^.{4}/; content:\"nova\"; within:4; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 1) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 1) {
result = 0;
goto end;
}
int result = 0;
char sig[] = "alert tcp any any -> any any (content:\"one\"; pcre:\"/^two/R\"; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
int result = 0;
char sig[] = "alert tcp any any -> any any (content:\"one\"; pcre:\"/(fiv|^two)/R\"; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0) {
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0) {
result = 0;
goto end;
}
char sig[] = "alert tcp any any -> any any (msg:\"crash\"; "
"content:\"message\"; byte_jump:2,-14,string,dec,relative; content:\"card\"; within:4; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0)
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0)
goto end;
result = 1;
char sig[] = "alert tcp any any -> any any (msg:\"crash\"; "
"content:\"message\"; byte_test:1,=,2,-14,string,dec,relative; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0)
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0)
goto end;
result = 1;
char sig[] = "alert tcp any any -> any any (msg:\"crash\"; "
"content:\"message\"; byte_extract:1,-14,boom,string,dec,relative; sid:1;)";
- if (UTHPacketMatchSigMpm(p, sig, DEFAULT_MPM) == 0)
+ if (UTHPacketMatchSigMpm(p, sig, mpm_default_matcher) == 0)
goto end;
result = 1;