73 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
75 #define MAX_COUNTER_SIZE 64
104 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
171 if (
flags & STREAM_TOSERVER) {
187 if (
flags & STREAM_TOSERVER) {
197 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
204 AppLayerIncFlowCounter(
tv, f);
210 FlagPacketFlow(p, f, STREAM_TOCLIENT);
216 FlagPacketFlow(p, f, STREAM_TOSERVER);
218 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
241 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
245 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
251 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
255 const uint32_t size_tc_limit =
257 const uint32_t size_ts_limit =
260 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
261 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
267 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
272 size_ts > size_ts_limit && size_tc == 0) {
278 size_tc > size_tc_limit && size_ts == 0) {
286 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
296 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
306 DisableAppLayer(
tv, f, p);
314 if (stream == &ssn->
client) {
315 opposing_stream = &ssn->
server;
317 opposing_stream = &ssn->
client;
323 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
331 opposing_stream, p, dir);
344 uint8_t *data, uint32_t data_len, uint8_t
flags)
348 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
350 if (
flags & STREAM_TOSERVER) {
358 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
361 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
362 flags & STREAM_TOCLIENT ?
"toclient" :
"",
363 flags & STREAM_TOSERVER ?
"toserver" :
"");
365 printf(
"=> Init Stream Data -- end\n");
369 bool reverse_flow =
false;
374 IPPROTO_TCP,
flags, &reverse_flow);
376 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
379 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
385 f->
alproto = *alproto_otherdir;
389 if (
flags & STREAM_TOCLIENT)
392 f->
alproto = *alproto_otherdir;
401 FlagPacketFlow(p, f,
flags);
411 SCLogDebug(
"reversing flow after proto detect told us so");
415 if (*stream == &ssn->
client) {
420 direction = 1 - direction;
428 AppLayerIncFlowCounter(
tv, f);
441 SCLogDebug(
"protocol %s needs first data in other direction",
444 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
445 p, ssn, *stream) != 0)
477 uint8_t first_data_dir;
492 if (first_data_dir && !(first_data_dir &
flags)) {
508 flags, data, data_len);
538 DisableAppLayer(
tv, f, p);
544 uint8_t first_data_dir;
563 (first_data_dir) && !(first_data_dir &
flags))
594 *alproto = *alproto_otherdir;
595 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
596 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
603 AppLayerIncFlowCounter(
tv, f);
604 FlagPacketFlow(p, f,
flags);
606 }
else if (
flags & STREAM_EOF) {
609 AppLayerIncFlowCounter(
tv, f);
620 DisableAppLayer(
tv, f, p);
623 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
632 DisableAppLayer(
tv, f, p);
647 uint8_t *data, uint32_t data_len,
661 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
665 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
667 if (
flags & STREAM_TOSERVER) {
675 if (
flags & STREAM_GAP) {
678 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
683 AppLayerIncFlowCounter(
tv, f);
687 SCLogDebug(
"Cannot handle gap while changing protocol");
692 flags, data, data_len);
712 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream,
713 data, data_len,
flags) != 0) {
718 void *alstate_orig = f->
alstate;
725 int rd = TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags);
736 if (alstate_orig == f->
alstate) {
760 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
761 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
764 printf(
"=> Stream Data (app layer) -- start %s%s\n",
765 flags & STREAM_TOCLIENT ?
"toclient" :
"",
766 flags & STREAM_TOSERVER ?
"toserver" :
"");
768 printf(
"=> Stream Data -- end\n");
776 flags, data, data_len);
822 flags |= STREAM_TOSERVER;
826 flags |= STREAM_TOCLIENT;
831 AppLayerProfilingReset(tctx);
835 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
838 bool reverse_flow =
false;
848 f->
alproto = *alproto_otherdir;
850 *alproto = *alproto_otherdir;
862 f->
alproto = *alproto_otherdir;
871 if (*alproto_otherdir != *alproto) {
887 AppLayerIncFlowCounter(
tv, f);
893 SCLogDebug(
"reversing flow after proto detect told us so");
908 FlagPacketFlow(p, f, STREAM_TOSERVER);
909 FlagPacketFlow(p, f, STREAM_TOCLIENT);
911 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
955 printf(
"=========Supported App Layer Protocols=========\n");
956 for (alproto = 0; alproto <
ALPROTO_MAX; alproto++) {
957 if (alprotos[alproto] == 1)
998 if (app_tctx == NULL)
1000 memset(app_tctx, 0,
sizeof(*app_tctx));
1019 if (app_tctx == NULL)
1054 #define IPPROTOS_MAX 2
1057 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1059 const char *
str =
"app_layer.flow.";
1060 const char *estr =
"app_layer.error.";
1065 const uint8_t ipproto = ipprotos[p];
1067 const uint8_t other_ipproto = ipproto == IPPROTO_TCP ? IPPROTO_UDP : IPPROTO_TCP;
1068 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1071 if (alprotos[alproto] == 1) {
1072 const char *tx_str =
"app_layer.tx.";
1079 "%s%s%s",
str, alproto_str, ipproto_suffix);
1082 "%s%s%s", tx_str, alproto_str, ipproto_suffix);
1084 if (ipproto == IPPROTO_TCP) {
1087 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1091 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1094 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1097 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1101 "%s%s",
str, alproto_str);
1104 "%s%s", tx_str, alproto_str);
1106 if (ipproto == IPPROTO_TCP) {
1109 "%s%s.gap", estr, alproto_str);
1113 "%s%s.alloc", estr, alproto_str);
1116 "%s%s.parser", estr, alproto_str);
1119 "%s%s.internal", estr, alproto_str);
1124 "%s%s%s",
str,
"failed", ipproto_suffix);
1125 if (ipproto == IPPROTO_TCP) {
1128 "%sfailed%s.gap", estr, ipproto_suffix);
1137 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1142 const uint8_t ipproto = ipprotos[p];
1146 if (alprotos[alproto] == 1) {
1153 if (ipproto == IPPROTO_TCP) {
1167 if (ipproto == IPPROTO_TCP) {
1190 #define TEST_START \
1191 Packet *p = PacketGetFromAlloc(); \
1195 StreamTcpThread *stt = NULL; \
1197 PacketQueueNoLock pq; \
1198 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1199 memset(&f, 0, sizeof(Flow)); \
1200 memset(&tv, 0, sizeof(ThreadVars)); \
1201 memset(&tcph, 0, sizeof(TCPHdr)); \
1203 FLOW_INITIALIZE(&f); \
1204 f.flags = FLOW_IPV4; \
1205 f.proto = IPPROTO_TCP; \
1209 StreamTcpInitConfig(true); \
1210 IPPairInitConfig(true); \
1211 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1214 tcph.th_win = htons(5480); \
1215 tcph.th_flags = TH_SYN; \
1216 p->flowflags = FLOW_PKT_TOSERVER; \
1217 p->payload_len = 0; \
1218 p->payload = NULL; \
1219 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1220 TcpSession *ssn = (TcpSession *)f.protoctx; \
1222 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1223 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1224 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1225 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1226 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1227 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1228 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1229 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1230 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1231 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1232 FAIL_IF(ssn->data_first_seen_dir != 0); \
1235 p->tcph->th_ack = htonl(1); \
1236 p->tcph->th_flags = TH_SYN | TH_ACK; \
1237 p->flowflags = FLOW_PKT_TOCLIENT; \
1238 p->payload_len = 0; \
1239 p->payload = NULL; \
1240 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1241 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1242 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1243 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1244 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1245 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1246 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1247 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1248 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1249 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1250 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1251 FAIL_IF(ssn->data_first_seen_dir != 0); \
1254 p->tcph->th_ack = htonl(1); \
1255 p->tcph->th_seq = htonl(1); \
1256 p->tcph->th_flags = TH_ACK; \
1257 p->flowflags = FLOW_PKT_TOSERVER; \
1258 p->payload_len = 0; \
1259 p->payload = NULL; \
1260 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1261 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1262 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1263 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1264 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1265 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1266 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1267 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1268 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1269 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1270 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1271 FAIL_IF(ssn->data_first_seen_dir != 0);
1273 StreamTcpSessionClear(p->flow->protoctx); \
1274 StreamTcpThreadDeinit(&tv, (void *)stt); \
1275 StreamTcpFreeConfig(true); \
1278 StatsThreadCleanup(&tv);
1283 static int AppLayerTest01(
void)
1288 uint8_t request[] = {
1289 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1290 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1291 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1292 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1293 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1294 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1295 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1296 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1297 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1298 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1299 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1300 p->
tcph->th_ack = htonl(1);
1301 p->
tcph->th_seq = htonl(1);
1320 uint8_t response[] = {
1321 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1322 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1323 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1324 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1325 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1326 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1327 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1328 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1329 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1330 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1331 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1332 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1333 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1334 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1335 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1336 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1337 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1338 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1339 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1340 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1341 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1342 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1343 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1344 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1345 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1346 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1347 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1348 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1349 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1350 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1351 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1352 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1353 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1354 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1355 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1356 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1357 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1358 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1359 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1360 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1361 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1362 p->
tcph->th_ack = htonl(88);
1363 p->
tcph->th_seq = htonl(1);
1382 p->
tcph->th_ack = htonl(328);
1383 p->
tcph->th_seq = htonl(88);
1408 static int AppLayerTest02(
void)
1413 uint8_t request1[] = { 0x47, 0x45, };
1414 p->
tcph->th_ack = htonl(1);
1415 p->
tcph->th_seq = htonl(1);
1434 p->
tcph->th_ack = htonl(3);
1435 p->
tcph->th_seq = htonl(1);
1454 uint8_t request2[] = {
1455 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1456 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1457 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1458 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1459 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1460 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1461 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1462 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1463 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1464 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1465 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1466 p->
tcph->th_ack = htonl(1);
1467 p->
tcph->th_seq = htonl(3);
1486 uint8_t response[] = {
1487 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1488 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1489 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1490 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1491 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1492 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1493 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1494 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1495 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1496 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1497 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1498 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1499 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1500 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1501 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1502 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1503 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1504 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1505 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1506 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1507 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1508 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1509 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1510 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1511 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1512 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1513 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1514 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1515 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1516 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1517 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1518 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1519 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1520 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1521 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1522 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1523 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1524 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1525 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1526 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1527 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1528 p->
tcph->th_ack = htonl(88);
1529 p->
tcph->th_seq = htonl(1);
1548 p->
tcph->th_ack = htonl(328);
1549 p->
tcph->th_seq = htonl(88);
1574 static int AppLayerTest03(
void)
1579 uint8_t request[] = {
1580 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1581 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1582 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1583 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1584 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1585 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1586 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1587 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1588 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1589 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1590 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1591 p->
tcph->th_ack = htonl(1);
1592 p->
tcph->th_seq = htonl(1);
1611 uint8_t response[] = {
1612 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1613 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1614 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1615 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1616 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1617 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1618 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1619 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1620 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1621 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1622 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1623 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1624 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1625 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1626 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1627 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1628 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1629 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1630 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1631 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1632 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1633 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1634 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1635 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1636 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1637 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1638 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1639 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1640 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1641 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1642 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1643 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1644 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1645 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1646 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1647 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1648 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1649 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1650 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1651 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1652 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1653 p->
tcph->th_ack = htonl(88);
1654 p->
tcph->th_seq = htonl(1);
1673 p->
tcph->th_ack = htonl(328);
1674 p->
tcph->th_seq = htonl(88);
1699 static int AppLayerTest04(
void)
1704 uint8_t request[] = {
1705 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1706 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1707 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1708 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1709 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1710 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1711 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1712 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1713 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1714 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1715 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1717 p->
tcph->th_ack = htonl(1);
1718 p->
tcph->th_seq = htonl(1);
1737 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1739 p->
tcph->th_ack = htonl(88);
1740 p->
tcph->th_seq = htonl(1);
1759 p->
tcph->th_ack = htonl(5);
1760 p->
tcph->th_seq = htonl(88);
1779 uint8_t response2[] = {
1780 0x2f, 0x31, 0x2e, 0x31,
1781 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1782 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1783 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1784 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1785 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1786 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1787 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1788 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1789 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1790 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1791 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1792 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1793 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1794 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1795 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1796 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1797 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1798 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1799 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1800 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1801 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1802 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1803 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1804 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1805 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1806 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1807 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1808 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1809 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1810 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1811 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1812 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1813 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1814 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1815 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1816 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1817 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1818 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1819 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1820 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1822 p->
tcph->th_ack = htonl(88);
1823 p->
tcph->th_seq = htonl(5);
1842 p->
tcph->th_ack = htonl(328);
1843 p->
tcph->th_seq = htonl(88);
1868 static int AppLayerTest05(
void)
1873 uint8_t request[] = {
1874 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1875 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1876 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1877 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1878 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1879 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1880 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1881 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1882 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1883 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1884 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1886 p->
tcph->th_ack = htonl(1);
1887 p->
tcph->th_seq = htonl(1);
1906 uint8_t response[] = {
1907 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1908 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1909 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1910 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1911 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1912 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1913 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1914 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1915 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1916 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1917 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1918 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1919 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1920 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1921 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1922 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1923 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1924 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1925 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1926 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1927 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1928 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1929 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1930 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1931 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1932 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1933 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1934 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1935 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1936 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1937 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1938 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1939 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1940 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1941 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1942 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1943 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1944 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1945 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1946 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1947 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1949 p->
tcph->th_ack = htonl(88);
1950 p->
tcph->th_seq = htonl(1);
1969 p->
tcph->th_ack = htonl(328);
1970 p->
tcph->th_seq = htonl(88);
1995 static int AppLayerTest06(
void)
2000 uint8_t response[] = {
2001 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2002 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2003 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2004 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2005 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2006 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2007 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2008 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2009 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2010 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2011 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2012 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2013 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2014 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2015 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2016 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2017 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2018 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2019 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2020 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2021 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2022 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2023 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2024 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2025 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2026 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2027 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2028 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2029 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2030 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2031 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2032 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2033 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2034 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2035 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2036 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2037 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2038 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2039 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2040 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2041 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2042 p->
tcph->th_ack = htonl(1);
2043 p->
tcph->th_seq = htonl(1);
2062 uint8_t request[] = {
2063 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2064 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2065 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2066 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2067 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2068 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2069 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2070 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2071 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2072 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2073 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2074 p->
tcph->th_ack = htonl(328);
2075 p->
tcph->th_seq = htonl(1);
2093 p->
tcph->th_ack = htonl(1 +
sizeof(request));
2094 p->
tcph->th_seq = htonl(328);
2119 static int AppLayerTest07(
void)
2124 uint8_t request[] = {
2125 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2126 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2127 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2128 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2129 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2130 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2131 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2132 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2133 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2134 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2135 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2136 p->
tcph->th_ack = htonl(1);
2137 p->
tcph->th_seq = htonl(1);
2156 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2157 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2158 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2159 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2160 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2161 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2162 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2163 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2164 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2165 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2166 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2167 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2168 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2169 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2170 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2171 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2172 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2173 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2174 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2175 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2176 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2177 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2178 p->
tcph->th_ack = htonl(88);
2179 p->
tcph->th_seq = htonl(1);
2198 p->
tcph->th_ack = htonl(328);
2199 p->
tcph->th_seq = htonl(88);
2224 static int AppLayerTest08(
void)
2229 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2230 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2231 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2232 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2233 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2234 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2235 p->
tcph->th_ack = htonl(1);
2236 p->
tcph->th_seq = htonl(1);
2255 uint8_t response[] = {
2256 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2257 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2258 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2259 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2260 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2261 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2262 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2263 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2264 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2265 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2266 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2267 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2268 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2269 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2270 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2271 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2272 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2273 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2274 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2275 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2276 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2277 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2278 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2279 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2280 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2281 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2282 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2283 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2284 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2285 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2286 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2287 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2288 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2289 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2290 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2291 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2292 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2293 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2294 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2295 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2296 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2297 p->
tcph->th_ack = htonl(88);
2298 p->
tcph->th_seq = htonl(1);
2317 p->
tcph->th_ack = htonl(328);
2318 p->
tcph->th_seq = htonl(88);
2345 static int AppLayerTest09(
void)
2350 uint8_t request1[] = {
2351 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2352 p->
tcph->th_ack = htonl(1);
2353 p->
tcph->th_seq = htonl(1);
2372 p->
tcph->th_ack = htonl(9);
2373 p->
tcph->th_seq = htonl(1);
2392 uint8_t request2[] = {
2393 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2394 p->
tcph->th_ack = htonl(1);
2395 p->
tcph->th_seq = htonl(9);
2414 uint8_t response[] = {
2415 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2416 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2417 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2418 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2419 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2420 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2421 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2422 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2423 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2424 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2425 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2426 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2427 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2428 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2429 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2430 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2431 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2432 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2433 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2434 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2435 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2436 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2437 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2438 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2439 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2440 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2441 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2442 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2443 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2444 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2445 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2446 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2447 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2448 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2449 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2450 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2451 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2452 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2453 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2454 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2455 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2456 p->
tcph->th_ack = htonl(18);
2457 p->
tcph->th_seq = htonl(1);
2476 p->
tcph->th_ack = htonl(328);
2477 p->
tcph->th_seq = htonl(18);
2503 static int AppLayerTest10(
void)
2508 uint8_t request1[] = {
2509 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2510 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2511 p->
tcph->th_ack = htonl(1);
2512 p->
tcph->th_seq = htonl(1);
2531 p->
tcph->th_ack = htonl(18);
2532 p->
tcph->th_seq = htonl(1);
2551 uint8_t response[] = {
2552 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2553 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2554 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2555 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2556 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2557 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2558 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2559 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2560 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2561 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2562 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2563 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2564 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2565 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2566 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2567 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2568 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2569 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2570 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2571 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2572 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2573 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2574 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2575 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2576 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2577 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2578 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2579 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2580 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2581 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2582 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2583 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2584 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2585 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2586 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2587 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2588 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2589 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2590 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2591 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2592 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2593 p->
tcph->th_ack = htonl(18);
2594 p->
tcph->th_seq = htonl(1);
2613 p->
tcph->th_ack = htonl(328);
2614 p->
tcph->th_seq = htonl(18);
2641 static int AppLayerTest11(
void)
2646 uint8_t request1[] = {
2647 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2648 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2649 p->
tcph->th_ack = htonl(1);
2650 p->
tcph->th_seq = htonl(1);
2669 p->
tcph->th_ack = htonl(18);
2670 p->
tcph->th_seq = htonl(1);
2689 uint8_t response1[] = {
2690 0x55, 0x74, 0x54, 0x50, };
2691 p->
tcph->th_ack = htonl(18);
2692 p->
tcph->th_seq = htonl(1);
2711 p->
tcph->th_ack = htonl(5);
2712 p->
tcph->th_seq = htonl(18);
2730 uint8_t response2[] = {
2731 0x2f, 0x31, 0x2e, 0x31,
2732 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2733 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2734 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2735 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2736 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2737 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2738 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2739 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2740 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2741 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2742 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2743 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2744 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2745 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2746 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2747 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2748 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2749 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2750 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2751 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2752 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2753 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2754 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2755 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2756 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2757 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2758 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2759 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2760 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2761 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2762 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2763 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2764 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2765 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2766 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2767 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2768 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2769 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2770 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2771 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2772 p->
tcph->th_ack = htonl(18);
2773 p->
tcph->th_seq = htonl(5);
2792 p->
tcph->th_ack = htonl(328);
2793 p->
tcph->th_seq = htonl(18);