Nmap NSE net: ldap-search

Attempts to perform an LDAP search and returns all matches. If no username and password is supplied to the script the Nmap registry is consulted. If the <code >ldap-brute' script has been selected and it found a valid account, this account will be used. If not anonymous bind will be used as a last attempt. SYNTAX: ldap.base: If set, the script will use it as a base for the search. By default the defaultNamingContext is retrieved and used. If no defaultNamingContext is available the script iterates over the available namingContexts ldap.username: If set, the script will attempt to perform an LDAP bind using the username and password ldap.password: If set, used together with the username to authenticate to the LDAP server ldap.qfilter: If set, specifies a quick filter. The library does not support parsing real LDAP filters. The following values are valid for the filter parameter: computer, users or all. If no value is specified it defaults to all. ldap.attrib: If set, the search will include only the attributes specified. For a single attribute a string value can be used, if multiple attributes need to be supplied a table should be used instead. ldap.maxobjects: If set, overrides the number of objects returned by the script (default 20). The value -1 removes the limit completely.