74 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
76 #define MAX_COUNTER_SIZE 64
105 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
172 if (
flags & STREAM_TOSERVER) {
188 if (
flags & STREAM_TOSERVER) {
198 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
205 AppLayerIncFlowCounter(
tv, f);
211 FlagPacketFlow(p, f, STREAM_TOCLIENT);
217 FlagPacketFlow(p, f, STREAM_TOSERVER);
219 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
242 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
246 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
252 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
256 const uint32_t size_tc_limit =
258 const uint32_t size_ts_limit =
261 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
262 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
268 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
273 size_ts > size_ts_limit && size_tc == 0) {
279 size_tc > size_tc_limit && size_ts == 0) {
287 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
297 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
307 DisableAppLayer(
tv, f, p);
315 if (stream == &ssn->
client) {
316 opposing_stream = &ssn->
server;
318 opposing_stream = &ssn->
client;
324 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
332 opposing_stream, p, dir);
343 uint8_t *data, uint32_t data_len, uint8_t
flags)
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);
408 SCLogDebug(
"reversing flow after proto detect told us so");
412 if (*stream == &ssn->
client) {
417 direction = 1 - direction;
425 AppLayerIncFlowCounter(
tv, f);
438 SCLogDebug(
"protocol %s needs first data in other direction",
441 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
442 p, ssn, *stream) != 0)
444 DisableAppLayer(
tv, f, p);
475 uint8_t first_data_dir;
481 DisableAppLayer(
tv, f, p);
491 if (first_data_dir && !(first_data_dir &
flags)) {
507 flags, data, data_len);
536 DisableAppLayer(
tv, f, p);
542 uint8_t first_data_dir;
561 (first_data_dir) && !(first_data_dir &
flags))
563 DisableAppLayer(
tv, f, p);
592 *alproto = *alproto_otherdir;
593 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
594 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
601 AppLayerIncFlowCounter(
tv, f);
602 FlagPacketFlow(p, f,
flags);
614 DisableAppLayer(
tv, f, p);
617 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
635 uint8_t *data, uint32_t data_len,
649 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
653 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
655 if (
flags & STREAM_TOSERVER) {
663 if (
flags & STREAM_GAP) {
666 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
674 SCLogDebug(
"Cannot handle gap while changing protocol");
679 flags, data, data_len);
694 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream,
695 data, data_len,
flags) != 0) {
700 void *alstate_orig = f->
alstate;
707 int rd = TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags);
718 if (alstate_orig == f->
alstate) {
743 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
744 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
747 printf(
"=> Stream Data (app layer) -- start %s%s\n",
748 flags & STREAM_TOCLIENT ?
"toclient" :
"",
749 flags & STREAM_TOSERVER ?
"toserver" :
"");
751 printf(
"=> Stream Data -- end\n");
759 flags, data, data_len);
799 flags |= STREAM_TOSERVER;
803 flags |= STREAM_TOCLIENT;
808 AppLayerProfilingReset(tctx);
812 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
815 bool reverse_flow =
false;
825 f->
alproto = *alproto_otherdir;
827 *alproto = *alproto_otherdir;
839 f->
alproto = *alproto_otherdir;
848 if (*alproto_otherdir != *alproto) {
864 AppLayerIncFlowCounter(
tv, f);
870 SCLogDebug(
"reversing flow after proto detect told us so");
884 FlagPacketFlow(p, f, STREAM_TOSERVER);
885 FlagPacketFlow(p, f, STREAM_TOCLIENT);
887 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
926 printf(
"=========Supported App Layer Protocols=========\n");
927 for (alproto = 0; alproto <
ALPROTO_MAX; alproto++) {
928 if (alprotos[alproto] == 1)
969 if (app_tctx == NULL)
971 memset(app_tctx, 0,
sizeof(*app_tctx));
990 if (app_tctx == NULL)
1025 #define IPPROTOS_MAX 2
1028 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1030 const char *
str =
"app_layer.flow.";
1031 const char *estr =
"app_layer.error.";
1036 const uint8_t ipproto = ipprotos[p];
1038 const uint8_t other_ipproto = ipproto == IPPROTO_TCP ? IPPROTO_UDP : IPPROTO_TCP;
1039 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1042 if (alprotos[alproto] == 1) {
1043 const char *tx_str =
"app_layer.tx.";
1050 "%s%s%s",
str, alproto_str, ipproto_suffix);
1053 "%s%s%s", tx_str, alproto_str, ipproto_suffix);
1055 if (ipproto == IPPROTO_TCP) {
1058 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1062 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1065 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1068 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1072 "%s%s",
str, alproto_str);
1075 "%s%s", tx_str, alproto_str);
1077 if (ipproto == IPPROTO_TCP) {
1080 "%s%s.gap", estr, alproto_str);
1084 "%s%s.alloc", estr, alproto_str);
1087 "%s%s.parser", estr, alproto_str);
1090 "%s%s.internal", estr, alproto_str);
1095 "%s%s%s",
str,
"failed", ipproto_suffix);
1096 if (ipproto == IPPROTO_TCP) {
1099 "%sfailed%s.gap", estr, ipproto_suffix);
1108 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1113 const uint8_t ipproto = ipprotos[p];
1117 if (alprotos[alproto] == 1) {
1124 if (ipproto == IPPROTO_TCP) {
1138 if (ipproto == IPPROTO_TCP) {
1162 #define TEST_START \
1163 Packet *p = PacketGetFromAlloc(); \
1167 StreamTcpThread *stt = NULL; \
1169 PacketQueueNoLock pq; \
1170 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1171 memset(p, 0, SIZE_OF_PACKET); \
1172 memset(&f, 0, sizeof(Flow)); \
1173 memset(&tv, 0, sizeof(ThreadVars)); \
1174 memset(&tcph, 0, sizeof(TCPHdr)); \
1176 FLOW_INITIALIZE(&f); \
1177 f.flags = FLOW_IPV4; \
1178 f.proto = IPPROTO_TCP; \
1182 StreamTcpInitConfig(true); \
1183 IPPairInitConfig(true); \
1184 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1187 tcph.th_win = htons(5480); \
1188 tcph.th_flags = TH_SYN; \
1189 p->flowflags = FLOW_PKT_TOSERVER; \
1190 p->payload_len = 0; \
1191 p->payload = NULL; \
1192 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1193 TcpSession *ssn = (TcpSession *)f.protoctx; \
1195 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1196 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1197 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1198 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1199 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1200 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1201 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1202 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1203 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1204 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1205 FAIL_IF(ssn->data_first_seen_dir != 0); \
1208 p->tcph->th_ack = htonl(1); \
1209 p->tcph->th_flags = TH_SYN | TH_ACK; \
1210 p->flowflags = FLOW_PKT_TOCLIENT; \
1211 p->payload_len = 0; \
1212 p->payload = NULL; \
1213 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1214 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1215 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1216 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1217 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1218 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1219 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1220 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1221 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1222 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1223 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1224 FAIL_IF(ssn->data_first_seen_dir != 0); \
1227 p->tcph->th_ack = htonl(1); \
1228 p->tcph->th_seq = htonl(1); \
1229 p->tcph->th_flags = TH_ACK; \
1230 p->flowflags = FLOW_PKT_TOSERVER; \
1231 p->payload_len = 0; \
1232 p->payload = NULL; \
1233 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1234 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1235 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1236 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1237 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1238 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1239 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1240 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1241 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1242 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1243 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1244 FAIL_IF(ssn->data_first_seen_dir != 0);
1246 StreamTcpSessionClear(p->flow->protoctx); \
1247 StreamTcpThreadDeinit(&tv, (void *)stt); \
1248 StreamTcpFreeConfig(true); \
1251 StatsThreadCleanup(&tv);
1256 static int AppLayerTest01(
void)
1261 uint8_t request[] = {
1262 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1263 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1264 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1265 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1266 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1267 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1268 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1269 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1270 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1271 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1272 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1273 p->
tcph->th_ack = htonl(1);
1274 p->
tcph->th_seq = htonl(1);
1293 uint8_t response[] = {
1294 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1295 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1296 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1297 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1298 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1299 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1300 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1301 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1302 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1303 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1304 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1305 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1306 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1307 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1308 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1309 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1310 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1311 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1312 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1313 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1314 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1315 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1316 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1317 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1318 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1319 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1320 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1321 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1322 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1323 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1324 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1325 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1326 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1327 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1328 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1329 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1330 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1331 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1332 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1333 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1334 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1335 p->
tcph->th_ack = htonl(88);
1336 p->
tcph->th_seq = htonl(1);
1355 p->
tcph->th_ack = htonl(328);
1356 p->
tcph->th_seq = htonl(88);
1381 static int AppLayerTest02(
void)
1386 uint8_t request1[] = { 0x47, 0x45, };
1387 p->
tcph->th_ack = htonl(1);
1388 p->
tcph->th_seq = htonl(1);
1407 p->
tcph->th_ack = htonl(3);
1408 p->
tcph->th_seq = htonl(1);
1427 uint8_t request2[] = {
1428 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1429 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1430 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1431 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1432 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1433 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1434 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1435 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1436 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1437 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1438 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1439 p->
tcph->th_ack = htonl(1);
1440 p->
tcph->th_seq = htonl(3);
1459 uint8_t response[] = {
1460 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1461 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1462 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1463 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1464 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1465 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1466 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1467 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1468 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1469 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1470 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1471 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1472 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1473 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1474 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1475 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1476 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1477 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1478 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1479 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1480 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1481 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1482 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1483 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1484 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1485 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1486 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1487 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1488 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1489 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1490 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1491 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1492 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1493 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1494 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1495 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1496 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1497 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1498 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1499 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1500 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1501 p->
tcph->th_ack = htonl(88);
1502 p->
tcph->th_seq = htonl(1);
1521 p->
tcph->th_ack = htonl(328);
1522 p->
tcph->th_seq = htonl(88);
1547 static int AppLayerTest03(
void)
1552 uint8_t request[] = {
1553 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1554 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1555 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1556 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1557 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1558 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1559 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1560 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1561 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1562 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1563 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1564 p->
tcph->th_ack = htonl(1);
1565 p->
tcph->th_seq = htonl(1);
1584 uint8_t response[] = {
1585 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1586 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1587 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1588 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1589 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1590 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1591 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1592 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1593 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1594 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1595 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1596 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1597 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1598 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1599 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1600 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1601 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1602 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1603 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1604 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1605 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1606 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1607 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1608 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1609 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1610 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1611 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1612 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1613 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1614 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1615 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1616 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1617 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1618 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1619 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1620 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1621 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1622 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1623 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1624 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1625 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1626 p->
tcph->th_ack = htonl(88);
1627 p->
tcph->th_seq = htonl(1);
1646 p->
tcph->th_ack = htonl(328);
1647 p->
tcph->th_seq = htonl(88);
1672 static int AppLayerTest04(
void)
1677 uint8_t request[] = {
1678 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1679 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1680 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1681 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1682 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1683 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1684 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1685 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1686 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1687 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1688 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1690 p->
tcph->th_ack = htonl(1);
1691 p->
tcph->th_seq = htonl(1);
1710 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1712 p->
tcph->th_ack = htonl(88);
1713 p->
tcph->th_seq = htonl(1);
1732 p->
tcph->th_ack = htonl(5);
1733 p->
tcph->th_seq = htonl(88);
1752 uint8_t response2[] = {
1753 0x2f, 0x31, 0x2e, 0x31,
1754 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1755 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1756 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1757 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1758 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1759 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1760 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1761 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1762 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1763 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1764 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1765 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1766 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1767 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1768 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1769 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1770 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1771 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1772 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1773 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1774 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1775 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1776 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1777 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1778 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1779 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1780 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1781 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1782 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1783 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1784 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1785 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1786 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1787 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1788 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1789 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1790 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1791 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1792 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1793 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1795 p->
tcph->th_ack = htonl(88);
1796 p->
tcph->th_seq = htonl(5);
1815 p->
tcph->th_ack = htonl(328);
1816 p->
tcph->th_seq = htonl(88);
1841 static int AppLayerTest05(
void)
1846 uint8_t request[] = {
1847 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1848 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1849 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1850 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1851 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1852 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1853 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1854 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1855 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1856 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1857 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1859 p->
tcph->th_ack = htonl(1);
1860 p->
tcph->th_seq = htonl(1);
1879 uint8_t response[] = {
1880 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1881 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1882 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1883 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1884 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1885 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1886 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1887 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1888 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1889 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1890 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1891 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1892 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1893 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1894 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1895 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1896 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1897 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1898 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1899 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1900 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1901 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1902 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1903 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1904 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1905 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1906 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1907 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1908 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1909 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1910 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1911 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1912 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1913 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1914 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1915 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1916 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1917 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1918 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1919 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1920 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1922 p->
tcph->th_ack = htonl(88);
1923 p->
tcph->th_seq = htonl(1);
1942 p->
tcph->th_ack = htonl(328);
1943 p->
tcph->th_seq = htonl(88);
1968 static int AppLayerTest06(
void)
1973 uint8_t response[] = {
1974 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1975 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1976 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1977 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1978 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1979 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1980 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1981 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1982 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1983 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1984 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1985 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1986 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1987 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1988 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1989 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1990 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1991 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1992 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1993 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1994 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1995 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1996 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1997 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1998 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1999 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2000 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2001 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2002 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2003 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2004 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2005 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2006 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2007 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2008 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2009 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2010 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2011 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2012 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2013 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2014 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2015 p->
tcph->th_ack = htonl(1);
2016 p->
tcph->th_seq = htonl(1);
2035 uint8_t request[] = {
2036 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2037 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2038 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2039 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2040 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2041 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2042 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2043 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2044 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2045 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2046 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2047 p->
tcph->th_ack = htonl(328);
2048 p->
tcph->th_seq = htonl(1);
2066 p->
tcph->th_ack = htonl(1 +
sizeof(request));
2067 p->
tcph->th_seq = htonl(328);
2092 static int AppLayerTest07(
void)
2097 uint8_t request[] = {
2098 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2099 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2100 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2101 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2102 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2103 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2104 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2105 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2106 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2107 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2108 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2109 p->
tcph->th_ack = htonl(1);
2110 p->
tcph->th_seq = htonl(1);
2129 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2130 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2131 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2132 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2133 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2134 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2135 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2136 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2137 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2138 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2139 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2140 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2141 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2142 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2143 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2144 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2145 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2146 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2147 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2148 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2149 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2150 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2151 p->
tcph->th_ack = htonl(88);
2152 p->
tcph->th_seq = htonl(1);
2171 p->
tcph->th_ack = htonl(328);
2172 p->
tcph->th_seq = htonl(88);
2197 static int AppLayerTest08(
void)
2202 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2203 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2204 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2205 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2206 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2207 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2208 p->
tcph->th_ack = htonl(1);
2209 p->
tcph->th_seq = htonl(1);
2228 uint8_t response[] = {
2229 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2230 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2231 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2232 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2233 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2234 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2235 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2236 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2237 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2238 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2239 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2240 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2241 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2242 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2243 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2244 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2245 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2246 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2247 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2248 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2249 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2250 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2251 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2252 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2253 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2254 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2255 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2256 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2257 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2258 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2259 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2260 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2261 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2262 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2263 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2264 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2265 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2266 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2267 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2268 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2269 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2270 p->
tcph->th_ack = htonl(88);
2271 p->
tcph->th_seq = htonl(1);
2290 p->
tcph->th_ack = htonl(328);
2291 p->
tcph->th_seq = htonl(88);
2318 static int AppLayerTest09(
void)
2323 uint8_t request1[] = {
2324 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2325 p->
tcph->th_ack = htonl(1);
2326 p->
tcph->th_seq = htonl(1);
2345 p->
tcph->th_ack = htonl(9);
2346 p->
tcph->th_seq = htonl(1);
2365 uint8_t request2[] = {
2366 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2367 p->
tcph->th_ack = htonl(1);
2368 p->
tcph->th_seq = htonl(9);
2387 uint8_t response[] = {
2388 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2389 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2390 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2391 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2392 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2393 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2394 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2395 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2396 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2397 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2398 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2399 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2400 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2401 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2402 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2403 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2404 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2405 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2406 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2407 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2408 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2409 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2410 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2411 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2412 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2413 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2414 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2415 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2416 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2417 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2418 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2419 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2420 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2421 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2422 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2423 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2424 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2425 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2426 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2427 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2428 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2429 p->
tcph->th_ack = htonl(18);
2430 p->
tcph->th_seq = htonl(1);
2449 p->
tcph->th_ack = htonl(328);
2450 p->
tcph->th_seq = htonl(18);
2476 static int AppLayerTest10(
void)
2481 uint8_t request1[] = {
2482 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2483 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2484 p->
tcph->th_ack = htonl(1);
2485 p->
tcph->th_seq = htonl(1);
2504 p->
tcph->th_ack = htonl(18);
2505 p->
tcph->th_seq = htonl(1);
2524 uint8_t response[] = {
2525 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2526 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2527 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2528 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2529 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2530 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2531 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2532 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2533 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2534 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2535 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2536 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2537 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2538 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2539 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2540 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2541 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2542 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2543 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2544 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2545 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2546 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2547 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2548 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2549 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2550 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2551 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2552 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2553 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2554 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2555 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2556 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2557 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2558 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2559 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2560 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2561 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2562 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2563 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2564 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2565 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2566 p->
tcph->th_ack = htonl(18);
2567 p->
tcph->th_seq = htonl(1);
2586 p->
tcph->th_ack = htonl(328);
2587 p->
tcph->th_seq = htonl(18);
2614 static int AppLayerTest11(
void)
2619 uint8_t request1[] = {
2620 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2621 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2622 p->
tcph->th_ack = htonl(1);
2623 p->
tcph->th_seq = htonl(1);
2642 p->
tcph->th_ack = htonl(18);
2643 p->
tcph->th_seq = htonl(1);
2662 uint8_t response1[] = {
2663 0x55, 0x74, 0x54, 0x50, };
2664 p->
tcph->th_ack = htonl(18);
2665 p->
tcph->th_seq = htonl(1);
2684 p->
tcph->th_ack = htonl(5);
2685 p->
tcph->th_seq = htonl(18);
2703 uint8_t response2[] = {
2704 0x2f, 0x31, 0x2e, 0x31,
2705 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2706 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2707 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2708 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2709 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2710 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2711 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2712 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2713 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2714 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2715 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2716 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2717 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2718 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2719 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2720 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2721 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2722 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2723 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2724 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2725 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2726 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2727 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2728 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2729 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2730 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2731 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2732 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2733 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2734 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2735 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2736 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2737 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2738 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2739 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2740 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2741 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2742 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2743 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2744 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2745 p->
tcph->th_ack = htonl(18);
2746 p->
tcph->th_seq = htonl(5);
2765 p->
tcph->th_ack = htonl(328);
2766 p->
tcph->th_seq = htonl(18);