ldap~ LdapClient

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

Constructor

new LdapClient()

Methods

CollectLdapMetadata(domain, controller) → {LDAPMetadata}

CollectLdapMetadata collects metadata from ldap server.
Parameters:
NameTypeDescription
domainstringThe domain to collect metadata from.
controllerstringThe controller to collect metadata from.
Throws:
- The error encountered during metadata collection.
Type
error
Returns:
- The metadata from ldap server.
Type: 
LDAPMetadata
Example
let m = require('nuclei/ldap');
let c = m.LdapClient();
let metadata = c.CollectLdapMetadata('example.com', 'controller1');

IsLdap(host, port) → {boolean}

IsLdap checks if the given host and port are running ldap server.
Parameters:
NameTypeDescription
hoststringThe host to check.
portintThe port to check.
Throws:
- The error encountered during the check.
Type
error
Returns:
- Whether the given host and port are running ldap server.
Type: 
boolean
Example
let m = require('nuclei/ldap');
let c = m.LdapClient();
let isLdap = c.IsLdap('localhost', 389);