1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 13:19:04 +00:00

o [NSE] Improved error handling and reporting and re-designed communication

class in RPC library with patch from Djalal Harouni. [Patrik]
This commit is contained in:
patrik
2010-04-22 20:25:38 +00:00
parent c0456bb22e
commit 71ca5cceba
7 changed files with 854 additions and 591 deletions

View File

@@ -42,7 +42,7 @@ action = function(host, port)
status, mounts = rpc.Helper.ShowMounts( host, port )
if ( not(status) or mounts == nil ) then
return " \n\n Failed to list mount points"
return stdnse.format_output(false, mounts)
end
for _, mount in ipairs( mounts ) do
@@ -54,7 +54,7 @@ action = function(host, port)
if ( status ) then
table.insert(item, ("uid: %d; gid: %d; mode: %s (%d)"):format(attribs.uid, attribs.gid, rpc.Util.ToAclText( attribs.mode ), rpc.Util.ToAclMode( attribs.mode )) )
else
table.insert(item, "ERROR: Mount failed")
table.insert(item, string.format("ERROR: %s", attribs))
end
table.insert(result, item)