74 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
76 #define MAX_COUNTER_SIZE 64
117 .valid_settings_ips = {
135 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
221 if (
flags & STREAM_TOSERVER) {
237 if (
flags & STREAM_TOSERVER) {
247 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
254 AppLayerIncFlowCounter(
tv, f);
260 FlagPacketFlow(p, f, STREAM_TOCLIENT);
266 FlagPacketFlow(p, f, STREAM_TOSERVER);
268 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
291 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
295 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
301 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
305 const uint32_t size_tc_limit =
307 const uint32_t size_ts_limit =
310 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
311 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
317 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
322 size_ts > size_ts_limit && size_tc == 0) {
328 size_tc > size_tc_limit && size_ts == 0) {
336 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
346 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
356 DisableAppLayer(
tv, f, p);
363 if (stream == &ssn->
client) {
364 opposing_stream = &ssn->
server;
366 opposing_stream = &ssn->
client;
372 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
380 opposing_stream, p, dir);
396 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
398 if (
flags & STREAM_TOSERVER) {
406 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
409 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
410 flags & STREAM_TOCLIENT ?
"toclient" :
"",
411 flags & STREAM_TOSERVER ?
"toserver" :
"");
413 printf(
"=> Init Stream Data -- end\n");
417 bool reverse_flow =
false;
422 IPPROTO_TCP,
flags, &reverse_flow);
424 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
427 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
433 f->
alproto = *alproto_otherdir;
437 if (
flags & STREAM_TOCLIENT)
440 f->
alproto = *alproto_otherdir;
449 FlagPacketFlow(p, f,
flags);
459 SCLogDebug(
"reversing flow after proto detect told us so");
463 if (*stream == &ssn->
client) {
468 direction = 1 - direction;
476 AppLayerIncFlowCounter(
tv, f);
489 SCLogDebug(
"protocol %s needs first data in other direction",
492 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
493 p, ssn, *stream) != 0)
525 uint8_t first_data_dir;
540 if (first_data_dir && !(first_data_dir &
flags)) {
556 flags, data, data_len);
565 if (*stream == &ssn->
client) {
566 opposing_stream = &ssn->
server;
568 opposing_stream = &ssn->
client;
572 AppLayerIncFlowCounter(
tv, f);
600 DisableAppLayer(
tv, f, p);
606 uint8_t first_data_dir;
625 (first_data_dir) && !(first_data_dir &
flags))
656 *alproto = *alproto_otherdir;
657 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
658 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
665 AppLayerIncFlowCounter(
tv, f);
666 FlagPacketFlow(p, f,
flags);
668 }
else if (
flags & STREAM_EOF) {
671 AppLayerIncFlowCounter(
tv, f);
682 DisableAppLayer(
tv, f, p);
685 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
695 DisableAppLayer(
tv, f, p);
722 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
726 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
728 if (
flags & STREAM_TOSERVER) {
736 if (
flags & STREAM_GAP) {
739 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
744 AppLayerIncFlowCounter(
tv, f);
748 SCLogDebug(
"Cannot handle gap while changing protocol");
753 flags, data, data_len);
774 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
775 app_update_dir) != 0) {
780 void *alstate_orig = f->
alstate;
787 int rd = TCPProtoDetect(
788 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
799 if (alstate_orig == f->
alstate) {
823 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
824 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
827 printf(
"=> Stream Data (app layer) -- start %s%s\n",
828 flags & STREAM_TOCLIENT ?
"toclient" :
"",
829 flags & STREAM_TOSERVER ?
"toserver" :
"");
831 printf(
"=> Stream Data -- end\n");
839 flags, data, data_len);
886 flags |= STREAM_TOSERVER;
890 flags |= STREAM_TOCLIENT;
899 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
902 bool reverse_flow =
false;
912 f->
alproto = *alproto_otherdir;
914 *alproto = *alproto_otherdir;
926 f->
alproto = *alproto_otherdir;
935 if (*alproto_otherdir != *alproto) {
951 AppLayerIncFlowCounter(
tv, f);
957 SCLogDebug(
"reversing flow after proto detect told us so");
972 FlagPacketFlow(p, f, STREAM_TOSERVER);
973 FlagPacketFlow(p, f, STREAM_TOCLIENT);
975 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1020 printf(
"=========Supported App Layer Protocols=========\n");
1021 for (alproto = 0; alproto <
ALPROTO_MAX; alproto++) {
1022 if (alprotos[alproto] == 1)
1063 if (app_tctx == NULL)
1083 if (app_tctx == NULL)
1118 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1126 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1127 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1132 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1135 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1144 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1146 const char *
str =
"app_layer.flow.";
1147 const char *estr =
"app_layer.error.";
1152 const char *eps_default_str =
"app_layer.error.exception_policy.";
1154 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1165 const uint8_t ipproto = ipprotos[p];
1167 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1168 uint8_t ipprotos_all[256 / 8];
1171 if (alprotos[alproto] == 1) {
1172 const char *tx_str =
"app_layer.tx.";
1175 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1177 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1178 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1181 "%s%s%s",
str, alproto_str, ipproto_suffix);
1184 "%s%s%s", tx_str, alproto_str, ipproto_suffix);
1186 if (ipproto == IPPROTO_TCP) {
1189 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1193 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1196 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1199 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1201 AppLayerSetupExceptionPolicyPerProtoCounters(
1202 ipproto_map, alproto, alproto_str, ipproto_suffix);
1206 "%s%s",
str, alproto_str);
1209 "%s%s", tx_str, alproto_str);
1211 if (ipproto == IPPROTO_TCP) {
1214 "%s%s.gap", estr, alproto_str);
1218 "%s%s.alloc", estr, alproto_str);
1221 "%s%s.parser", estr, alproto_str);
1224 "%s%s.internal", estr, alproto_str);
1225 AppLayerSetupExceptionPolicyPerProtoCounters(
1226 ipproto_map, alproto, alproto_str,
"");
1231 "%s%s%s",
str,
"failed", ipproto_suffix);
1232 if (ipproto == IPPROTO_TCP) {
1235 "%sfailed%s.gap", estr, ipproto_suffix);
1244 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1252 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1260 const uint8_t ipproto = ipprotos[p];
1264 if (alprotos[alproto] == 1) {
1271 if (ipproto == IPPROTO_TCP) {
1286 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1297 if (ipproto == IPPROTO_TCP) {
1320 #define TEST_START \
1321 Packet *p = PacketGetFromAlloc(); \
1325 StreamTcpThread *stt = NULL; \
1327 PacketQueueNoLock pq; \
1328 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1329 memset(&f, 0, sizeof(Flow)); \
1330 memset(&tv, 0, sizeof(ThreadVars)); \
1331 memset(&tcph, 0, sizeof(TCPHdr)); \
1333 FLOW_INITIALIZE(&f); \
1334 f.flags = FLOW_IPV4; \
1335 f.proto = IPPROTO_TCP; \
1337 PacketSetTCP(p, (uint8_t *)&tcph); \
1339 StreamTcpInitConfig(true); \
1340 IPPairInitConfig(true); \
1341 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1344 tcph.th_win = htons(5480); \
1345 tcph.th_flags = TH_SYN; \
1346 p->flowflags = FLOW_PKT_TOSERVER; \
1347 p->payload_len = 0; \
1348 p->payload = NULL; \
1349 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1350 TcpSession *ssn = (TcpSession *)f.protoctx; \
1352 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1353 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1354 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1355 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1356 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1357 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1358 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1359 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1360 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1361 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1362 FAIL_IF(ssn->data_first_seen_dir != 0); \
1365 tcph.th_ack = htonl(1); \
1366 tcph.th_flags = TH_SYN | TH_ACK; \
1367 p->flowflags = FLOW_PKT_TOCLIENT; \
1368 p->payload_len = 0; \
1369 p->payload = NULL; \
1370 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1371 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1372 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1373 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1374 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1375 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1376 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1377 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1378 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1379 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1380 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1381 FAIL_IF(ssn->data_first_seen_dir != 0); \
1384 tcph.th_ack = htonl(1); \
1385 tcph.th_seq = htonl(1); \
1386 tcph.th_flags = TH_ACK; \
1387 p->flowflags = FLOW_PKT_TOSERVER; \
1388 p->payload_len = 0; \
1389 p->payload = NULL; \
1390 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1391 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1392 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1393 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1394 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1395 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1396 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1397 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1398 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1399 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1400 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1401 FAIL_IF(ssn->data_first_seen_dir != 0);
1403 StreamTcpSessionClear(p->flow->protoctx); \
1404 StreamTcpThreadDeinit(&tv, (void *)stt); \
1405 StreamTcpFreeConfig(true); \
1408 StatsThreadCleanup(&tv);
1413 static int AppLayerTest01(
void)
1418 uint8_t request[] = {
1419 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1420 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1421 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1422 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1423 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1424 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1425 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1426 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1427 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1428 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1429 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1430 tcph.th_ack = htonl(1);
1431 tcph.th_seq = htonl(1);
1450 uint8_t response[] = {
1451 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1452 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1453 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1454 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1455 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1456 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1457 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1458 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1459 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1460 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1461 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1462 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1463 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1464 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1465 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1466 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1467 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1468 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1469 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1470 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1471 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1472 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1473 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1474 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1475 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1476 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1477 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1478 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1479 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1480 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1481 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1482 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1483 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1484 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1485 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1486 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1487 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1488 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1489 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1490 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1491 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1492 tcph.th_ack = htonl(88);
1493 tcph.th_seq = htonl(1);
1512 tcph.th_ack = htonl(328);
1513 tcph.th_seq = htonl(88);
1538 static int AppLayerTest02(
void)
1543 uint8_t request1[] = { 0x47, 0x45, };
1544 tcph.th_ack = htonl(1);
1545 tcph.th_seq = htonl(1);
1564 tcph.th_ack = htonl(3);
1565 tcph.th_seq = htonl(1);
1584 uint8_t request2[] = {
1585 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1586 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1587 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1588 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1589 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1590 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1591 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1592 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1593 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1594 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1595 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1596 tcph.th_ack = htonl(1);
1597 tcph.th_seq = htonl(3);
1616 uint8_t response[] = {
1617 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1618 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1619 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1620 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1621 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1622 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1623 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1624 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1625 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1626 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1627 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1628 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1629 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1630 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1631 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1632 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1633 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1634 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1635 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1636 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1637 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1638 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1639 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1640 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1641 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1642 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1643 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1644 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1645 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1646 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1647 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1648 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1649 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1650 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1651 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1652 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1653 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1654 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1655 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1656 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1657 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1658 tcph.th_ack = htonl(88);
1659 tcph.th_seq = htonl(1);
1678 tcph.th_ack = htonl(328);
1679 tcph.th_seq = htonl(88);
1704 static int AppLayerTest03(
void)
1709 uint8_t request[] = {
1710 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1711 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1712 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1713 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1714 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1715 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1716 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1717 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1718 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1719 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1720 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1721 tcph.th_ack = htonl(1);
1722 tcph.th_seq = htonl(1);
1741 uint8_t response[] = {
1742 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1743 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1744 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1745 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1746 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1747 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1748 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1749 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1750 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1751 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1752 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1753 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1754 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1755 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1756 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1757 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1758 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1759 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1760 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1761 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1762 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1763 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1764 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1765 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1766 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1767 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1768 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1769 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1770 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1771 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1772 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1773 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1774 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1775 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1776 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1777 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1778 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1779 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1780 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1781 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1782 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1783 tcph.th_ack = htonl(88);
1784 tcph.th_seq = htonl(1);
1803 tcph.th_ack = htonl(328);
1804 tcph.th_seq = htonl(88);
1829 static int AppLayerTest04(
void)
1834 uint8_t request[] = {
1835 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1836 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1837 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1838 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1839 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1840 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1841 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1842 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1843 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1844 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1845 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1847 tcph.th_ack = htonl(1);
1848 tcph.th_seq = htonl(1);
1867 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1869 tcph.th_ack = htonl(88);
1870 tcph.th_seq = htonl(1);
1889 tcph.th_ack = htonl(5);
1890 tcph.th_seq = htonl(88);
1909 uint8_t response2[] = {
1910 0x2f, 0x31, 0x2e, 0x31,
1911 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1912 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1913 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1914 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1915 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1916 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1917 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1918 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1919 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1920 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1921 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1922 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1923 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1924 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1925 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1926 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1927 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1928 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1929 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1930 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1931 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1932 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1933 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1934 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1935 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1936 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1937 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1938 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1939 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1940 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1941 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1942 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1943 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1944 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1945 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1946 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1947 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1948 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1949 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1950 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1952 tcph.th_ack = htonl(88);
1953 tcph.th_seq = htonl(5);
1972 tcph.th_ack = htonl(328);
1973 tcph.th_seq = htonl(88);
1998 static int AppLayerTest05(
void)
2003 uint8_t request[] = {
2004 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2005 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2006 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2007 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2008 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2009 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2010 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2011 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2012 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2013 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2014 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2016 tcph.th_ack = htonl(1);
2017 tcph.th_seq = htonl(1);
2036 uint8_t response[] = {
2037 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2038 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2039 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2040 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2041 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2042 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2043 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2044 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2045 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2046 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2047 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2048 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2049 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2050 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2051 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2052 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2053 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2054 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2055 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2056 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2057 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2058 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2059 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2060 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2061 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2062 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2063 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2064 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2065 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2066 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2067 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2068 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2069 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2070 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2071 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2072 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2073 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2074 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2075 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2076 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2077 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2079 tcph.th_ack = htonl(88);
2080 tcph.th_seq = htonl(1);
2099 tcph.th_ack = htonl(328);
2100 tcph.th_seq = htonl(88);
2125 static int AppLayerTest06(
void)
2130 uint8_t response[] = {
2131 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2132 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2133 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2134 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2135 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2136 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2137 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2138 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2139 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2140 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2141 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2142 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2143 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2144 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2145 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2146 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2147 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2148 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2149 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2150 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2151 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2152 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2153 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2154 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2155 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2156 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2157 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2158 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2159 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2160 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2161 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2162 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2163 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2164 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2165 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2166 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2167 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2168 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2169 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2170 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2171 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2172 tcph.th_ack = htonl(1);
2173 tcph.th_seq = htonl(1);
2192 uint8_t request[] = {
2193 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2194 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2195 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2196 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2197 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2198 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2199 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2200 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2201 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2202 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2203 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2204 tcph.th_ack = htonl(328);
2205 tcph.th_seq = htonl(1);
2223 tcph.th_ack = htonl(1 +
sizeof(request));
2224 tcph.th_seq = htonl(328);
2249 static int AppLayerTest07(
void)
2254 uint8_t request[] = {
2255 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2256 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2257 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2258 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2259 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2260 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2261 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2262 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2263 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2264 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2265 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2266 tcph.th_ack = htonl(1);
2267 tcph.th_seq = htonl(1);
2286 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2287 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2288 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2289 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2290 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2291 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2292 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2293 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2294 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2295 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2296 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2297 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2298 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2299 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2300 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2301 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2302 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2303 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2304 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2305 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2306 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2307 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2308 tcph.th_ack = htonl(88);
2309 tcph.th_seq = htonl(1);
2328 tcph.th_ack = htonl(328);
2329 tcph.th_seq = htonl(88);
2354 static int AppLayerTest08(
void)
2359 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2360 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2361 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2362 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2363 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2364 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2365 tcph.th_ack = htonl(1);
2366 tcph.th_seq = htonl(1);
2385 uint8_t response[] = {
2386 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2387 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2388 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2389 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2390 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2391 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2392 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2393 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2394 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2395 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2396 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2397 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2398 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2399 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2400 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2401 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2402 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2403 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2404 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2405 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2406 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2407 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2408 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2409 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2410 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2411 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2412 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2413 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2414 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2415 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2416 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2417 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2418 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2419 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2420 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2421 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2422 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2423 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2424 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2425 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2426 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2427 tcph.th_ack = htonl(88);
2428 tcph.th_seq = htonl(1);
2447 tcph.th_ack = htonl(328);
2448 tcph.th_seq = htonl(88);
2475 static int AppLayerTest09(
void)
2480 uint8_t request1[] = {
2481 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2482 tcph.th_ack = htonl(1);
2483 tcph.th_seq = htonl(1);
2502 tcph.th_ack = htonl(9);
2503 tcph.th_seq = htonl(1);
2522 uint8_t request2[] = {
2523 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2524 tcph.th_ack = htonl(1);
2525 tcph.th_seq = htonl(9);
2544 uint8_t response[] = {
2545 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2546 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2547 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2548 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2549 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2550 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2551 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2552 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2553 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2554 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2555 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2556 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2557 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2558 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2559 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2560 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2561 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2562 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2563 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2564 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2565 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2566 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2567 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2568 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2569 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2570 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2571 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2572 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2573 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2574 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2575 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2576 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2577 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2578 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2579 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2580 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2581 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2582 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2583 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2584 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2585 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2586 tcph.th_ack = htonl(18);
2587 tcph.th_seq = htonl(1);
2606 tcph.th_ack = htonl(328);
2607 tcph.th_seq = htonl(18);
2633 static int AppLayerTest10(
void)
2638 uint8_t request1[] = {
2639 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2640 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2641 tcph.th_ack = htonl(1);
2642 tcph.th_seq = htonl(1);
2661 tcph.th_ack = htonl(18);
2662 tcph.th_seq = htonl(1);
2681 uint8_t response[] = {
2682 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2683 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2684 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2685 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2686 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2687 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2688 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2689 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2690 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2691 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2692 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2693 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2694 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2695 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2696 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2697 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2698 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2699 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2700 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2701 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2702 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2703 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2704 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2705 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2706 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2707 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2708 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2709 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2710 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2711 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2712 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2713 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2714 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2715 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2716 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2717 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2718 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2719 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2720 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2721 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2722 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2723 tcph.th_ack = htonl(18);
2724 tcph.th_seq = htonl(1);
2743 tcph.th_ack = htonl(328);
2744 tcph.th_seq = htonl(18);
2771 static int AppLayerTest11(
void)
2776 uint8_t request1[] = {
2777 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2778 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2779 tcph.th_ack = htonl(1);
2780 tcph.th_seq = htonl(1);
2799 tcph.th_ack = htonl(18);
2800 tcph.th_seq = htonl(1);
2819 uint8_t response1[] = {
2820 0x55, 0x74, 0x54, 0x50, };
2821 tcph.th_ack = htonl(18);
2822 tcph.th_seq = htonl(1);
2841 tcph.th_ack = htonl(5);
2842 tcph.th_seq = htonl(18);
2860 uint8_t response2[] = {
2861 0x2f, 0x31, 0x2e, 0x31,
2862 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2863 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2864 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2865 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2866 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2867 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2868 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2869 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2870 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2871 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2872 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2873 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2874 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2875 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2876 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2877 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2878 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2879 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2880 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2881 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2882 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2883 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2884 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2885 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2886 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2887 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2888 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2889 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2890 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2891 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2892 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2893 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2894 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2895 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2896 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2897 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2898 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2899 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2900 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2901 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2902 tcph.th_ack = htonl(18);
2903 tcph.th_seq = htonl(5);
2922 tcph.th_ack = htonl(328);
2923 tcph.th_seq = htonl(18);