ldap

(ldap).LdapClient

LdapClient is a client for ldap protocol in golang. It is a wrapper around the standard library ldap package.

Kind: inner class of ldap

ldapClient.CollectLdapMetadata(domain, controller) ⇒ LDAPMetadata

CollectLdapMetadata collects metadata from ldap server.

Kind: instance method of LdapClient
Returns: LDAPMetadata - - The metadata from ldap server.
Throws:

  • error - The error encountered during metadata collection.
ParamTypeDescription
domainstringThe domain to collect metadata from.
controllerstringThe controller to collect metadata from.

Example

let m = require('nuclei/ldap');
let c = m.LdapClient();
let metadata = c.CollectLdapMetadata('example.com', 'controller1');

ldapClient.IsLdap(host, port) ⇒ boolean

IsLdap checks if the given host and port are running ldap server.

Kind: instance method of LdapClient
Returns: boolean - - Whether the given host and port are running ldap server.
Throws:

  • error - The error encountered during the check.
ParamTypeDescription
hoststringThe host to check.
portintThe port to check.

Example

let m = require('nuclei/ldap');
let c = m.LdapClient();
let isLdap = c.IsLdap('localhost', 389);

(ldap).LDAPMetadata : object

LDAPMetadata is an object containing metadata from ldap server.

Kind: inner typedef of ldap