From 40172ca7262d3c7f30cfcfc6dca767b3217a6b0e Mon Sep 17 00:00:00 2001 From: nnposter Date: Thu, 4 Jul 2024 19:14:38 +0000 Subject: [PATCH] mssql.Helper.GetDiscoveredInstances() always returns a table --- nselib/mssql.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nselib/mssql.lua b/nselib/mssql.lua index 250819a5c..fd92a10f5 100644 --- a/nselib/mssql.lua +++ b/nselib/mssql.lua @@ -39,8 +39,9 @@ -- with pre-discovered instances (e.g. by ms-sql-discover or broadcast-ms-sql-discover): -- -- --- local instance = mssql.Helper.GetDiscoveredInstances( host, port ) --- if ( instance ) then +-- local instances = mssql.Helper.GetDiscoveredInstances( host, port ) +-- if ( instances ) then +-- local instance = next(instances) -- local helper = mssql.Helper:new() -- status, result = helper:ConnectEx( instance ) -- status, result = helper:LoginEx( instance )