76 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
78 #define MAX_COUNTER_SIZE 64
120 .valid_settings_ips = {
139 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
225 if (
flags & STREAM_TOSERVER) {
241 if (
flags & STREAM_TOSERVER) {
251 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
258 AppLayerIncFlowCounter(
tv, f);
264 FlagPacketFlow(
p, f, STREAM_TOCLIENT);
270 FlagPacketFlow(
p, f, STREAM_TOSERVER);
272 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
295 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
299 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
305 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
309 const uint32_t size_tc_limit =
311 const uint32_t size_ts_limit =
314 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
315 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
321 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
326 size_ts > size_ts_limit && size_tc == 0) {
331 size_tc > size_tc_limit && size_ts == 0) {
338 }
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) &&
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");
465 if (*stream == &ssn->
client) {
470 direction = 1 - direction;
478 AppLayerIncFlowCounter(
tv, f);
491 SCLogDebug(
"protocol %s needs first data in other direction",
494 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
495 p, ssn, *stream) != 0)
527 uint8_t first_data_dir;
542 if (first_data_dir && !(first_data_dir &
flags)) {
558 flags, data, data_len);
567 if (*stream == &ssn->
client) {
568 opposing_stream = &ssn->
server;
570 opposing_stream = &ssn->
client;
574 AppLayerIncFlowCounter(
tv, f);
602 DisableAppLayer(
tv, f,
p);
608 uint8_t first_data_dir;
627 (first_data_dir) && !(first_data_dir &
flags))
657 AppLayerIncFlowCounter(
tv, f);
659 *alproto = *alproto_otherdir;
660 SCLogDebug(
"packet %" PRIu64
": pd done(us %u them %u), parser called (r==%d), "
661 "APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
669 FlagPacketFlow(
p, f,
flags);
671 }
else if (
flags & STREAM_EOF) {
674 AppLayerIncFlowCounter(
tv, f);
685 DisableAppLayer(
tv, f,
p);
688 TCPProtoDetectCheckBailConditions(
tv, f, ssn,
p);
698 DisableAppLayer(
tv, f,
p);
725 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
729 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
731 if (
flags & STREAM_TOSERVER) {
739 if (
flags & STREAM_GAP) {
743 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
748 AppLayerIncFlowCounter(
tv, f);
752 SCLogDebug(
"Cannot handle gap while changing protocol");
757 flags, data, data_len);
778 if (TCPProtoDetect(
tv, ra_ctx, app_tctx,
p, f, ssn, stream, data, data_len,
flags,
779 app_update_dir) != 0) {
784 void *alstate_orig = f->
alstate;
791 int rd = TCPProtoDetect(
792 tv, ra_ctx, app_tctx,
p, f, ssn, stream, data, data_len,
flags, app_update_dir);
803 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");
978 FlagPacketFlow(
p, f, STREAM_TOSERVER);
979 FlagPacketFlow(
p, f, STREAM_TOCLIENT);
981 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1030 printf(
"=========Supported App Layer Protocols=========\n");
1032 if (alprotos[alproto] == 1)
1040 static void AppLayerNamesSetup(
void)
1088 AppLayerNamesSetup();
1119 if (app_tctx == NULL)
1139 if (app_tctx == NULL)
1180 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1188 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1189 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1194 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1197 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1206 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1208 const char *
str =
"app_layer.flow.";
1209 const char *estr =
"app_layer.error.";
1214 FatalError(
"Unable to alloc applayer_counter_names.");
1218 FatalError(
"Unable to alloc applayer_counters.");
1223 const char *eps_default_str =
"exception_policy.app_layer.error.";
1225 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1236 const uint8_t ipproto = ipprotos[
p];
1238 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1239 uint8_t ipprotos_all[256 / 8];
1242 if (alprotos[alproto] == 1) {
1243 const char *tx_str =
"app_layer.tx.";
1245 char alproto_str[32];
1246 for (
size_t i = 0; i < 32; i++) {
1247 alproto_str[i] = alproto_raw[i];
1248 if (alproto_str[i] == 0) {
1250 }
else if (alproto_str[i] ==
'-') {
1251 alproto_str[i] =
'_';
1255 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1257 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1258 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1261 str, alproto_str, ipproto_suffix);
1264 tx_str, alproto_str, ipproto_suffix);
1266 if (ipproto == IPPROTO_TCP) {
1269 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1273 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1276 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1279 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1281 AppLayerSetupExceptionPolicyPerProtoCounters(
1282 ipproto_map, alproto, alproto_str, ipproto_suffix);
1289 tx_str, alproto_str);
1291 if (ipproto == IPPROTO_TCP) {
1294 "%s%s.gap", estr, alproto_str);
1298 "%s%s.alloc", estr, alproto_str);
1301 "%s%s.parser", estr, alproto_str);
1304 "%s%s.internal", estr, alproto_str);
1305 AppLayerSetupExceptionPolicyPerProtoCounters(
1306 ipproto_map, alproto, alproto_str,
"");
1311 "failed", ipproto_suffix);
1312 if (ipproto == IPPROTO_TCP) {
1315 "%sfailed%s.gap", estr, ipproto_suffix);
1324 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1332 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1340 const uint8_t ipproto = ipprotos[
p];
1344 if (alprotos[alproto] == 1) {
1354 if (ipproto == IPPROTO_TCP) {
1369 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1381 if (ipproto == IPPROTO_TCP) {
1404 #define TEST_START \
1405 Packet *p = PacketGetFromAlloc(); \
1409 StreamTcpThread *stt = NULL; \
1411 PacketQueueNoLock pq; \
1412 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1413 memset(&f, 0, sizeof(Flow)); \
1414 memset(&tv, 0, sizeof(ThreadVars)); \
1415 StatsThreadInit(&tv.stats); \
1416 memset(&tcph, 0, sizeof(TCPHdr)); \
1418 FLOW_INITIALIZE(&f); \
1419 f.flags = FLOW_IPV4; \
1420 f.proto = IPPROTO_TCP; \
1422 PacketSetTCP(p, (uint8_t *)&tcph); \
1424 StreamTcpInitConfig(true); \
1425 IPPairInitConfig(true); \
1426 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1429 tcph.th_win = htons(5480); \
1430 tcph.th_flags = TH_SYN; \
1431 p->flowflags = FLOW_PKT_TOSERVER; \
1432 p->payload_len = 0; \
1433 p->payload = NULL; \
1434 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1435 TcpSession *ssn = (TcpSession *)f.protoctx; \
1437 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1438 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1439 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1440 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1441 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1442 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1443 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1444 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1445 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1446 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1447 FAIL_IF(ssn->data_first_seen_dir != 0); \
1450 tcph.th_ack = htonl(1); \
1451 tcph.th_flags = TH_SYN | TH_ACK; \
1452 p->flowflags = FLOW_PKT_TOCLIENT; \
1453 p->payload_len = 0; \
1454 p->payload = NULL; \
1455 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1456 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1457 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1458 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1459 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1460 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1461 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1462 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1463 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1464 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1465 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1466 FAIL_IF(ssn->data_first_seen_dir != 0); \
1469 tcph.th_ack = htonl(1); \
1470 tcph.th_seq = htonl(1); \
1471 tcph.th_flags = TH_ACK; \
1472 p->flowflags = FLOW_PKT_TOSERVER; \
1473 p->payload_len = 0; \
1474 p->payload = NULL; \
1475 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1476 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1477 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1478 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1479 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1480 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1481 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1482 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1483 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1484 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1485 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1486 FAIL_IF(ssn->data_first_seen_dir != 0);
1488 StreamTcpSessionClear(p->flow->protoctx); \
1489 StreamTcpThreadDeinit(&tv, (void *)stt); \
1490 StreamTcpFreeConfig(true); \
1494 StatsThreadCleanup(&tv.stats);
1499 static int AppLayerTest01(
void)
1504 uint8_t request[] = {
1505 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1506 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1507 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1508 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1509 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1510 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1511 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1512 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1513 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1514 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1515 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1516 tcph.th_ack = htonl(1);
1517 tcph.th_seq = htonl(1);
1536 uint8_t response[] = {
1537 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1538 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1539 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1540 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1541 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1542 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1543 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1544 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1545 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1546 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1547 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1548 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1549 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1550 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1551 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1552 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1553 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1554 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1555 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1556 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1557 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1558 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1559 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1560 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1561 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1562 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1563 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1564 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1565 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1566 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1567 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1568 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1569 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1570 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1571 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1572 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1573 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1574 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1575 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1576 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1577 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1578 tcph.th_ack = htonl(88);
1579 tcph.th_seq = htonl(1);
1598 tcph.th_ack = htonl(328);
1599 tcph.th_seq = htonl(88);
1624 static int AppLayerTest02(
void)
1629 uint8_t request1[] = { 0x47, 0x45, };
1630 tcph.th_ack = htonl(1);
1631 tcph.th_seq = htonl(1);
1650 tcph.th_ack = htonl(3);
1651 tcph.th_seq = htonl(1);
1670 uint8_t request2[] = {
1671 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1672 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1673 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1674 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1675 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1676 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1677 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1678 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1679 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1680 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1681 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1682 tcph.th_ack = htonl(1);
1683 tcph.th_seq = htonl(3);
1702 uint8_t response[] = {
1703 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1704 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1705 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1706 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1707 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1708 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1709 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1710 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1711 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1712 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1713 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1714 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1715 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1716 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1717 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1718 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1719 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1720 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1721 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1722 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1723 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1724 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1725 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1726 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1727 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1728 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1729 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1730 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1731 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1732 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1733 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1734 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1735 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1736 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1737 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1738 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1739 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1740 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1741 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1742 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1743 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1744 tcph.th_ack = htonl(88);
1745 tcph.th_seq = htonl(1);
1764 tcph.th_ack = htonl(328);
1765 tcph.th_seq = htonl(88);
1790 static int AppLayerTest03(
void)
1795 uint8_t request[] = {
1796 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1797 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1798 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1799 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1800 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1801 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1802 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1803 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1804 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1805 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1806 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1807 tcph.th_ack = htonl(1);
1808 tcph.th_seq = htonl(1);
1827 uint8_t response[] = {
1828 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1829 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1830 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1831 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1832 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1833 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1834 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1835 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1836 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1837 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1838 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1839 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1840 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1841 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1842 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1843 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1844 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1845 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1846 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1847 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1848 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1849 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1850 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1851 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1852 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1853 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1854 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1855 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1856 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1857 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1858 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1859 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1860 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1861 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1862 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1863 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1864 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1865 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1866 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1867 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1868 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1869 tcph.th_ack = htonl(88);
1870 tcph.th_seq = htonl(1);
1889 tcph.th_ack = htonl(328);
1890 tcph.th_seq = htonl(88);
1915 static int AppLayerTest04(
void)
1920 uint8_t request[] = {
1921 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1922 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1923 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1924 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1925 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1926 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1927 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1928 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1929 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1930 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1931 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1933 tcph.th_ack = htonl(1);
1934 tcph.th_seq = htonl(1);
1953 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1955 tcph.th_ack = htonl(88);
1956 tcph.th_seq = htonl(1);
1975 tcph.th_ack = htonl(5);
1976 tcph.th_seq = htonl(88);
1995 uint8_t response2[] = {
1996 0x2f, 0x31, 0x2e, 0x31,
1997 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1998 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1999 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2000 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2001 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2002 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2003 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2004 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2005 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2006 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2007 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2008 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2009 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2010 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2011 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2012 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2013 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2014 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2015 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2016 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2017 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2018 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2019 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2020 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2021 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2022 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2023 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2024 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2025 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2026 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2027 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2028 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2029 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2030 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2031 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2032 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2033 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2034 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2035 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2036 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2038 tcph.th_ack = htonl(88);
2039 tcph.th_seq = htonl(5);
2058 tcph.th_ack = htonl(328);
2059 tcph.th_seq = htonl(88);
2084 static int AppLayerTest05(
void)
2089 uint8_t request[] = {
2090 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2091 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2092 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2093 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2094 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2095 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2096 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2097 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2098 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2099 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2100 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2102 tcph.th_ack = htonl(1);
2103 tcph.th_seq = htonl(1);
2122 uint8_t response[] = {
2123 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2124 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2125 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2126 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2127 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2128 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2129 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2130 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2131 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2132 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2133 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2134 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2135 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2136 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2137 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2138 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2139 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2140 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2141 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2142 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2143 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2144 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2145 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2146 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2147 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2148 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2149 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2150 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2151 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2152 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2153 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2154 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2155 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2156 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2157 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2158 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2159 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2160 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2161 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2162 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2163 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2165 tcph.th_ack = htonl(88);
2166 tcph.th_seq = htonl(1);
2185 tcph.th_ack = htonl(328);
2186 tcph.th_seq = htonl(88);
2211 static int AppLayerTest06(
void)
2216 uint8_t response[] = {
2217 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2218 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2219 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2220 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2221 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2222 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2223 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2224 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2225 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2226 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2227 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2228 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2229 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2230 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2231 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2232 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2233 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2234 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2235 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2236 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2237 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2238 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2239 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2240 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2241 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2242 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2243 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2244 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2245 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2246 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2247 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2248 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2249 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2250 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2251 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2252 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2253 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2254 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2255 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2256 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2257 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2258 tcph.th_ack = htonl(1);
2259 tcph.th_seq = htonl(1);
2278 uint8_t request[] = {
2279 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2280 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2281 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2282 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2283 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2284 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2285 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2286 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2287 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2288 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2289 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2290 tcph.th_ack = htonl(328);
2291 tcph.th_seq = htonl(1);
2309 tcph.th_ack = htonl(1 +
sizeof(request));
2310 tcph.th_seq = htonl(328);
2335 static int AppLayerTest07(
void)
2340 uint8_t request[] = {
2341 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2342 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2343 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2344 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2345 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2346 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2347 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2348 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2349 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2350 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2351 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2352 tcph.th_ack = htonl(1);
2353 tcph.th_seq = htonl(1);
2372 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2373 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2374 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2375 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2376 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2377 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2378 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2379 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2380 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2381 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2382 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2383 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2384 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2385 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2386 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2387 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2388 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2389 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2390 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2391 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2392 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2393 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2394 tcph.th_ack = htonl(88);
2395 tcph.th_seq = htonl(1);
2414 tcph.th_ack = htonl(328);
2415 tcph.th_seq = htonl(88);
2442 static int AppLayerTest09(
void)
2447 uint8_t request1[] = {
2448 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2449 tcph.th_ack = htonl(1);
2450 tcph.th_seq = htonl(1);
2469 tcph.th_ack = htonl(9);
2470 tcph.th_seq = htonl(1);
2489 uint8_t request2[] = {
2490 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2491 tcph.th_ack = htonl(1);
2492 tcph.th_seq = htonl(9);
2511 uint8_t response[] = {
2512 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2513 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2514 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2515 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2516 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2517 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2518 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2519 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2520 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2521 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2522 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2523 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2524 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2525 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2526 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2527 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2528 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2529 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2530 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2531 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2532 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2533 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2534 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2535 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2536 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2537 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2538 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2539 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2540 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2541 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2542 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2543 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2544 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2545 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2546 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2547 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2548 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2549 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2550 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2551 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2552 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2553 tcph.th_ack = htonl(18);
2554 tcph.th_seq = htonl(1);
2573 tcph.th_ack = htonl(328);
2574 tcph.th_seq = htonl(18);
2600 static int AppLayerTest10(
void)
2605 uint8_t request1[] = {
2606 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2607 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2608 tcph.th_ack = htonl(1);
2609 tcph.th_seq = htonl(1);
2628 tcph.th_ack = htonl(18);
2629 tcph.th_seq = htonl(1);
2648 uint8_t response[] = {
2649 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2650 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2651 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2652 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2653 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2654 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2655 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2656 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2657 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2658 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2659 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2660 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2661 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2662 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2663 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2664 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2665 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2666 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2667 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2668 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2669 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2670 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2671 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2672 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2673 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2674 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2675 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2676 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2677 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2678 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2679 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2680 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2681 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2682 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2683 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2684 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2685 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2686 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2687 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2688 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2689 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2690 tcph.th_ack = htonl(18);
2691 tcph.th_seq = htonl(1);
2710 tcph.th_ack = htonl(328);
2711 tcph.th_seq = htonl(18);
2738 static int AppLayerTest11(
void)
2743 uint8_t request1[] = {
2744 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2745 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2746 tcph.th_ack = htonl(1);
2747 tcph.th_seq = htonl(1);
2766 tcph.th_ack = htonl(18);
2767 tcph.th_seq = htonl(1);
2786 uint8_t response1[] = {
2787 0x55, 0x74, 0x54, 0x50, };
2788 tcph.th_ack = htonl(18);
2789 tcph.th_seq = htonl(1);
2808 tcph.th_ack = htonl(5);
2809 tcph.th_seq = htonl(18);
2827 uint8_t response2[] = {
2828 0x2f, 0x31, 0x2e, 0x31,
2829 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2830 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2831 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2832 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2833 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2834 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2835 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2836 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2837 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2838 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2839 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2840 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2841 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2842 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2843 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2844 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2845 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2846 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2847 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2848 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2849 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2850 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2851 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2852 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2853 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2854 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2855 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2856 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2857 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2858 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2859 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2860 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2861 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2862 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2863 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2864 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2865 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2866 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2867 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2868 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2869 tcph.th_ack = htonl(18);
2870 tcph.th_seq = htonl(5);
2889 tcph.th_ack = htonl(328);
2890 tcph.th_seq = htonl(18);