diff --git a/scripts/ldap-brute.nse b/scripts/ldap-brute.nse index ab840bad1..a4775ee59 100644 --- a/scripts/ldap-brute.nse +++ b/scripts/ldap-brute.nse @@ -72,7 +72,7 @@ function get_naming_context( socket ) contexts = ldap.extractAttribute( searchResEntries, "namingContexts" ) end - if #contexts > 0 then + if contexts and #contexts > 0 then return contexts[1] end