From 877e574f2527ca4db9e25389982ed4189791786e Mon Sep 17 00:00:00 2001 From: david Date: Mon, 4 Jun 2012 03:46:14 +0000 Subject: [PATCH] Include the error code when smb-ls fails to authenticate. --- scripts/smb-ls.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/smb-ls.nse b/scripts/smb-ls.nse index b73311523..2cca02822 100644 --- a/scripts/smb-ls.nse +++ b/scripts/smb-ls.nse @@ -62,7 +62,7 @@ local function fail(err) return ("\n ERROR: %s"):format(err or "") end action = function(host) local status, smbstate = smb.start_ex(host, true, true, arg_share, nil, nil, nil) if ( not(status) ) then - return fail("Failed to authenticate to server") + return fail("Failed to authenticate to server (" .. smbstate .. ")") end -- remove leading slash