75 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
77 #define MAX_COUNTER_SIZE 64
118 .valid_settings_ips = {
136 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
222 if (
flags & STREAM_TOSERVER) {
238 if (
flags & STREAM_TOSERVER) {
248 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
255 AppLayerIncFlowCounter(
tv, f);
261 FlagPacketFlow(p, f, STREAM_TOCLIENT);
267 FlagPacketFlow(p, f, STREAM_TOSERVER);
269 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
292 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
296 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
302 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
306 const uint32_t size_tc_limit =
308 const uint32_t size_ts_limit =
311 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
312 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
318 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
323 size_ts > size_ts_limit && size_tc == 0) {
329 size_tc > size_tc_limit && size_ts == 0) {
337 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
347 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
357 DisableAppLayer(
tv, f, p);
364 if (stream == &ssn->
client) {
365 opposing_stream = &ssn->
server;
367 opposing_stream = &ssn->
client;
373 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
381 opposing_stream, p, dir);
397 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
399 if (
flags & STREAM_TOSERVER) {
407 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
410 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
411 flags & STREAM_TOCLIENT ?
"toclient" :
"",
412 flags & STREAM_TOSERVER ?
"toserver" :
"");
414 printf(
"=> Init Stream Data -- end\n");
418 bool reverse_flow =
false;
423 IPPROTO_TCP,
flags, &reverse_flow);
425 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
428 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
434 f->
alproto = *alproto_otherdir;
438 if (
flags & STREAM_TOCLIENT)
441 f->
alproto = *alproto_otherdir;
450 FlagPacketFlow(p, f,
flags);
460 SCLogDebug(
"reversing flow after proto detect told us so");
464 if (*stream == &ssn->
client) {
469 direction = 1 - direction;
477 AppLayerIncFlowCounter(
tv, f);
490 SCLogDebug(
"protocol %s needs first data in other direction",
493 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
494 p, ssn, *stream) != 0)
526 uint8_t first_data_dir;
541 if (first_data_dir && !(first_data_dir &
flags)) {
557 flags, data, data_len);
566 if (*stream == &ssn->
client) {
567 opposing_stream = &ssn->
server;
569 opposing_stream = &ssn->
client;
573 AppLayerIncFlowCounter(
tv, f);
601 DisableAppLayer(
tv, f, p);
607 uint8_t first_data_dir;
626 (first_data_dir) && !(first_data_dir &
flags))
657 *alproto = *alproto_otherdir;
658 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
659 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
666 AppLayerIncFlowCounter(
tv, f);
667 FlagPacketFlow(p, f,
flags);
669 }
else if (
flags & STREAM_EOF) {
672 AppLayerIncFlowCounter(
tv, f);
683 DisableAppLayer(
tv, f, p);
686 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
696 DisableAppLayer(
tv, f, p);
723 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
727 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
729 if (
flags & STREAM_TOSERVER) {
737 if (
flags & STREAM_GAP) {
741 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
746 AppLayerIncFlowCounter(
tv, f);
750 SCLogDebug(
"Cannot handle gap while changing protocol");
755 flags, data, data_len);
776 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
777 app_update_dir) != 0) {
782 void *alstate_orig = f->
alstate;
789 int rd = TCPProtoDetect(
790 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
801 if (alstate_orig == f->
alstate) {
825 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
826 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
829 printf(
"=> Stream Data (app layer) -- start %s%s\n",
830 flags & STREAM_TOCLIENT ?
"toclient" :
"",
831 flags & STREAM_TOSERVER ?
"toserver" :
"");
833 printf(
"=> Stream Data -- end\n");
841 flags, data, data_len);
888 flags |= STREAM_TOSERVER;
892 flags |= STREAM_TOCLIENT;
901 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
904 bool reverse_flow =
false;
914 f->
alproto = *alproto_otherdir;
916 *alproto = *alproto_otherdir;
928 f->
alproto = *alproto_otherdir;
937 if (*alproto_otherdir != *alproto) {
953 AppLayerIncFlowCounter(
tv, f);
959 SCLogDebug(
"reversing flow after proto detect told us so");
974 FlagPacketFlow(p, f, STREAM_TOSERVER);
975 FlagPacketFlow(p, f, STREAM_TOCLIENT);
977 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1022 printf(
"=========Supported App Layer Protocols=========\n");
1024 if (alprotos[alproto] == 1)
1032 static void AppLayerNamesSetup(
void)
1079 AppLayerNamesSetup();
1110 if (app_tctx == NULL)
1130 if (app_tctx == NULL)
1171 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1179 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1180 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1185 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1188 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1197 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1199 const char *
str =
"app_layer.flow.";
1200 const char *estr =
"app_layer.error.";
1205 FatalError(
"Unable to alloc applayer_counter_names.");
1209 FatalError(
"Unable to alloc applayer_counters.");
1214 const char *eps_default_str =
"app_layer.error.exception_policy.";
1216 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1227 const uint8_t ipproto = ipprotos[p];
1229 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1230 uint8_t ipprotos_all[256 / 8];
1233 if (alprotos[alproto] == 1) {
1234 const char *tx_str =
"app_layer.tx.";
1237 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1239 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1240 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1243 str, alproto_str, ipproto_suffix);
1246 tx_str, alproto_str, ipproto_suffix);
1248 if (ipproto == IPPROTO_TCP) {
1251 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1255 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1258 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1261 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1263 AppLayerSetupExceptionPolicyPerProtoCounters(
1264 ipproto_map, alproto, alproto_str, ipproto_suffix);
1271 tx_str, alproto_str);
1273 if (ipproto == IPPROTO_TCP) {
1276 "%s%s.gap", estr, alproto_str);
1280 "%s%s.alloc", estr, alproto_str);
1283 "%s%s.parser", estr, alproto_str);
1286 "%s%s.internal", estr, alproto_str);
1287 AppLayerSetupExceptionPolicyPerProtoCounters(
1288 ipproto_map, alproto, alproto_str,
"");
1293 "failed", ipproto_suffix);
1294 if (ipproto == IPPROTO_TCP) {
1297 "%sfailed%s.gap", estr, ipproto_suffix);
1306 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1314 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1322 const uint8_t ipproto = ipprotos[p];
1326 if (alprotos[alproto] == 1) {
1333 if (ipproto == IPPROTO_TCP) {
1348 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1359 if (ipproto == IPPROTO_TCP) {
1382 #define TEST_START \
1383 Packet *p = PacketGetFromAlloc(); \
1387 StreamTcpThread *stt = NULL; \
1389 PacketQueueNoLock pq; \
1390 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1391 memset(&f, 0, sizeof(Flow)); \
1392 memset(&tv, 0, sizeof(ThreadVars)); \
1393 memset(&tcph, 0, sizeof(TCPHdr)); \
1395 FLOW_INITIALIZE(&f); \
1396 f.flags = FLOW_IPV4; \
1397 f.proto = IPPROTO_TCP; \
1399 PacketSetTCP(p, (uint8_t *)&tcph); \
1401 StreamTcpInitConfig(true); \
1402 IPPairInitConfig(true); \
1403 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1406 tcph.th_win = htons(5480); \
1407 tcph.th_flags = TH_SYN; \
1408 p->flowflags = FLOW_PKT_TOSERVER; \
1409 p->payload_len = 0; \
1410 p->payload = NULL; \
1411 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1412 TcpSession *ssn = (TcpSession *)f.protoctx; \
1414 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1415 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1416 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1417 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1418 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1419 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1420 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1421 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1422 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1423 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1424 FAIL_IF(ssn->data_first_seen_dir != 0); \
1427 tcph.th_ack = htonl(1); \
1428 tcph.th_flags = TH_SYN | TH_ACK; \
1429 p->flowflags = FLOW_PKT_TOCLIENT; \
1430 p->payload_len = 0; \
1431 p->payload = NULL; \
1432 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1433 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1434 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1435 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1436 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1437 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1438 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1439 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1440 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1441 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1442 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1443 FAIL_IF(ssn->data_first_seen_dir != 0); \
1446 tcph.th_ack = htonl(1); \
1447 tcph.th_seq = htonl(1); \
1448 tcph.th_flags = TH_ACK; \
1449 p->flowflags = FLOW_PKT_TOSERVER; \
1450 p->payload_len = 0; \
1451 p->payload = NULL; \
1452 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1453 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1454 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1455 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1456 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1457 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1458 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1459 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1460 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1461 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1462 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1463 FAIL_IF(ssn->data_first_seen_dir != 0);
1465 StreamTcpSessionClear(p->flow->protoctx); \
1466 StreamTcpThreadDeinit(&tv, (void *)stt); \
1467 StreamTcpFreeConfig(true); \
1470 StatsThreadCleanup(&tv);
1475 static int AppLayerTest01(
void)
1480 uint8_t request[] = {
1481 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1482 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1483 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1484 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1485 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1486 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1487 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1488 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1489 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1490 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1491 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1492 tcph.th_ack = htonl(1);
1493 tcph.th_seq = htonl(1);
1512 uint8_t response[] = {
1513 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1514 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1515 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1516 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1517 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1518 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1519 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1520 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1521 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1522 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1523 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1524 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1525 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1526 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1527 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1528 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1529 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1530 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1531 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1532 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1533 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1534 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1535 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1536 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1537 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1538 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1539 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1540 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1541 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1542 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1543 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1544 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1545 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1546 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1547 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1548 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1549 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1550 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1551 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1552 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1553 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1554 tcph.th_ack = htonl(88);
1555 tcph.th_seq = htonl(1);
1574 tcph.th_ack = htonl(328);
1575 tcph.th_seq = htonl(88);
1600 static int AppLayerTest02(
void)
1605 uint8_t request1[] = { 0x47, 0x45, };
1606 tcph.th_ack = htonl(1);
1607 tcph.th_seq = htonl(1);
1626 tcph.th_ack = htonl(3);
1627 tcph.th_seq = htonl(1);
1646 uint8_t request2[] = {
1647 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1648 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1649 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1650 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1651 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1652 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1653 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1654 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1655 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1656 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1657 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1658 tcph.th_ack = htonl(1);
1659 tcph.th_seq = htonl(3);
1678 uint8_t response[] = {
1679 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1680 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1681 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1682 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1683 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1684 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1685 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1686 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1687 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1688 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1689 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1690 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1691 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1692 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1693 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1694 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1695 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1696 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1697 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1698 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1699 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1700 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1701 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1702 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1703 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1704 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1705 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1706 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1707 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1708 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1709 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1710 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1711 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1712 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1713 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1714 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1715 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1716 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1717 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1718 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1719 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1720 tcph.th_ack = htonl(88);
1721 tcph.th_seq = htonl(1);
1740 tcph.th_ack = htonl(328);
1741 tcph.th_seq = htonl(88);
1766 static int AppLayerTest03(
void)
1771 uint8_t request[] = {
1772 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1773 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1774 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1775 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1776 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1777 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1778 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1779 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1780 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1781 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1782 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1783 tcph.th_ack = htonl(1);
1784 tcph.th_seq = htonl(1);
1803 uint8_t response[] = {
1804 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1805 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1806 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1807 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1808 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1809 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1810 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1811 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1812 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1813 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1814 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1815 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1816 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1817 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1818 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1819 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1820 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1821 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1822 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1823 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1824 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1825 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1826 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1827 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1828 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1829 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1830 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1831 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1832 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1833 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1834 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1835 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1836 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1837 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1838 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1839 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1840 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1841 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1842 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1843 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1844 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1845 tcph.th_ack = htonl(88);
1846 tcph.th_seq = htonl(1);
1865 tcph.th_ack = htonl(328);
1866 tcph.th_seq = htonl(88);
1891 static int AppLayerTest04(
void)
1896 uint8_t request[] = {
1897 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1898 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1899 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1900 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1901 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1902 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1903 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1904 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1905 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1906 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1907 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1909 tcph.th_ack = htonl(1);
1910 tcph.th_seq = htonl(1);
1929 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1931 tcph.th_ack = htonl(88);
1932 tcph.th_seq = htonl(1);
1951 tcph.th_ack = htonl(5);
1952 tcph.th_seq = htonl(88);
1971 uint8_t response2[] = {
1972 0x2f, 0x31, 0x2e, 0x31,
1973 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1974 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1975 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1976 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1977 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1978 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1979 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1980 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1981 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1982 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1983 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1984 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1985 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1986 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1987 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1988 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1989 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1990 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1991 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1992 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1993 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1994 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1995 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1996 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1997 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1998 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1999 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2000 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2001 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2002 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2003 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2004 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2005 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2006 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2007 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2008 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2009 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2010 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2011 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2012 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2014 tcph.th_ack = htonl(88);
2015 tcph.th_seq = htonl(5);
2034 tcph.th_ack = htonl(328);
2035 tcph.th_seq = htonl(88);
2060 static int AppLayerTest05(
void)
2065 uint8_t request[] = {
2066 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2067 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2068 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2069 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2070 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2071 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2072 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2073 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2074 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2075 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2076 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2078 tcph.th_ack = htonl(1);
2079 tcph.th_seq = htonl(1);
2098 uint8_t response[] = {
2099 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2100 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2101 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2102 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2103 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2104 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2105 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2106 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2107 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2108 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2109 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2110 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2111 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2112 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2113 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2114 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2115 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2116 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2117 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2118 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2119 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2120 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2121 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2122 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2123 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2124 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2125 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2126 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2127 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2128 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2129 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2130 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2131 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2132 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2133 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2134 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2135 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2136 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2137 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2138 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2139 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2141 tcph.th_ack = htonl(88);
2142 tcph.th_seq = htonl(1);
2161 tcph.th_ack = htonl(328);
2162 tcph.th_seq = htonl(88);
2187 static int AppLayerTest06(
void)
2192 uint8_t response[] = {
2193 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2194 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2195 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2196 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2197 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2198 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2199 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2200 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2201 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2202 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2203 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2204 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2205 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2206 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2207 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2208 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2209 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2210 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2211 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2212 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2213 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2214 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2215 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2216 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2217 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2218 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2219 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2220 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2221 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2222 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2223 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2224 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2225 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2226 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2227 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2228 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2229 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2230 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2231 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2232 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2233 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2234 tcph.th_ack = htonl(1);
2235 tcph.th_seq = htonl(1);
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(328);
2267 tcph.th_seq = htonl(1);
2285 tcph.th_ack = htonl(1 +
sizeof(request));
2286 tcph.th_seq = htonl(328);
2311 static int AppLayerTest07(
void)
2316 uint8_t request[] = {
2317 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2318 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2319 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2320 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2321 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2322 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2323 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2324 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2325 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2326 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2327 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2328 tcph.th_ack = htonl(1);
2329 tcph.th_seq = htonl(1);
2348 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2349 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2350 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2351 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2352 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2353 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2354 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2355 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2356 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2357 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2358 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2359 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2360 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2361 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2362 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2363 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2364 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2365 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2366 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2367 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2368 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2369 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2370 tcph.th_ack = htonl(88);
2371 tcph.th_seq = htonl(1);
2390 tcph.th_ack = htonl(328);
2391 tcph.th_seq = htonl(88);
2416 static int AppLayerTest08(
void)
2421 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2422 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2423 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2424 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2425 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2426 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2427 tcph.th_ack = htonl(1);
2428 tcph.th_seq = htonl(1);
2447 uint8_t response[] = {
2448 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2449 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2450 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2451 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2452 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2453 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2454 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2455 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2456 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2457 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2458 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2459 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2460 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2461 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2462 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2463 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2464 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2465 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2466 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2467 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2468 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2469 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2470 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2471 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2472 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2473 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2474 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2475 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2476 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2477 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2478 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2479 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2480 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2481 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2482 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2483 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2484 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2485 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2486 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2487 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2488 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2489 tcph.th_ack = htonl(88);
2490 tcph.th_seq = htonl(1);
2509 tcph.th_ack = htonl(328);
2510 tcph.th_seq = htonl(88);
2537 static int AppLayerTest09(
void)
2542 uint8_t request1[] = {
2543 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2544 tcph.th_ack = htonl(1);
2545 tcph.th_seq = htonl(1);
2564 tcph.th_ack = htonl(9);
2565 tcph.th_seq = htonl(1);
2584 uint8_t request2[] = {
2585 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2586 tcph.th_ack = htonl(1);
2587 tcph.th_seq = htonl(9);
2606 uint8_t response[] = {
2607 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2608 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2609 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2610 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2611 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2612 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2613 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2614 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2615 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2616 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2617 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2618 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2619 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2620 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2621 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2622 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2623 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2624 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2625 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2626 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2627 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2628 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2629 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2630 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2631 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2632 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2633 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2634 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2635 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2636 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2637 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2638 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2639 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2640 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2641 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2642 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2643 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2644 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2645 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2646 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2647 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2648 tcph.th_ack = htonl(18);
2649 tcph.th_seq = htonl(1);
2668 tcph.th_ack = htonl(328);
2669 tcph.th_seq = htonl(18);
2695 static int AppLayerTest10(
void)
2700 uint8_t request1[] = {
2701 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2702 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2703 tcph.th_ack = htonl(1);
2704 tcph.th_seq = htonl(1);
2723 tcph.th_ack = htonl(18);
2724 tcph.th_seq = htonl(1);
2743 uint8_t response[] = {
2744 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2745 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2746 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2747 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2748 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2749 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2750 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2751 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2752 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2753 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2754 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2755 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2756 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2757 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2758 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2759 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2760 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2761 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2762 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2763 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2764 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2765 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2766 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2767 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2768 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2769 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2770 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2771 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2772 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2773 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2774 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2775 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2776 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2777 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2778 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2779 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2780 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2781 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2782 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2783 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2784 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2785 tcph.th_ack = htonl(18);
2786 tcph.th_seq = htonl(1);
2805 tcph.th_ack = htonl(328);
2806 tcph.th_seq = htonl(18);
2833 static int AppLayerTest11(
void)
2838 uint8_t request1[] = {
2839 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2840 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2841 tcph.th_ack = htonl(1);
2842 tcph.th_seq = htonl(1);
2861 tcph.th_ack = htonl(18);
2862 tcph.th_seq = htonl(1);
2881 uint8_t response1[] = {
2882 0x55, 0x74, 0x54, 0x50, };
2883 tcph.th_ack = htonl(18);
2884 tcph.th_seq = htonl(1);
2903 tcph.th_ack = htonl(5);
2904 tcph.th_seq = htonl(18);
2922 uint8_t response2[] = {
2923 0x2f, 0x31, 0x2e, 0x31,
2924 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2925 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2926 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2927 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2928 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2929 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2930 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2931 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2932 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2933 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2934 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2935 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2936 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2937 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2938 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2939 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2940 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2941 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2942 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2943 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2944 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2945 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2946 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2947 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2948 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2949 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2950 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2951 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2952 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2953 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2954 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2955 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2956 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2957 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2958 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2959 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2960 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2961 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2962 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2963 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2964 tcph.th_ack = htonl(18);
2965 tcph.th_seq = htonl(5);
2984 tcph.th_ack = htonl(328);
2985 tcph.th_seq = htonl(18);