fixed the following bug reported by Ron

./scripts/ldap-brute.nse:75: attempt to get length of local 'contexts' (a nil value)
stack traceback:
       ./scripts/ldap-brute.nse:75: in function 'get_naming_context'
       ./scripts/ldap-brute.nse:121: in function <./scripts/ldap-brute.nse:95>
       (tail call): ?
This commit is contained in:
patrik 2010-11-04 18:53:56 +00:00
parent 8a060083b9
commit 356c1e12a9

View file

@ -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