From a7e20158a8dcfe020cd3e4cb6b887a4586616977 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 21 Aug 2018 19:36:38 +0000 Subject: [PATCH] Fix a crash in nbstat.nse; stdnse.output_table can't have setmetatable called on it this way. --- scripts/nbstat.nse | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/nbstat.nse b/scripts/nbstat.nse index d1b3ffd5f..758cf30b2 100644 --- a/scripts/nbstat.nse +++ b/scripts/nbstat.nse @@ -179,11 +179,12 @@ action = function(host) user_name = "" 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