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) {
740 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
745 AppLayerIncFlowCounter(
tv, f);
749 SCLogDebug(
"Cannot handle gap while changing protocol");
754 flags, data, data_len);
775 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
776 app_update_dir) != 0) {
781 void *alstate_orig = f->
alstate;
788 int rd = TCPProtoDetect(
789 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
800 if (alstate_orig == f->
alstate) {
824 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
825 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
828 printf(
"=> Stream Data (app layer) -- start %s%s\n",
829 flags & STREAM_TOCLIENT ?
"toclient" :
"",
830 flags & STREAM_TOSERVER ?
"toserver" :
"");
832 printf(
"=> Stream Data -- end\n");
840 flags, data, data_len);
887 flags |= STREAM_TOSERVER;
891 flags |= STREAM_TOCLIENT;
900 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
903 bool reverse_flow =
false;
913 f->
alproto = *alproto_otherdir;
915 *alproto = *alproto_otherdir;
927 f->
alproto = *alproto_otherdir;
936 if (*alproto_otherdir != *alproto) {
952 AppLayerIncFlowCounter(
tv, f);
958 SCLogDebug(
"reversing flow after proto detect told us so");
973 FlagPacketFlow(p, f, STREAM_TOSERVER);
974 FlagPacketFlow(p, f, STREAM_TOCLIENT);
976 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1021 printf(
"=========Supported App Layer Protocols=========\n");
1022 for (alproto = 0; alproto <
ALPROTO_MAX; alproto++) {
1023 if (alprotos[alproto] == 1)
1064 if (app_tctx == NULL)
1084 if (app_tctx == NULL)
1125 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1133 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1134 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1139 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1142 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1151 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1153 const char *
str =
"app_layer.flow.";
1154 const char *estr =
"app_layer.error.";
1159 const char *eps_default_str =
"app_layer.error.exception_policy.";
1161 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1172 const uint8_t ipproto = ipprotos[p];
1174 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1175 uint8_t ipprotos_all[256 / 8];
1178 if (alprotos[alproto] == 1) {
1179 const char *tx_str =
"app_layer.tx.";
1182 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1184 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1185 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1188 "%s%s%s",
str, alproto_str, ipproto_suffix);
1191 "%s%s%s", tx_str, alproto_str, ipproto_suffix);
1193 if (ipproto == IPPROTO_TCP) {
1196 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1200 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1203 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1206 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1208 AppLayerSetupExceptionPolicyPerProtoCounters(
1209 ipproto_map, alproto, alproto_str, ipproto_suffix);
1213 "%s%s",
str, alproto_str);
1216 "%s%s", tx_str, alproto_str);
1218 if (ipproto == IPPROTO_TCP) {
1221 "%s%s.gap", estr, alproto_str);
1225 "%s%s.alloc", estr, alproto_str);
1228 "%s%s.parser", estr, alproto_str);
1231 "%s%s.internal", estr, alproto_str);
1232 AppLayerSetupExceptionPolicyPerProtoCounters(
1233 ipproto_map, alproto, alproto_str,
"");
1238 "%s%s%s",
str,
"failed", ipproto_suffix);
1239 if (ipproto == IPPROTO_TCP) {
1242 "%sfailed%s.gap", estr, ipproto_suffix);
1251 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1259 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1267 const uint8_t ipproto = ipprotos[p];
1271 if (alprotos[alproto] == 1) {
1278 if (ipproto == IPPROTO_TCP) {
1293 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1304 if (ipproto == IPPROTO_TCP) {
1327 #define TEST_START \
1328 Packet *p = PacketGetFromAlloc(); \
1332 StreamTcpThread *stt = NULL; \
1334 PacketQueueNoLock pq; \
1335 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1336 memset(&f, 0, sizeof(Flow)); \
1337 memset(&tv, 0, sizeof(ThreadVars)); \
1338 memset(&tcph, 0, sizeof(TCPHdr)); \
1340 FLOW_INITIALIZE(&f); \
1341 f.flags = FLOW_IPV4; \
1342 f.proto = IPPROTO_TCP; \
1344 PacketSetTCP(p, (uint8_t *)&tcph); \
1346 StreamTcpInitConfig(true); \
1347 IPPairInitConfig(true); \
1348 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1351 tcph.th_win = htons(5480); \
1352 tcph.th_flags = TH_SYN; \
1353 p->flowflags = FLOW_PKT_TOSERVER; \
1354 p->payload_len = 0; \
1355 p->payload = NULL; \
1356 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1357 TcpSession *ssn = (TcpSession *)f.protoctx; \
1359 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1360 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1361 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1362 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1363 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1364 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1365 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1366 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1367 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1368 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1369 FAIL_IF(ssn->data_first_seen_dir != 0); \
1372 tcph.th_ack = htonl(1); \
1373 tcph.th_flags = TH_SYN | TH_ACK; \
1374 p->flowflags = FLOW_PKT_TOCLIENT; \
1375 p->payload_len = 0; \
1376 p->payload = NULL; \
1377 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1378 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1379 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1380 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1381 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1382 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1383 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1384 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1385 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1386 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1387 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1388 FAIL_IF(ssn->data_first_seen_dir != 0); \
1391 tcph.th_ack = htonl(1); \
1392 tcph.th_seq = htonl(1); \
1393 tcph.th_flags = TH_ACK; \
1394 p->flowflags = FLOW_PKT_TOSERVER; \
1395 p->payload_len = 0; \
1396 p->payload = NULL; \
1397 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1398 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1399 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1400 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1401 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1402 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1403 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1404 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1405 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1406 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1407 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1408 FAIL_IF(ssn->data_first_seen_dir != 0);
1410 StreamTcpSessionClear(p->flow->protoctx); \
1411 StreamTcpThreadDeinit(&tv, (void *)stt); \
1412 StreamTcpFreeConfig(true); \
1415 StatsThreadCleanup(&tv);
1420 static int AppLayerTest01(
void)
1425 uint8_t request[] = {
1426 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1427 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1428 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1429 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1430 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1431 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1432 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1433 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1434 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1435 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1436 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1437 tcph.th_ack = htonl(1);
1438 tcph.th_seq = htonl(1);
1457 uint8_t response[] = {
1458 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1459 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1460 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1461 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1462 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1463 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1464 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1465 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1466 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1467 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1468 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1469 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1470 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1471 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1472 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1473 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1474 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1475 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1476 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1477 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1478 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1479 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1480 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1481 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1482 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1483 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1484 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1485 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1486 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1487 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1488 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1489 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1490 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1491 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1492 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1493 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1494 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1495 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1496 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1497 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1498 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1499 tcph.th_ack = htonl(88);
1500 tcph.th_seq = htonl(1);
1519 tcph.th_ack = htonl(328);
1520 tcph.th_seq = htonl(88);
1545 static int AppLayerTest02(
void)
1550 uint8_t request1[] = { 0x47, 0x45, };
1551 tcph.th_ack = htonl(1);
1552 tcph.th_seq = htonl(1);
1571 tcph.th_ack = htonl(3);
1572 tcph.th_seq = htonl(1);
1591 uint8_t request2[] = {
1592 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1593 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1594 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1595 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1596 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1597 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1598 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1599 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1600 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1601 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1602 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1603 tcph.th_ack = htonl(1);
1604 tcph.th_seq = htonl(3);
1623 uint8_t response[] = {
1624 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1625 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1626 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1627 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1628 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1629 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1630 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1631 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1632 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1633 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1634 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1635 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1636 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1637 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1638 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1639 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1640 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1641 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1642 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1643 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1644 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1645 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1646 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1647 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1648 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1649 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1650 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1651 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1652 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1653 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1654 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1655 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1656 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1657 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1658 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1659 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1660 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1661 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1662 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1663 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1664 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1665 tcph.th_ack = htonl(88);
1666 tcph.th_seq = htonl(1);
1685 tcph.th_ack = htonl(328);
1686 tcph.th_seq = htonl(88);
1711 static int AppLayerTest03(
void)
1716 uint8_t request[] = {
1717 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1718 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1719 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1720 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1721 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1722 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1723 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1724 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1725 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1726 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1727 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1728 tcph.th_ack = htonl(1);
1729 tcph.th_seq = htonl(1);
1748 uint8_t response[] = {
1749 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1750 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1751 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1752 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1753 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1754 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1755 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1756 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1757 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1758 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1759 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1760 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1761 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1762 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1763 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1764 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1765 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1766 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1767 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1768 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1769 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1770 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1771 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1772 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1773 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1774 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1775 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1776 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1777 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1778 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1779 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1780 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1781 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1782 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1783 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1784 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1785 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1786 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1787 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1788 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1789 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1790 tcph.th_ack = htonl(88);
1791 tcph.th_seq = htonl(1);
1810 tcph.th_ack = htonl(328);
1811 tcph.th_seq = htonl(88);
1836 static int AppLayerTest04(
void)
1841 uint8_t request[] = {
1842 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1843 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1844 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1845 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1846 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1847 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1848 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1849 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1850 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1851 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1852 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1854 tcph.th_ack = htonl(1);
1855 tcph.th_seq = htonl(1);
1874 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1876 tcph.th_ack = htonl(88);
1877 tcph.th_seq = htonl(1);
1896 tcph.th_ack = htonl(5);
1897 tcph.th_seq = htonl(88);
1916 uint8_t response2[] = {
1917 0x2f, 0x31, 0x2e, 0x31,
1918 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1919 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1920 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1921 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1922 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1923 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1924 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1925 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1926 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1927 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1928 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1929 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1930 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1931 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1932 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1933 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1934 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1935 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1936 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1937 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1938 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1939 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1940 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1941 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1942 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1943 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1944 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1945 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1946 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1947 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1948 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1949 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1950 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1951 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1952 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1953 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1954 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1955 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1956 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1957 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1959 tcph.th_ack = htonl(88);
1960 tcph.th_seq = htonl(5);
1979 tcph.th_ack = htonl(328);
1980 tcph.th_seq = htonl(88);
2005 static int AppLayerTest05(
void)
2010 uint8_t request[] = {
2011 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2012 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2013 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2014 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2015 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2016 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2017 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2018 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2019 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2020 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2021 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2023 tcph.th_ack = htonl(1);
2024 tcph.th_seq = htonl(1);
2043 uint8_t response[] = {
2044 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2045 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2046 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2047 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2048 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2049 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2050 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2051 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2052 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2053 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2054 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2055 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2056 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2057 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2058 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2059 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2060 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2061 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2062 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2063 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2064 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2065 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2066 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2067 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2068 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2069 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2070 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2071 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2072 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2073 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2074 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2075 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2076 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2077 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2078 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2079 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2080 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2081 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2082 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2083 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2084 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2086 tcph.th_ack = htonl(88);
2087 tcph.th_seq = htonl(1);
2106 tcph.th_ack = htonl(328);
2107 tcph.th_seq = htonl(88);
2132 static int AppLayerTest06(
void)
2137 uint8_t response[] = {
2138 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2139 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2140 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2141 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2142 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2143 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2144 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2145 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2146 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2147 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2148 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2149 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2150 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2151 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2152 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2153 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2154 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2155 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2156 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2157 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2158 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2159 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2160 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2161 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2162 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2163 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2164 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2165 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2166 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2167 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2168 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2169 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2170 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2171 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2172 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2173 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2174 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2175 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2176 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2177 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2178 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2179 tcph.th_ack = htonl(1);
2180 tcph.th_seq = htonl(1);
2199 uint8_t request[] = {
2200 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2201 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2202 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2203 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2204 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2205 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2206 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2207 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2208 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2209 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2210 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2211 tcph.th_ack = htonl(328);
2212 tcph.th_seq = htonl(1);
2230 tcph.th_ack = htonl(1 +
sizeof(request));
2231 tcph.th_seq = htonl(328);
2256 static int AppLayerTest07(
void)
2261 uint8_t request[] = {
2262 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2263 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2264 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2265 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2266 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2267 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2268 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2269 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2270 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2271 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2272 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2273 tcph.th_ack = htonl(1);
2274 tcph.th_seq = htonl(1);
2293 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2294 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2295 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2296 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2297 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2298 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2299 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2300 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2301 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2302 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2303 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2304 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2305 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2306 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2307 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2308 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2309 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2310 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2311 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2312 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2313 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2314 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2315 tcph.th_ack = htonl(88);
2316 tcph.th_seq = htonl(1);
2335 tcph.th_ack = htonl(328);
2336 tcph.th_seq = htonl(88);
2361 static int AppLayerTest08(
void)
2366 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2367 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2368 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2369 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2370 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2371 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2372 tcph.th_ack = htonl(1);
2373 tcph.th_seq = htonl(1);
2392 uint8_t response[] = {
2393 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2394 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2395 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2396 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2397 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2398 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2399 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2400 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2401 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2402 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2403 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2404 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2405 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2406 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2407 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2408 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2409 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2410 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2411 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2412 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2413 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2414 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2415 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2416 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2417 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2418 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2419 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2420 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2421 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2422 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2423 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2424 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2425 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2426 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2427 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2428 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2429 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2430 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2431 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2432 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2433 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2434 tcph.th_ack = htonl(88);
2435 tcph.th_seq = htonl(1);
2454 tcph.th_ack = htonl(328);
2455 tcph.th_seq = htonl(88);
2482 static int AppLayerTest09(
void)
2487 uint8_t request1[] = {
2488 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2489 tcph.th_ack = htonl(1);
2490 tcph.th_seq = htonl(1);
2509 tcph.th_ack = htonl(9);
2510 tcph.th_seq = htonl(1);
2529 uint8_t request2[] = {
2530 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2531 tcph.th_ack = htonl(1);
2532 tcph.th_seq = htonl(9);
2551 uint8_t response[] = {
2552 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2553 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2554 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2555 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2556 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2557 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2558 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2559 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2560 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2561 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2562 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2563 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2564 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2565 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2566 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2567 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2568 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2569 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2570 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2571 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2572 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2573 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2574 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2575 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2576 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2577 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2578 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2579 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2580 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2581 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2582 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2583 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2584 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2585 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2586 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2587 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2588 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2589 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2590 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2591 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2592 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2593 tcph.th_ack = htonl(18);
2594 tcph.th_seq = htonl(1);
2613 tcph.th_ack = htonl(328);
2614 tcph.th_seq = htonl(18);
2640 static int AppLayerTest10(
void)
2645 uint8_t request1[] = {
2646 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2647 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2648 tcph.th_ack = htonl(1);
2649 tcph.th_seq = htonl(1);
2668 tcph.th_ack = htonl(18);
2669 tcph.th_seq = htonl(1);
2688 uint8_t response[] = {
2689 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2690 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2691 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2692 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2693 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2694 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2695 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2696 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2697 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2698 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2699 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2700 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2701 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2702 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2703 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2704 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2705 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2706 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2707 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2708 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2709 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2710 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2711 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2712 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2713 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2714 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2715 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2716 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2717 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2718 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2719 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2720 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2721 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2722 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2723 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2724 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2725 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2726 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2727 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2728 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2729 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2730 tcph.th_ack = htonl(18);
2731 tcph.th_seq = htonl(1);
2750 tcph.th_ack = htonl(328);
2751 tcph.th_seq = htonl(18);
2778 static int AppLayerTest11(
void)
2783 uint8_t request1[] = {
2784 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2785 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2786 tcph.th_ack = htonl(1);
2787 tcph.th_seq = htonl(1);
2806 tcph.th_ack = htonl(18);
2807 tcph.th_seq = htonl(1);
2826 uint8_t response1[] = {
2827 0x55, 0x74, 0x54, 0x50, };
2828 tcph.th_ack = htonl(18);
2829 tcph.th_seq = htonl(1);
2848 tcph.th_ack = htonl(5);
2849 tcph.th_seq = htonl(18);
2867 uint8_t response2[] = {
2868 0x2f, 0x31, 0x2e, 0x31,
2869 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2870 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2871 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2872 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2873 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2874 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2875 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2876 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2877 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2878 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2879 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2880 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2881 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2882 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2883 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2884 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2885 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2886 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2887 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2888 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2889 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2890 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2891 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2892 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2893 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2894 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2895 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2896 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2897 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2898 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2899 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2900 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2901 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2902 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2903 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2904 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2905 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2906 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2907 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2908 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2909 tcph.th_ack = htonl(18);
2910 tcph.th_seq = htonl(5);
2929 tcph.th_ack = htonl(328);
2930 tcph.th_seq = htonl(18);