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)
1087 AppLayerNamesSetup();
1118 if (app_tctx == NULL)
1138 if (app_tctx == NULL)
1179 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1187 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1188 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1193 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1196 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1205 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1207 const char *
str =
"app_layer.flow.";
1208 const char *estr =
"app_layer.error.";
1213 FatalError(
"Unable to alloc applayer_counter_names.");
1217 FatalError(
"Unable to alloc applayer_counters.");
1222 const char *eps_default_str =
"exception_policy.app_layer.error.";
1224 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1235 const uint8_t ipproto = ipprotos[p];
1237 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1238 uint8_t ipprotos_all[256 / 8];
1241 if (alprotos[alproto] == 1) {
1242 const char *tx_str =
"app_layer.tx.";
1244 char alproto_str[32];
1245 for (
size_t i = 0; i < 32; i++) {
1246 alproto_str[i] = alproto_raw[i];
1247 if (alproto_str[i] == 0) {
1249 }
else if (alproto_str[i] ==
'-') {
1250 alproto_str[i] =
'_';
1254 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1256 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1257 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1260 str, alproto_str, ipproto_suffix);
1263 tx_str, alproto_str, ipproto_suffix);
1265 if (ipproto == IPPROTO_TCP) {
1268 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1272 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1275 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1278 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1280 AppLayerSetupExceptionPolicyPerProtoCounters(
1281 ipproto_map, alproto, alproto_str, ipproto_suffix);
1288 tx_str, alproto_str);
1290 if (ipproto == IPPROTO_TCP) {
1293 "%s%s.gap", estr, alproto_str);
1297 "%s%s.alloc", estr, alproto_str);
1300 "%s%s.parser", estr, alproto_str);
1303 "%s%s.internal", estr, alproto_str);
1304 AppLayerSetupExceptionPolicyPerProtoCounters(
1305 ipproto_map, alproto, alproto_str,
"");
1310 "failed", ipproto_suffix);
1311 if (ipproto == IPPROTO_TCP) {
1314 "%sfailed%s.gap", estr, ipproto_suffix);
1323 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1331 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1339 const uint8_t ipproto = ipprotos[p];
1343 if (alprotos[alproto] == 1) {
1353 if (ipproto == IPPROTO_TCP) {
1368 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1380 if (ipproto == IPPROTO_TCP) {
1403 #define TEST_START \
1404 Packet *p = PacketGetFromAlloc(); \
1408 StreamTcpThread *stt = NULL; \
1410 PacketQueueNoLock pq; \
1411 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1412 memset(&f, 0, sizeof(Flow)); \
1413 memset(&tv, 0, sizeof(ThreadVars)); \
1414 StatsThreadInit(&tv.stats); \
1415 memset(&tcph, 0, sizeof(TCPHdr)); \
1417 FLOW_INITIALIZE(&f); \
1418 f.flags = FLOW_IPV4; \
1419 f.proto = IPPROTO_TCP; \
1421 PacketSetTCP(p, (uint8_t *)&tcph); \
1423 StreamTcpInitConfig(true); \
1424 IPPairInitConfig(true); \
1425 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1428 tcph.th_win = htons(5480); \
1429 tcph.th_flags = TH_SYN; \
1430 p->flowflags = FLOW_PKT_TOSERVER; \
1431 p->payload_len = 0; \
1432 p->payload = NULL; \
1433 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1434 TcpSession *ssn = (TcpSession *)f.protoctx; \
1436 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1437 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1438 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1439 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1440 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1441 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1442 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1443 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1444 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1445 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1446 FAIL_IF(ssn->data_first_seen_dir != 0); \
1449 tcph.th_ack = htonl(1); \
1450 tcph.th_flags = TH_SYN | TH_ACK; \
1451 p->flowflags = FLOW_PKT_TOCLIENT; \
1452 p->payload_len = 0; \
1453 p->payload = NULL; \
1454 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1455 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1456 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1457 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1458 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1459 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1460 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1461 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1462 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1463 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1464 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1465 FAIL_IF(ssn->data_first_seen_dir != 0); \
1468 tcph.th_ack = htonl(1); \
1469 tcph.th_seq = htonl(1); \
1470 tcph.th_flags = TH_ACK; \
1471 p->flowflags = FLOW_PKT_TOSERVER; \
1472 p->payload_len = 0; \
1473 p->payload = NULL; \
1474 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1475 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1476 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1477 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1478 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1479 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1480 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1481 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1482 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1483 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1484 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1485 FAIL_IF(ssn->data_first_seen_dir != 0);
1487 StreamTcpSessionClear(p->flow->protoctx); \
1488 StreamTcpThreadDeinit(&tv, (void *)stt); \
1489 StreamTcpFreeConfig(true); \
1493 StatsThreadCleanup(&tv.stats);
1498 static int AppLayerTest01(
void)
1503 uint8_t request[] = {
1504 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1505 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1506 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1507 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1508 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1509 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1510 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1511 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1512 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1513 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1514 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1515 tcph.th_ack = htonl(1);
1516 tcph.th_seq = htonl(1);
1535 uint8_t response[] = {
1536 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1537 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1538 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1539 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1540 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1541 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1542 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1543 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1544 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1545 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1546 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1547 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1548 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1549 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1550 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1551 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1552 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1553 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1554 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1555 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1556 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1557 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1558 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1559 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1560 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1561 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1562 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1563 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1564 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1565 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1566 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1567 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1568 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1569 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1570 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1571 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1572 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1573 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1574 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1575 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1576 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1577 tcph.th_ack = htonl(88);
1578 tcph.th_seq = htonl(1);
1597 tcph.th_ack = htonl(328);
1598 tcph.th_seq = htonl(88);
1623 static int AppLayerTest02(
void)
1628 uint8_t request1[] = { 0x47, 0x45, };
1629 tcph.th_ack = htonl(1);
1630 tcph.th_seq = htonl(1);
1649 tcph.th_ack = htonl(3);
1650 tcph.th_seq = htonl(1);
1669 uint8_t request2[] = {
1670 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1671 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1672 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1673 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1674 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1675 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1676 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1677 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1678 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1679 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1680 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1681 tcph.th_ack = htonl(1);
1682 tcph.th_seq = htonl(3);
1701 uint8_t response[] = {
1702 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1703 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1704 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1705 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1706 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1707 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1708 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1709 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1710 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1711 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1712 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1713 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1714 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1715 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1716 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1717 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1718 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1719 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1720 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1721 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1722 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1723 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1724 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1725 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1726 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1727 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1728 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1729 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1730 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1731 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1732 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1733 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1734 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1735 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1736 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1737 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1738 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1739 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1740 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1741 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1742 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1743 tcph.th_ack = htonl(88);
1744 tcph.th_seq = htonl(1);
1763 tcph.th_ack = htonl(328);
1764 tcph.th_seq = htonl(88);
1789 static int AppLayerTest03(
void)
1794 uint8_t request[] = {
1795 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1796 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1797 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1798 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1799 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1800 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1801 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1802 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1803 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1804 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1805 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1806 tcph.th_ack = htonl(1);
1807 tcph.th_seq = htonl(1);
1826 uint8_t response[] = {
1827 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1828 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1829 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1830 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1831 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1832 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1833 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1834 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1835 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1836 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1837 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1838 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1839 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1840 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1841 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1842 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1843 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1844 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1845 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1846 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1847 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1848 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1849 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1850 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1851 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1852 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1853 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1854 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1855 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1856 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1857 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1858 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1859 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1860 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1861 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1862 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1863 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1864 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1865 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1866 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1867 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1868 tcph.th_ack = htonl(88);
1869 tcph.th_seq = htonl(1);
1888 tcph.th_ack = htonl(328);
1889 tcph.th_seq = htonl(88);
1914 static int AppLayerTest04(
void)
1919 uint8_t request[] = {
1920 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1921 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1922 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1923 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1924 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1925 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1926 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1927 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1928 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1929 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1930 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1932 tcph.th_ack = htonl(1);
1933 tcph.th_seq = htonl(1);
1952 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1954 tcph.th_ack = htonl(88);
1955 tcph.th_seq = htonl(1);
1974 tcph.th_ack = htonl(5);
1975 tcph.th_seq = htonl(88);
1994 uint8_t response2[] = {
1995 0x2f, 0x31, 0x2e, 0x31,
1996 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1997 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1998 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1999 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2000 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2001 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2002 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2003 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2004 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2005 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2006 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2007 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2008 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2009 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2010 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2011 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2012 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2013 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2014 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2015 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2016 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2017 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2018 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2019 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2020 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2021 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2022 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2023 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2024 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2025 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2026 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2027 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2028 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2029 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2030 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2031 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2032 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2033 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2034 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2035 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2037 tcph.th_ack = htonl(88);
2038 tcph.th_seq = htonl(5);
2057 tcph.th_ack = htonl(328);
2058 tcph.th_seq = htonl(88);
2083 static int AppLayerTest05(
void)
2088 uint8_t request[] = {
2089 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2090 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2091 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2092 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2093 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2094 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2095 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2096 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2097 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2098 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2099 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2101 tcph.th_ack = htonl(1);
2102 tcph.th_seq = htonl(1);
2121 uint8_t response[] = {
2122 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2123 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2124 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2125 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2126 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2127 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2128 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2129 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2130 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2131 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2132 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2133 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2134 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2135 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2136 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2137 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2138 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2139 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2140 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2141 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2142 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2143 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2144 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2145 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2146 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2147 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2148 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2149 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2150 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2151 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2152 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2153 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2154 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2155 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2156 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2157 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2158 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2159 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2160 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2161 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2162 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2164 tcph.th_ack = htonl(88);
2165 tcph.th_seq = htonl(1);
2184 tcph.th_ack = htonl(328);
2185 tcph.th_seq = htonl(88);
2210 static int AppLayerTest06(
void)
2215 uint8_t response[] = {
2216 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2217 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2218 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2219 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2220 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2221 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2222 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2223 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2224 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2225 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2226 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2227 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2228 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2229 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2230 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2231 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2232 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2233 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2234 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2235 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2236 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2237 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2238 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2239 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2240 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2241 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2242 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2243 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2244 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2245 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2246 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2247 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2248 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2249 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2250 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2251 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2252 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2253 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2254 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2255 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2256 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2257 tcph.th_ack = htonl(1);
2258 tcph.th_seq = htonl(1);
2277 uint8_t request[] = {
2278 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2279 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2280 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2281 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2282 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2283 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2284 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2285 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2286 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2287 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2288 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2289 tcph.th_ack = htonl(328);
2290 tcph.th_seq = htonl(1);
2308 tcph.th_ack = htonl(1 +
sizeof(request));
2309 tcph.th_seq = htonl(328);
2334 static int AppLayerTest07(
void)
2339 uint8_t request[] = {
2340 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2341 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2342 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2343 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2344 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2345 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2346 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2347 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2348 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2349 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2350 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2351 tcph.th_ack = htonl(1);
2352 tcph.th_seq = htonl(1);
2371 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2372 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2373 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2374 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2375 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2376 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2377 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2378 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2379 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2380 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2381 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2382 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2383 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2384 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2385 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2386 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2387 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2388 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2389 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2390 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2391 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2392 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2393 tcph.th_ack = htonl(88);
2394 tcph.th_seq = htonl(1);
2413 tcph.th_ack = htonl(328);
2414 tcph.th_seq = htonl(88);
2441 static int AppLayerTest09(
void)
2446 uint8_t request1[] = {
2447 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2448 tcph.th_ack = htonl(1);
2449 tcph.th_seq = htonl(1);
2468 tcph.th_ack = htonl(9);
2469 tcph.th_seq = htonl(1);
2488 uint8_t request2[] = {
2489 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2490 tcph.th_ack = htonl(1);
2491 tcph.th_seq = htonl(9);
2510 uint8_t response[] = {
2511 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2512 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2513 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2514 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2515 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2516 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2517 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2518 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2519 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2520 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2521 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2522 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2523 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2524 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2525 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2526 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2527 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2528 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2529 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2530 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2531 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2532 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2533 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2534 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2535 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2536 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2537 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2538 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2539 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2540 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2541 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2542 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2543 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2544 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2545 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2546 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2547 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2548 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2549 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2550 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2551 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2552 tcph.th_ack = htonl(18);
2553 tcph.th_seq = htonl(1);
2572 tcph.th_ack = htonl(328);
2573 tcph.th_seq = htonl(18);
2599 static int AppLayerTest10(
void)
2604 uint8_t request1[] = {
2605 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2606 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2607 tcph.th_ack = htonl(1);
2608 tcph.th_seq = htonl(1);
2627 tcph.th_ack = htonl(18);
2628 tcph.th_seq = htonl(1);
2647 uint8_t response[] = {
2648 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2649 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2650 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2651 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2652 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2653 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2654 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2655 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2656 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2657 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2658 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2659 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2660 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2661 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2662 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2663 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2664 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2665 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2666 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2667 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2668 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2669 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2670 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2671 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2672 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2673 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2674 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2675 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2676 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2677 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2678 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2679 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2680 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2681 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2682 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2683 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2684 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2685 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2686 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2687 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2688 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2689 tcph.th_ack = htonl(18);
2690 tcph.th_seq = htonl(1);
2709 tcph.th_ack = htonl(328);
2710 tcph.th_seq = htonl(18);
2737 static int AppLayerTest11(
void)
2742 uint8_t request1[] = {
2743 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2744 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2745 tcph.th_ack = htonl(1);
2746 tcph.th_seq = htonl(1);
2765 tcph.th_ack = htonl(18);
2766 tcph.th_seq = htonl(1);
2785 uint8_t response1[] = {
2786 0x55, 0x74, 0x54, 0x50, };
2787 tcph.th_ack = htonl(18);
2788 tcph.th_seq = htonl(1);
2807 tcph.th_ack = htonl(5);
2808 tcph.th_seq = htonl(18);
2826 uint8_t response2[] = {
2827 0x2f, 0x31, 0x2e, 0x31,
2828 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2829 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2830 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2831 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2832 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2833 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2834 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2835 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2836 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2837 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2838 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2839 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2840 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2841 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2842 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2843 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2844 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2845 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2846 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2847 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2848 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2849 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2850 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2851 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2852 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2853 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2854 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2855 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2856 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2857 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2858 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2859 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2860 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2861 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2862 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2863 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2864 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2865 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2866 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2867 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2868 tcph.th_ack = htonl(18);
2869 tcph.th_seq = htonl(5);
2888 tcph.th_ack = htonl(328);
2889 tcph.th_seq = htonl(18);