diff options
| author | liuwentan <[email protected]> | 2024-01-10 11:43:15 +0800 |
|---|---|---|
| committer | liuwentan <[email protected]> | 2024-01-16 15:19:01 +0800 |
| commit | dceaf90cec5f1691d8d5e83fa219a31f42c2faa0 (patch) | |
| tree | 051edf2e9beb47270fff11653b12aa046ffabf06 /test | |
| parent | 3761b190f045f9005e78c5166b1e7b8d47bc51a0 (diff) | |
[HTTP_DECODER]bugfix for http transaction pipeline
Diffstat (limited to 'test')
| -rw-r--r-- | test/http_decoder/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | test/http_decoder/http_pcap/http_trans_pipeline.pcap | bin | 0 -> 6832 bytes | |||
| -rw-r--r-- | test/http_decoder/test_result_json/http_trans_pipeline.json | 348 |
3 files changed, 356 insertions, 4 deletions
diff --git a/test/http_decoder/CMakeLists.txt b/test/http_decoder/CMakeLists.txt index ad4d966..75209b1 100644 --- a/test/http_decoder/CMakeLists.txt +++ b/test/http_decoder/CMakeLists.txt @@ -40,9 +40,6 @@ add_test(NAME HTTP_GET_SINGLE_TRANS_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SO add_test(NAME HTTP_GET_MULTI_TRANS_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_get_multi_trans.json -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_get_multi_trans.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) -add_test(NAME HTTP_GET_REQ_PIPELINE_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_get_req_pipeline.json - -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_get_req_pipeline.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) - add_test(NAME HTTP_GET_LONG_COOKIE_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_get_long_cookie.json -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_get_long_cookie.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) @@ -103,9 +100,14 @@ add_test(NAME HTTP_UPGRADE_HTTP2_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURC add_test(NAME HTTP_MULTI_PARSE_ERROR_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_multi_parse_error.json -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_multi_parse_error.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) +add_test(NAME HTTP_GET_REQ_PIPELINE_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_get_req_pipeline.json + -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_get_req_pipeline.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) + +add_test(NAME HTTP_TRANS_PIPELINE_TEST COMMAND ${TEST_MAIN} ${CMAKE_CURRENT_SOURCE_DIR}/test_result_json/http_trans_pipeline.json + -f "find ${CMAKE_CURRENT_SOURCE_DIR}/http_pcap/ -name http_trans_pipeline.pcap|sort -V" WORKING_DIRECTORY ${TEST_RUN_DIR}) + set_tests_properties(HTTP_GET_SINGLE_TRANS_TEST HTTP_GET_MULTI_TRANS_TEST - HTTP_GET_REQ_PIPELINE_TEST HTTP_GET_LONG_COOKIE_TEST HTTP_GET_ENCODED_URI_TEST HTTP_RES_GZIP_TEST @@ -126,4 +128,6 @@ set_tests_properties(HTTP_GET_SINGLE_TRANS_TEST HTTP_MULTI_PARSE_ERROR_TEST HTTP_UPGRADE_WEBSOCKET_TEST HTTP_UPGRADE_HTTP2_TEST + HTTP_GET_REQ_PIPELINE_TEST + HTTP_TRANS_PIPELINE_TEST PROPERTIES FIXTURES_REQUIRED TestFixture)
\ No newline at end of file diff --git a/test/http_decoder/http_pcap/http_trans_pipeline.pcap b/test/http_decoder/http_pcap/http_trans_pipeline.pcap Binary files differnew file mode 100644 index 0000000..9d4aa1a --- /dev/null +++ b/test/http_decoder/http_pcap/http_trans_pipeline.pcap diff --git a/test/http_decoder/test_result_json/http_trans_pipeline.json b/test/http_decoder/test_result_json/http_trans_pipeline.json new file mode 100644 index 0000000..e2d18c7 --- /dev/null +++ b/test/http_decoder/test_result_json/http_trans_pipeline.json @@ -0,0 +1,348 @@ +[ + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/postinfo.html", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_1" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/_vti_aut/author.dll", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_2" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/_vti_aut/author.exe", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_3" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/_vti_aut/dvwssr.dll", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_4" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/_vti_adm/admin.dll", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_5" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/_vti_adm/admin.exe", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_6" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/fpcount.exe?Page=default.asp|Image=3", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_7" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_8" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_9" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_10" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_11" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_12" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_13" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/shtml.dll", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_14" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_bin/shtml.exe", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_15" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/_x_todo.htm", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_16" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/_x_todoh.htm", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_17" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/access.cnf", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_18" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/administrator.pwd", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_19" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/administrators.pwd", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_20" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/authors.pwd", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_21" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "method": "GET", + "uri": "/_vti_pvt/bots.cnf", + "req_version": "1.1", + "major_version": 1, + "minor_version": 1, + "Host": "116.181.2.152", + "User-Agent": "Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_22" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_23" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_24" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_25" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_26" + }, + { + "Tuple4": "223.72.39.14.2545>192.168.182.147.80", + "res_version": "1.1", + "res_status": "Not Found", + "major_version": 1, + "minor_version": 1, + "status_code": 404, + "Server": "nginx", + "Date": "Thu, 29 Oct 2020 09:59:02 GMT", + "Content-Type": "text/html", + "Content-Length": "146", + "Connection": "keep-alive", + "name": "HTTP_DECODER_RESULT_27" + } +]
\ No newline at end of file |
