From 3cb5343e437820a10abc3280101d6216b329a808 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 23 Jul 2026 21:55:44 +0000 Subject: [PATCH] Report error enumerating shares. Fixes #2272 --- nselib/smb.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nselib/smb.lua b/nselib/smb.lua index e15610b28..e2d6683c9 100644 --- a/nselib/smb.lua +++ b/nselib/smb.lua @@ -3309,11 +3309,13 @@ function share_get_list(host) local status, result stdnse.debug1("SMB: Getting information for share: %s", shares[i]) status, result = share_get_details(host, shares[i]) - if not status and result == 'NT_STATUS_BAD_NETWORK_NAME' then - stdnse.debug1("SMB: Share doesn't exist: %s", shares[i]) - elseif not status then - stdnse.debug1("SMB: Error while getting share details: %s", result) - return false, result + if not status then + if result == 'NT_STATUS_BAD_NETWORK_NAME' then + stdnse.debug1("SMB: Share doesn't exist: %s", shares[i]) + else + stdnse.debug1("SMB: Error while getting share details: %s", result) + end + table.insert(share_details, {name=shares[i], details=result}) else -- Save the share details table.insert(share_details, result)