|
|
|
@ -1128,14 +1128,14 @@ int DetectFlowintTestPacket01Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"GET", 3, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 101));
|
|
|
|
|
UTHFreePacket(p);
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"Unauthorized", 12, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 102));
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 103));
|
|
|
|
@ -1143,7 +1143,7 @@ int DetectFlowintTestPacket01Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"1", 1, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
@ -1152,7 +1152,7 @@ int DetectFlowintTestPacket01Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"X", 1, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 105));
|
|
|
|
|
UTHFreePacket(p);
|
|
|
|
@ -1201,14 +1201,14 @@ static int DetectFlowintTestPacket02Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"GET", 3, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 101));
|
|
|
|
|
UTHFreePacket(p);
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"Unauthorized", 12, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 102));
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 103));
|
|
|
|
@ -1216,7 +1216,7 @@ static int DetectFlowintTestPacket02Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"1", 1, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
@ -1225,7 +1225,7 @@ static int DetectFlowintTestPacket02Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"X", 1, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 105));
|
|
|
|
|
UTHFreePacket(p);
|
|
|
|
@ -1272,14 +1272,14 @@ int DetectFlowintTestPacket03Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"GET", 3, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 101));
|
|
|
|
|
UTHFreePacket(p);
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"Unauthorized", 12, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(!PacketAlertCheck(p, 102));
|
|
|
|
|
FAIL_IF(PacketAlertCheck(p, 103));
|
|
|
|
@ -1287,7 +1287,7 @@ int DetectFlowintTestPacket03Real()
|
|
|
|
|
|
|
|
|
|
p = UTHBuildPacket((uint8_t *)"1", 1, IPPROTO_TCP);
|
|
|
|
|
FAIL_IF(p == NULL);
|
|
|
|
|
p->flow = f;
|
|
|
|
|
UTHAssignFlow(p, f);
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
FAIL_IF(PacketAlertCheck(p, 102));
|
|
|
|
|
FAIL_IF(PacketAlertCheck(p, 103));
|
|
|
|
|