1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix a crash in nbstat.nse; stdnse.output_table can't have setmetatable called on it this way.

This commit is contained in:
dmiller
2018-08-21 19:36:38 +00:00
parent 7629f3b997
commit a7e20158a8

View File

@@ -179,11 +179,12 @@ action = function(host)
user_name = "<unknown>"
end
local response = stdnse.output_table()
response["server_name"] = server_name
response["workstation_name"] = workstation_name
response["user"] = user_name
response["mac"] = mac
local response = {
server_name = server_name,
workstation_name = workstation_name,
user = user_name,
mac = mac,
}
local names_output = {}
for i = 1, #names, 1 do
@@ -238,6 +239,6 @@ action = function(host)
end
})
return response
return tostring(response)
end