diff options
| author | liuwentan <[email protected]> | 2024-01-04 18:41:09 +0800 |
|---|---|---|
| committer | liuwentan <[email protected]> | 2024-01-04 18:41:09 +0800 |
| commit | 643cb8e408f8f026237df156f0242b8e2f85c266 (patch) | |
| tree | ec374828ed990cdaac2814482e05d320a493bcc3 | |
| parent | 9c7e56f9e244328ce7fc99409ec0b866a0b3da99 (diff) | |
[HTTP_DECODER]bugfix for http proxy
15 files changed, 704 insertions, 100 deletions
diff --git a/src/http_decoder/http_decoder_half.c b/src/http_decoder/http_decoder_half.c index b95486a..2128025 100644 --- a/src/http_decoder/http_decoder_half.c +++ b/src/http_decoder/http_decoder_half.c @@ -614,6 +614,7 @@ int http_decoder_half_parse(struct http_decoder_half *half, void *http_ev_ctx, switch (half->error) { case HPE_OK: case HPE_PAUSED_UPGRADE: + llhttp_resume_after_upgrade(&half->parser); ret = 0; break; default: @@ -622,7 +623,7 @@ int http_decoder_half_parse(struct http_decoder_half *half, void *http_ev_ctx, } if (ret < 0) { - printf("llhttp_execute parse error: %s %s\n", + fprintf(stderr, "llhttp_execute parse error: %s %s\n", llhttp_errno_name(half->error), half->parser.reason); return -1; } diff --git a/test/http_decoder/CMakeLists.txt b/test/http_decoder/CMakeLists.txt index 1a388ed..453b4e6 100644 --- a/test/http_decoder/CMakeLists.txt +++ b/test/http_decoder/CMakeLists.txt @@ -76,20 +76,17 @@ add_test(NAME HTTP_REQ_1BYTE_SLIDING_WINDOW_TEST COMMAND ${TEST_MAIN} ${CMAKE_CU add_test(NAME HTTP_RES_1BYTE_SLIDING_WINDOW_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_res_1byte_sliding_window.json -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_res_1byte_sliding_window.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) -add_test(NAME HTTP_BASIC_AUTH_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_basic_auth.json - -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_basic_auth.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) +add_test(NAME HTTP_NO_CONTENT_LENGTH_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_no_content_length.json + -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_no_content_length.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) -add_test(NAME HTTP_NO_LENGTH_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_no_length.json - -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_no_length.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) +add_test(NAME HTTP_POST_MULTIPART_FORM_DATA_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_post_multipart_form_data.json + -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_post_multipart_form_data.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) -add_test(NAME HTTP_POST_FORM_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_post_form.json - -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_post_form.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) +add_test(NAME HTTP_HEADERS_EXCEED_MAXIMUM_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_headers_exceed_maximum.json + -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_headers_exceed_maximum.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) -add_test(NAME HTTP_TCP_SEQ_ISSUE_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_tcp_seq_issue.json - -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_tcp_seq_issue.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) - -add_test(NAME HTTP_WRAPPED_HEADER_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_wrapped_header.json - -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_wrapped_header.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) +add_test(NAME HTTP_CONNECT_FLOOD_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_connect_flood.json + -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_connect_flood.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) set_tests_properties(HTTP_GET_SINGLE_TRANS_TEST HTTP_GET_MULTI_TRANS_TEST @@ -105,9 +102,8 @@ set_tests_properties(HTTP_GET_SINGLE_TRANS_TEST NON_HTTP_TEST HTTP_REQ_1BYTE_SLIDING_WINDOW_TEST HTTP_RES_1BYTE_SLIDING_WINDOW_TEST - HTTP_BASIC_AUTH_TEST - HTTP_NO_LENGTH_TEST - HTTP_POST_FORM_TEST - HTTP_TCP_SEQ_ISSUE_TEST - HTTP_WRAPPED_HEADER_TEST + HTTP_NO_CONTENT_LENGTH_TEST + HTTP_POST_MULTIPART_FORM_DATA_TEST + HTTP_HEADERS_EXCEED_MAXIMUM_TEST + HTTP_CONNECT_FLOOD_TEST PROPERTIES FIXTURES_REQUIRED TestFixture)
\ No newline at end of file diff --git a/test/http_decoder/http_decoder_gtest.cpp b/test/http_decoder/http_decoder_gtest.cpp index 5ba7103..832c541 100644 --- a/test/http_decoder/http_decoder_gtest.cpp +++ b/test/http_decoder/http_decoder_gtest.cpp @@ -198,10 +198,10 @@ next: break; case HTTP_MESSAGE_REQ_BODY: http_message_get_request_raw_body(msg, &body); - //output_http_body(&body, 0); + // output_http_body(&body, 0); http_message_get_request_decompress_body(msg, &body); - //output_http_body(&body, 1); + // output_http_body(&body, 1); break; case HTTP_MESSAGE_RES_LINE: http_message_get_response_line(msg, &res_line); @@ -215,10 +215,10 @@ next: break; case HTTP_MESSAGE_RES_BODY: http_message_get_response_raw_body(msg, &body); - //output_http_body(&body, 0); + // output_http_body(&body, 0); http_message_get_response_decompress_body(msg, &body); - //output_http_body(&body, 1); + // output_http_body(&body, 1); break; default: break; diff --git a/test/http_decoder/http_pcap/http_basic_auth.pcap b/test/http_decoder/http_pcap/http_basic_auth.pcap Binary files differdeleted file mode 100644 index 29ee701..0000000 --- a/test/http_decoder/http_pcap/http_basic_auth.pcap +++ /dev/null diff --git a/test/http_decoder/http_pcap/http_connect_flood.pcap b/test/http_decoder/http_pcap/http_connect_flood.pcap Binary files differnew file mode 100644 index 0000000..11b7e14 --- /dev/null +++ b/test/http_decoder/http_pcap/http_connect_flood.pcap diff --git a/test/http_decoder/http_pcap/http_wrapped_header.pcap b/test/http_decoder/http_pcap/http_headers_exceed_maximum.pcap Binary files differindex 537bffa..537bffa 100644 --- a/test/http_decoder/http_pcap/http_wrapped_header.pcap +++ b/test/http_decoder/http_pcap/http_headers_exceed_maximum.pcap diff --git a/test/http_decoder/http_pcap/http_no_length.pcap b/test/http_decoder/http_pcap/http_no_content_length.pcap Binary files differindex 28e6881..28e6881 100644 --- a/test/http_decoder/http_pcap/http_no_length.pcap +++ b/test/http_decoder/http_pcap/http_no_content_length.pcap diff --git a/test/http_decoder/http_pcap/http_post_form.pcap b/test/http_decoder/http_pcap/http_post_multipart_form_data.pcap Binary files differindex 0136e05..0136e05 100644 --- a/test/http_decoder/http_pcap/http_post_form.pcap +++ b/test/http_decoder/http_pcap/http_post_multipart_form_data.pcap diff --git a/test/http_decoder/http_pcap/http_tcp_seq_issue.pcap b/test/http_decoder/http_pcap/http_tcp_seq_issue.pcap Binary files differdeleted file mode 100644 index 78c7fcd..0000000 --- a/test/http_decoder/http_pcap/http_tcp_seq_issue.pcap +++ /dev/null diff --git a/test/http_decoder/test_result_json/http_basic_auth.json b/test/http_decoder/test_result_json/http_basic_auth.json deleted file mode 100644 index 2e38ba0..0000000 --- a/test/http_decoder/test_result_json/http_basic_auth.json +++ /dev/null @@ -1,37 +0,0 @@ -[ - { - "Tuple4": "10.0.0.2.1087>10.0.0.1.2082", - "method": "GET", - "uri": "/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxx/xxxxxxxxxxxxxxxxxxxx.js", - "req_version": "1.1", - "major_version": 1, - "minor_version": 1, - "Host": "10.000.000.001:1234", - "User-Agent": "Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0", - "Accept": "*/*", - "Accept-Language": "en-GB,en;q=0.5", - "Accept-Encoding": "gzip, deflate", - "Referer": "http://10.000.000.001:1234/zzzzzzzzzzzzzzzz/zzzzzzzz/zz/zzzzzzzzz/index.html", - "Cookie": "zzzzzzzzzzzzzzzzzz=auto; cprelogin=no; cpsession=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz; langedit=; lang=", - "Authorization": "Basic dXNlcnJycnI6cGFzc3dvcmRkZGRk", - "Connection": "keep-alive", - "If-Modified-Since": "Wed, 29 Oct 2014 01:11:13 GMT", - "name": "HTTP_DECODER_RESULT_1" - }, - { - "Tuple4": "10.0.0.2.1087>10.0.0.1.2082", - "res_version": "1.1", - "res_status": "Not Modified", - "major_version": 1, - "minor_version": 1, - "status_code": 304, - "Server": "cpsrvd/11.44.1.19", - "X-Keep-Alive-Count": "1", - "Connection": "Keep-Alive", - "Keep-Alive": "timeout=70, max=200", - "Date": "Wed, 29 Oct 2014 17:35:08 GMT", - "Cache-Control": "max-age=5184000, public", - "Expires": "Sun, 28 Dec 2014 17:35:07 GMT", - "name": "HTTP_DECODER_RESULT_2" - } -]
\ No newline at end of file diff --git a/test/http_decoder/test_result_json/http_connect_flood.json b/test/http_decoder/test_result_json/http_connect_flood.json new file mode 100644 index 0000000..199c038 --- /dev/null +++ b/test/http_decoder/test_result_json/http_connect_flood.json @@ -0,0 +1,686 @@ +[ + { + "Tuple4": "10.128.0.2.18762>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_1" + }, + { + "Tuple4": "10.128.0.2.18746>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_2" + }, + { + "Tuple4": "10.128.0.2.18744>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_3" + }, + { + "Tuple4": "10.128.0.2.18748>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_4" + }, + { + "Tuple4": "10.128.0.2.18750>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_5" + }, + { + "Tuple4": "10.128.0.2.18752>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_6" + }, + { + "Tuple4": "10.128.0.2.18754>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_7" + }, + { + "Tuple4": "10.128.0.2.18756>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_8" + }, + { + "Tuple4": "10.128.0.2.18758>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_9" + }, + { + "Tuple4": "10.128.0.2.18760>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_10" + }, + { + "Tuple4": "10.128.0.2.18762>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:38 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_11" + }, + { + "Tuple4": "10.128.0.2.18768>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Safari/5.00 (Macintosh; U; en)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_12" + }, + { + "Tuple4": "10.128.0.2.18766>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_13" + }, + { + "Tuple4": "10.128.0.2.18770>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Opera/9.00 (Windows NT 5.1; U; en)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_14" + }, + { + "Tuple4": "10.128.0.2.18772>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Opera/9.00 (Windows NT 5.1; U; en)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_15" + }, + { + "Tuple4": "10.128.0.2.18776>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "GooglePocket/2.1 ( http://www.googlePocket.com/Pocket.html)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_16" + }, + { + "Tuple4": "10.128.0.2.18774>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.4.0", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_17" + }, + { + "Tuple4": "10.128.0.2.18780>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030505 Mozilla Firebird/0.6", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_18" + }, + { + "Tuple4": "10.128.0.2.18778>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "DoCoMo/2.0 SH902i (compatible; Y!J-SRD/1.0; http://help.yahoo.co.jp/help/jp/search/indexing/indexing-27.html)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_19" + }, + { + "Tuple4": "10.128.0.2.18782>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "IE/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322;)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_20" + }, + { + "Tuple4": "10.128.0.2.18784>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_21" + }, + { + "Tuple4": "10.128.0.2.18768>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_22" + }, + { + "Tuple4": "10.128.0.2.18766>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_23" + }, + { + "Tuple4": "10.128.0.2.18770>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_24" + }, + { + "Tuple4": "10.128.0.2.18772>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_25" + }, + { + "Tuple4": "10.128.0.2.18776>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_26" + }, + { + "Tuple4": "10.128.0.2.18780>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_27" + }, + { + "Tuple4": "10.128.0.2.18774>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_28" + }, + { + "Tuple4": "10.128.0.2.18778>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_29" + }, + { + "Tuple4": "10.128.0.2.18782>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_30" + }, + { + "Tuple4": "10.128.0.2.18784>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:39 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_31" + }, + { + "Tuple4": "10.128.0.2.18790>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Safari/5.00 (Macintosh; U; en)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_32" + }, + { + "Tuple4": "10.128.0.2.18792>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_33" + }, + { + "Tuple4": "10.128.0.2.18796>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Opera/9.00 (Windows NT 5.1; U; en)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_34" + }, + { + "Tuple4": "10.128.0.2.18794>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Opera/9.00 (Windows NT 5.1; U; en)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_35" + }, + { + "Tuple4": "10.128.0.2.18798>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "GooglePocket/2.1 ( http://www.googlePocket.com/Pocket.html)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_36" + }, + { + "Tuple4": "10.128.0.2.18800>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030505 Mozilla Firebird/0.6", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_37" + }, + { + "Tuple4": "10.128.0.2.18804>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "DoCoMo/2.0 SH902i (compatible; Y!J-SRD/1.0; http://help.yahoo.co.jp/help/jp/search/indexing/indexing-27.html)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_38" + }, + { + "Tuple4": "10.128.0.2.18802>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.4.0", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_39" + }, + { + "Tuple4": "10.128.0.2.18806>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "IE/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322;)", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_40" + }, + { + "Tuple4": "10.128.0.2.18808>10.0.0.2.80", + "method": "CONNECT", + "uri": "test.mazebolt.com:80", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "test.mazebolt.com", + "User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Content-Length": "0", + "name": "HTTP_DECODER_RESULT_41" + }, + { + "Tuple4": "10.128.0.2.18790>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_42" + }, + { + "Tuple4": "10.128.0.2.18792>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_43" + }, + { + "Tuple4": "10.128.0.2.18796>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_44" + }, + { + "Tuple4": "10.128.0.2.18798>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_45" + }, + { + "Tuple4": "10.128.0.2.18794>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_46" + }, + { + "Tuple4": "10.128.0.2.18800>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_47" + }, + { + "Tuple4": "10.128.0.2.18804>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_48" + }, + { + "Tuple4": "10.128.0.2.18802>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_49" + }, + { + "Tuple4": "10.128.0.2.18806>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_50" + }, + { + "Tuple4": "10.128.0.2.18808>10.0.0.2.80", + "res_version": "1.1", + "res_status": "Forbidden", + "major_version": 1, + "minor_version": 1, + "status_code": 403, + "Date": "Thu, 03 Sep 2020 10:26:41 GMT", + "Server": "Apache", + "Content-Length": "199", + "Content-Type": "text/html; charset=iso-8859-1", + "name": "HTTP_DECODER_RESULT_51" + } +]
\ No newline at end of file diff --git a/test/http_decoder/test_result_json/http_wrapped_header.json b/test/http_decoder/test_result_json/http_headers_exceed_maximum.json index fac220b..fac220b 100644 --- a/test/http_decoder/test_result_json/http_wrapped_header.json +++ b/test/http_decoder/test_result_json/http_headers_exceed_maximum.json diff --git a/test/http_decoder/test_result_json/http_no_length.json b/test/http_decoder/test_result_json/http_no_content_length.json index 61613ea..61613ea 100644 --- a/test/http_decoder/test_result_json/http_no_length.json +++ b/test/http_decoder/test_result_json/http_no_content_length.json diff --git a/test/http_decoder/test_result_json/http_post_form.json b/test/http_decoder/test_result_json/http_post_multipart_form_data.json index c728970..c728970 100644 --- a/test/http_decoder/test_result_json/http_post_form.json +++ b/test/http_decoder/test_result_json/http_post_multipart_form_data.json diff --git a/test/http_decoder/test_result_json/http_tcp_seq_issue.json b/test/http_decoder/test_result_json/http_tcp_seq_issue.json deleted file mode 100644 index fc82348..0000000 --- a/test/http_decoder/test_result_json/http_tcp_seq_issue.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "Tuple4": "10.11.12.13.54162>13.12.11.10.80", - "method": "POST", - "uri": "/xxxxxxxxx/xxxxxx/xxxxxxxxxxx/xxxxxxxxxx/xxx/xxxxxxxxx.xxx?Command=FileUpload&Type=File&CurrentFolder=%2F", - "req_version": "1.1", - "major_version": 1, - "minor_version": 1, - "Connection": "Keep-Alive", - "Content-Type": "multipart/form-data; boundary=----7df271da040a", - "Accept": "*/*", - "Referer": "http://xxx.xxxxxxxxxxxx.xxx.xx/xxxxxxxxx/xxxxxx/xxxxxxxxxxx/xxxxxxxxxx/xxx/xxxxxxxxx.xxx?Command=FileUpload&Type=File&CurrentFolder=%2F", - "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2)", - "Content-Length": "300", - "Host": "xxx.xxxxxxxxxxxx.xxx.xx", - "name": "HTTP_DECODER_RESULT_1" - }, - { - "Tuple4": "10.11.12.13.54162>13.12.11.10.80", - "res_version": "1.1", - "res_status": "OK", - "major_version": 1, - "minor_version": 1, - "status_code": 200, - "Date": "Tue, 28 May 2019 00:51:19 GMT", - "P3P": "policyref=\"https://policies.xxxxx.com/w3c/p3p.xml\", CP=\"CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV\"", - "Set-Cookie": "xx=xxxxxxxxxxxxx&x=x&x=xx; expires=Wed, 27-May-2020 00:51:19 GMT; path=/; domain=.xxx.xx; secure", - "Cache-Control": "max-age=3600, private", - "Vary": "Accept-Encoding", - "Content-Length": "3388", - "Content-Type": "text/html; charset=UTF-8", - "Age": "0", - "Connection": "keep-alive", - "Server": "ATS", - "X-Frame-Options": "DENY", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "strict-origin-when-cross-origin", - "Content-Security-Policy": "sandbox; default-src 'self'; script-src 'none'; object-src 'none'; report-uri https://xxx.xxxxx.xxx/xxxxxx/xxx?xxx=xxxxxxx", - "name": "HTTP_DECODER_RESULT_2" - } -]
\ No newline at end of file |
