diff --git a/nselib/ajp.lua b/nselib/ajp.lua index 40d21b094..f4db20d61 100644 --- a/nselib/ajp.lua +++ b/nselib/ajp.lua @@ -219,7 +219,7 @@ AJP = { pos, sh.status = bin.unpack(">S", data, pos) pos, status_msg = bin.unpack(">P", data, pos) pos = pos + 1 - sh['status-line'] = ("AJP/1.3 %d %s"):format(sh.status, status_msg) + sh.status_line = ("AJP/1.3 %d %s"):format(sh.status, status_msg) pos, hdr_count = bin.unpack(">S", data, pos) @@ -301,7 +301,7 @@ Comm = { -- @class table -- @name ajp.response -- @field status status of response (see HTTP status codes) - -- @field status-line the complete status line (eg. 200 OK) + -- @field status_line the complete status line (eg. 200 OK) -- @field body the response body as string -- @field headers table of response headers diff --git a/scripts/ajp-auth.nse b/scripts/ajp-auth.nse index 1735fde7a..a1f7db470 100644 --- a/scripts/ajp-auth.nse +++ b/scripts/ajp-auth.nse @@ -46,7 +46,7 @@ action = function(host, port) return end - local result = { name = answer["status-line"]:match("^(.*)\r?\n$") } + local result = { name = answer.status_line:match("^(.*)\r?\n$") } local www_authenticate = answer.headers["www-authenticate"] if not www_authenticate then diff --git a/scripts/ajp-request.nse b/scripts/ajp-request.nse index 862985fe8..ea83973d7 100644 --- a/scripts/ajp-request.nse +++ b/scripts/ajp-request.nse @@ -83,7 +83,7 @@ action = function(host, port) helper:close() if ( response ) then - local output = response['status-line'] .. "\n" .. + local output = response.status_line .. "\n" .. stdnse.strjoin("\n", response.rawheaders) .. (response.body and "\n\n" .. response.body or "") if ( arg_file ) then