mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Clean up output and clarify warnings. See #1818
This commit is contained in:
@@ -57,7 +57,7 @@ action = function(host, port)
|
||||
local webexec_gui_command = stdnse.get_script_args("webexec_gui_command")
|
||||
|
||||
if not webexec_command and not webexec_gui_command then
|
||||
return stdnse.format_output(false, "Error: webexec_command or webexec_gui_command is required to run this cript")
|
||||
return stdnse.format_output(false, "script-args webexec_command or webexec_gui_command is required to run this script")
|
||||
end
|
||||
|
||||
local open_result
|
||||
@@ -100,11 +100,11 @@ action = function(host, port)
|
||||
status, close_result = msrpc.svcctl_closeservicehandle(smbstate, open_result['handle'])
|
||||
smb.stop(smbstate)
|
||||
if string.match(open_service_result, 'NT_STATUS_SERVICE_DOES_NOT_EXIST') then
|
||||
return stdnse.format_output(false, "Error: WebExService is not installed")
|
||||
return stdnse.format_output(false, "WebExService is not installed")
|
||||
elseif string.match(open_service_result, 'NT_STATUS_WERR_ACCESS_DENIED') then
|
||||
return stdnse.format_output(false, "Error: WebExService could not be accessed by " .. username)
|
||||
return stdnse.format_output(false, "WebExService could not be accessed by " .. username)
|
||||
end
|
||||
return stdnse.format_output(false, "Error: WebExService failed to open with an unknown status: " .. open_service_result)
|
||||
return stdnse.format_output(false, "WebExService failed to open with an unknown status: " .. open_service_result)
|
||||
end
|
||||
|
||||
|
||||
@@ -136,5 +136,5 @@ action = function(host, port)
|
||||
|
||||
status, close_result = msrpc.svcctl_closeservicehandle(smbstate, open_result['handle'])
|
||||
smb.stop(smbstate)
|
||||
return true, output
|
||||
return output
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user