73 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
75 #define MAX_COUNTER_SIZE 64
104 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
171 if (
flags & STREAM_TOSERVER) {
187 if (
flags & STREAM_TOSERVER) {
197 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
204 AppLayerIncFlowCounter(
tv, f);
210 FlagPacketFlow(p, f, STREAM_TOCLIENT);
216 FlagPacketFlow(p, f, STREAM_TOSERVER);
218 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
241 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
245 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
251 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
255 const uint32_t size_tc_limit =
257 const uint32_t size_ts_limit =
260 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
261 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
267 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
272 size_ts > size_ts_limit && size_tc == 0) {
278 size_tc > size_tc_limit && size_ts == 0) {
286 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
296 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
306 DisableAppLayer(
tv, f, p);
314 if (stream == &ssn->
client) {
315 opposing_stream = &ssn->
server;
317 opposing_stream = &ssn->
client;
323 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
331 opposing_stream, p, dir);
347 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
349 if (
flags & STREAM_TOSERVER) {
357 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
360 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
361 flags & STREAM_TOCLIENT ?
"toclient" :
"",
362 flags & STREAM_TOSERVER ?
"toserver" :
"");
364 printf(
"=> Init Stream Data -- end\n");
368 bool reverse_flow =
false;
373 IPPROTO_TCP,
flags, &reverse_flow);
375 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
378 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
384 f->
alproto = *alproto_otherdir;
388 if (
flags & STREAM_TOCLIENT)
391 f->
alproto = *alproto_otherdir;
400 FlagPacketFlow(p, f,
flags);
410 SCLogDebug(
"reversing flow after proto detect told us so");
414 if (*stream == &ssn->
client) {
419 direction = 1 - direction;
427 AppLayerIncFlowCounter(
tv, f);
440 SCLogDebug(
"protocol %s needs first data in other direction",
443 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
444 p, ssn, *stream) != 0)
476 uint8_t first_data_dir;
491 if (first_data_dir && !(first_data_dir &
flags)) {
507 flags, data, data_len);
516 if (*stream == &ssn->
client) {
517 opposing_stream = &ssn->
server;
519 opposing_stream = &ssn->
client;
523 AppLayerIncFlowCounter(
tv, f);
551 DisableAppLayer(
tv, f, p);
557 uint8_t first_data_dir;
576 (first_data_dir) && !(first_data_dir &
flags))
607 *alproto = *alproto_otherdir;
608 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
609 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
616 AppLayerIncFlowCounter(
tv, f);
617 FlagPacketFlow(p, f,
flags);
619 }
else if (
flags & STREAM_EOF) {
622 AppLayerIncFlowCounter(
tv, f);
633 DisableAppLayer(
tv, f, p);
636 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
645 DisableAppLayer(
tv, f, p);
672 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
676 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
678 if (
flags & STREAM_TOSERVER) {
686 if (
flags & STREAM_GAP) {
689 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
694 AppLayerIncFlowCounter(
tv, f);
698 SCLogDebug(
"Cannot handle gap while changing protocol");
703 flags, data, data_len);
723 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, dir) !=
729 void *alstate_orig = f->
alstate;
737 TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, dir);
748 if (alstate_orig == f->
alstate) {
772 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
773 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
776 printf(
"=> Stream Data (app layer) -- start %s%s\n",
777 flags & STREAM_TOCLIENT ?
"toclient" :
"",
778 flags & STREAM_TOSERVER ?
"toserver" :
"");
780 printf(
"=> Stream Data -- end\n");
788 flags, data, data_len);
834 flags |= STREAM_TOSERVER;
838 flags |= STREAM_TOCLIENT;
843 AppLayerProfilingReset(tctx);
847 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
850 bool reverse_flow =
false;
860 f->
alproto = *alproto_otherdir;
862 *alproto = *alproto_otherdir;
874 f->
alproto = *alproto_otherdir;
883 if (*alproto_otherdir != *alproto) {
899 AppLayerIncFlowCounter(
tv, f);
905 SCLogDebug(
"reversing flow after proto detect told us so");
920 FlagPacketFlow(p, f, STREAM_TOSERVER);
921 FlagPacketFlow(p, f, STREAM_TOCLIENT);
923 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
967 printf(
"=========Supported App Layer Protocols=========\n");
968 for (alproto = 0; alproto <
ALPROTO_MAX; alproto++) {
969 if (alprotos[alproto] == 1)
1010 if (app_tctx == NULL)
1030 if (app_tctx == NULL)
1065 #define IPPROTOS_MAX 2
1068 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1070 const char *
str =
"app_layer.flow.";
1071 const char *estr =
"app_layer.error.";
1076 const uint8_t ipproto = ipprotos[p];
1078 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1079 uint8_t ipprotos_all[256 / 8];
1082 if (alprotos[alproto] == 1) {
1083 const char *tx_str =
"app_layer.tx.";
1086 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1088 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1089 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1092 "%s%s%s",
str, alproto_str, ipproto_suffix);
1095 "%s%s%s", tx_str, alproto_str, ipproto_suffix);
1097 if (ipproto == IPPROTO_TCP) {
1100 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1104 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1107 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1110 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1114 "%s%s",
str, alproto_str);
1117 "%s%s", tx_str, alproto_str);
1119 if (ipproto == IPPROTO_TCP) {
1122 "%s%s.gap", estr, alproto_str);
1126 "%s%s.alloc", estr, alproto_str);
1129 "%s%s.parser", estr, alproto_str);
1132 "%s%s.internal", estr, alproto_str);
1137 "%s%s%s",
str,
"failed", ipproto_suffix);
1138 if (ipproto == IPPROTO_TCP) {
1141 "%sfailed%s.gap", estr, ipproto_suffix);
1150 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1155 const uint8_t ipproto = ipprotos[p];
1159 if (alprotos[alproto] == 1) {
1166 if (ipproto == IPPROTO_TCP) {
1180 if (ipproto == IPPROTO_TCP) {
1203 #define TEST_START \
1204 Packet *p = PacketGetFromAlloc(); \
1208 StreamTcpThread *stt = NULL; \
1210 PacketQueueNoLock pq; \
1211 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1212 memset(&f, 0, sizeof(Flow)); \
1213 memset(&tv, 0, sizeof(ThreadVars)); \
1214 memset(&tcph, 0, sizeof(TCPHdr)); \
1216 FLOW_INITIALIZE(&f); \
1217 f.flags = FLOW_IPV4; \
1218 f.proto = IPPROTO_TCP; \
1222 StreamTcpInitConfig(true); \
1223 IPPairInitConfig(true); \
1224 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1227 tcph.th_win = htons(5480); \
1228 tcph.th_flags = TH_SYN; \
1229 p->flowflags = FLOW_PKT_TOSERVER; \
1230 p->payload_len = 0; \
1231 p->payload = NULL; \
1232 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1233 TcpSession *ssn = (TcpSession *)f.protoctx; \
1235 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1236 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1237 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1238 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1239 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1240 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1241 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1242 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1243 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1244 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1245 FAIL_IF(ssn->data_first_seen_dir != 0); \
1248 p->tcph->th_ack = htonl(1); \
1249 p->tcph->th_flags = TH_SYN | TH_ACK; \
1250 p->flowflags = FLOW_PKT_TOCLIENT; \
1251 p->payload_len = 0; \
1252 p->payload = NULL; \
1253 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1254 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1255 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1256 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1257 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1258 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1259 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1260 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1261 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1262 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1263 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1264 FAIL_IF(ssn->data_first_seen_dir != 0); \
1267 p->tcph->th_ack = htonl(1); \
1268 p->tcph->th_seq = htonl(1); \
1269 p->tcph->th_flags = TH_ACK; \
1270 p->flowflags = FLOW_PKT_TOSERVER; \
1271 p->payload_len = 0; \
1272 p->payload = NULL; \
1273 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1274 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1275 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1276 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1277 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1278 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1279 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1280 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1281 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1282 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1283 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1284 FAIL_IF(ssn->data_first_seen_dir != 0);
1286 StreamTcpSessionClear(p->flow->protoctx); \
1287 StreamTcpThreadDeinit(&tv, (void *)stt); \
1288 StreamTcpFreeConfig(true); \
1291 StatsThreadCleanup(&tv);
1296 static int AppLayerTest01(
void)
1301 uint8_t request[] = {
1302 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1303 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1304 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1305 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1306 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1307 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1308 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1309 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1310 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1311 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1312 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1313 p->
tcph->th_ack = htonl(1);
1314 p->
tcph->th_seq = htonl(1);
1333 uint8_t response[] = {
1334 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1335 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1336 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1337 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1338 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1339 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1340 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1341 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1342 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1343 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1344 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1345 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1346 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1347 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1348 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1349 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1350 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1351 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1352 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1353 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1354 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1355 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1356 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1357 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1358 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1359 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1360 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1361 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1362 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1363 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1364 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1365 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1366 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1367 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1368 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1369 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1370 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1371 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1372 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1373 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1374 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1375 p->
tcph->th_ack = htonl(88);
1376 p->
tcph->th_seq = htonl(1);
1395 p->
tcph->th_ack = htonl(328);
1396 p->
tcph->th_seq = htonl(88);
1421 static int AppLayerTest02(
void)
1426 uint8_t request1[] = { 0x47, 0x45, };
1427 p->
tcph->th_ack = htonl(1);
1428 p->
tcph->th_seq = htonl(1);
1447 p->
tcph->th_ack = htonl(3);
1448 p->
tcph->th_seq = htonl(1);
1467 uint8_t request2[] = {
1468 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1469 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1470 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1471 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1472 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1473 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1474 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1475 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1476 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1477 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1478 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1479 p->
tcph->th_ack = htonl(1);
1480 p->
tcph->th_seq = htonl(3);
1499 uint8_t response[] = {
1500 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1501 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1502 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1503 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1504 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1505 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1506 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1507 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1508 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1509 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1510 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1511 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1512 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1513 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1514 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1515 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1516 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1517 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1518 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1519 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1520 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1521 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1522 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1523 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1524 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1525 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1526 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1527 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1528 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1529 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1530 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1531 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1532 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1533 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1534 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1535 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1536 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1537 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1538 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1539 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1540 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1541 p->
tcph->th_ack = htonl(88);
1542 p->
tcph->th_seq = htonl(1);
1561 p->
tcph->th_ack = htonl(328);
1562 p->
tcph->th_seq = htonl(88);
1587 static int AppLayerTest03(
void)
1592 uint8_t request[] = {
1593 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1594 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1595 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1596 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1597 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1598 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1599 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1600 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1601 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1602 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1603 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1604 p->
tcph->th_ack = htonl(1);
1605 p->
tcph->th_seq = htonl(1);
1624 uint8_t response[] = {
1625 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1626 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1627 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1628 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1629 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1630 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1631 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1632 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1633 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1634 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1635 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1636 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1637 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1638 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1639 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1640 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1641 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1642 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1643 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1644 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1645 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1646 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1647 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1648 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1649 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1650 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1651 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1652 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1653 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1654 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1655 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1656 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1657 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1658 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1659 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1660 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1661 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1662 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1663 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1664 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1665 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1666 p->
tcph->th_ack = htonl(88);
1667 p->
tcph->th_seq = htonl(1);
1686 p->
tcph->th_ack = htonl(328);
1687 p->
tcph->th_seq = htonl(88);
1712 static int AppLayerTest04(
void)
1717 uint8_t request[] = {
1718 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1719 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1720 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1721 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1722 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1723 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1724 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1725 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1726 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1727 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1728 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1730 p->
tcph->th_ack = htonl(1);
1731 p->
tcph->th_seq = htonl(1);
1750 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1752 p->
tcph->th_ack = htonl(88);
1753 p->
tcph->th_seq = htonl(1);
1772 p->
tcph->th_ack = htonl(5);
1773 p->
tcph->th_seq = htonl(88);
1792 uint8_t response2[] = {
1793 0x2f, 0x31, 0x2e, 0x31,
1794 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1795 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1796 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1797 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1798 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1799 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1800 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1801 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1802 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1803 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1804 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1805 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1806 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1807 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1808 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1809 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1810 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1811 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1812 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1813 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1814 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1815 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1816 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1817 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1818 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1819 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1820 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1821 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1822 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1823 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1824 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1825 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1826 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1827 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1828 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1829 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1830 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1831 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1832 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1833 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1835 p->
tcph->th_ack = htonl(88);
1836 p->
tcph->th_seq = htonl(5);
1855 p->
tcph->th_ack = htonl(328);
1856 p->
tcph->th_seq = htonl(88);
1881 static int AppLayerTest05(
void)
1886 uint8_t request[] = {
1887 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1888 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1889 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1890 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1891 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1892 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1893 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1894 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1895 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1896 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1897 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1899 p->
tcph->th_ack = htonl(1);
1900 p->
tcph->th_seq = htonl(1);
1919 uint8_t response[] = {
1920 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1921 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1922 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1923 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1924 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1925 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1926 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1927 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1928 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1929 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1930 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1931 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1932 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1933 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1934 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1935 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1936 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1937 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1938 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1939 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1940 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1941 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1942 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1943 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1944 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1945 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1946 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1947 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1948 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1949 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1950 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1951 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1952 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1953 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1954 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1955 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1956 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1957 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1958 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1959 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1960 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1962 p->
tcph->th_ack = htonl(88);
1963 p->
tcph->th_seq = htonl(1);
1982 p->
tcph->th_ack = htonl(328);
1983 p->
tcph->th_seq = htonl(88);
2008 static int AppLayerTest06(
void)
2013 uint8_t response[] = {
2014 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2015 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2016 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2017 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2018 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2019 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2020 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2021 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2022 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2023 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2024 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2025 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2026 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2027 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2028 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2029 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2030 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2031 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2032 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2033 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2034 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2035 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2036 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2037 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2038 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2039 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2040 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2041 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2042 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2043 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2044 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2045 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2046 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2047 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2048 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2049 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2050 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2051 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2052 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2053 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2054 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2055 p->
tcph->th_ack = htonl(1);
2056 p->
tcph->th_seq = htonl(1);
2075 uint8_t request[] = {
2076 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2077 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2078 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2079 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2080 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2081 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2082 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2083 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2084 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2085 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2086 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2087 p->
tcph->th_ack = htonl(328);
2088 p->
tcph->th_seq = htonl(1);
2106 p->
tcph->th_ack = htonl(1 +
sizeof(request));
2107 p->
tcph->th_seq = htonl(328);
2132 static int AppLayerTest07(
void)
2137 uint8_t request[] = {
2138 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2139 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2140 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2141 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2142 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2143 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2144 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2145 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2146 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2147 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2148 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2149 p->
tcph->th_ack = htonl(1);
2150 p->
tcph->th_seq = htonl(1);
2169 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2170 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2171 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2172 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2173 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2174 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2175 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2176 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2177 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2178 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2179 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2180 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2181 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2182 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2183 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2184 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2185 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2186 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2187 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2188 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2189 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2190 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2191 p->
tcph->th_ack = htonl(88);
2192 p->
tcph->th_seq = htonl(1);
2211 p->
tcph->th_ack = htonl(328);
2212 p->
tcph->th_seq = htonl(88);
2237 static int AppLayerTest08(
void)
2242 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2243 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2244 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2245 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2246 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2247 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2248 p->
tcph->th_ack = htonl(1);
2249 p->
tcph->th_seq = htonl(1);
2268 uint8_t response[] = {
2269 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2270 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2271 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2272 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2273 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2274 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2275 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2276 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2277 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2278 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2279 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2280 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2281 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2282 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2283 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2284 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2285 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2286 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2287 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2288 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2289 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2290 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2291 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2292 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2293 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2294 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2295 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2296 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2297 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2298 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2299 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2300 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2301 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2302 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2303 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2304 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2305 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2306 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2307 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2308 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2309 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2310 p->
tcph->th_ack = htonl(88);
2311 p->
tcph->th_seq = htonl(1);
2330 p->
tcph->th_ack = htonl(328);
2331 p->
tcph->th_seq = htonl(88);
2358 static int AppLayerTest09(
void)
2363 uint8_t request1[] = {
2364 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2365 p->
tcph->th_ack = htonl(1);
2366 p->
tcph->th_seq = htonl(1);
2385 p->
tcph->th_ack = htonl(9);
2386 p->
tcph->th_seq = htonl(1);
2405 uint8_t request2[] = {
2406 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2407 p->
tcph->th_ack = htonl(1);
2408 p->
tcph->th_seq = htonl(9);
2427 uint8_t response[] = {
2428 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2429 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2430 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2431 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2432 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2433 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2434 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2435 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2436 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2437 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2438 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2439 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2440 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2441 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2442 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2443 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2444 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2445 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2446 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2447 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2448 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2449 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2450 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2451 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2452 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2453 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2454 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2455 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2456 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2457 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2458 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2459 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2460 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2461 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2462 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2463 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2464 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2465 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2466 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2467 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2468 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2469 p->
tcph->th_ack = htonl(18);
2470 p->
tcph->th_seq = htonl(1);
2489 p->
tcph->th_ack = htonl(328);
2490 p->
tcph->th_seq = htonl(18);
2516 static int AppLayerTest10(
void)
2521 uint8_t request1[] = {
2522 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2523 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2524 p->
tcph->th_ack = htonl(1);
2525 p->
tcph->th_seq = htonl(1);
2544 p->
tcph->th_ack = htonl(18);
2545 p->
tcph->th_seq = htonl(1);
2564 uint8_t response[] = {
2565 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2566 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2567 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2568 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2569 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2570 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2571 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2572 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2573 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2574 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2575 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2576 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2577 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2578 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2579 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2580 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2581 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2582 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2583 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2584 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2585 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2586 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2587 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2588 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2589 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2590 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2591 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2592 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2593 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2594 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2595 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2596 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2597 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2598 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2599 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2600 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2601 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2602 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2603 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2604 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2605 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2606 p->
tcph->th_ack = htonl(18);
2607 p->
tcph->th_seq = htonl(1);
2626 p->
tcph->th_ack = htonl(328);
2627 p->
tcph->th_seq = htonl(18);
2654 static int AppLayerTest11(
void)
2659 uint8_t request1[] = {
2660 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2661 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2662 p->
tcph->th_ack = htonl(1);
2663 p->
tcph->th_seq = htonl(1);
2682 p->
tcph->th_ack = htonl(18);
2683 p->
tcph->th_seq = htonl(1);
2702 uint8_t response1[] = {
2703 0x55, 0x74, 0x54, 0x50, };
2704 p->
tcph->th_ack = htonl(18);
2705 p->
tcph->th_seq = htonl(1);
2724 p->
tcph->th_ack = htonl(5);
2725 p->
tcph->th_seq = htonl(18);
2743 uint8_t response2[] = {
2744 0x2f, 0x31, 0x2e, 0x31,
2745 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2746 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2747 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2748 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2749 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2750 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2751 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2752 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2753 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2754 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2755 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2756 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2757 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2758 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2759 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2760 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2761 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2762 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2763 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2764 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2765 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2766 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2767 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2768 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2769 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2770 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2771 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2772 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2773 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2774 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2775 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2776 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2777 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2778 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2779 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2780 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2781 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2782 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2783 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2784 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2785 p->
tcph->th_ack = htonl(18);
2786 p->
tcph->th_seq = htonl(5);
2805 p->
tcph->th_ack = htonl(328);
2806 p->
tcph->th_seq = htonl(18);