1.0.3 • Published 5 years ago

adnetdiscover v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

adnetdiscover

List all network devices with an hostname and computers in active directory.

Install

npm install adnetdiscover --save

Methods:

  • discoverAD(username, password, baseDN) - scans in the entire active directory or in a specific container the computer-type objects. You'll get an array with all the results.

  • scanNetwork() - Scan all the network devices and range defined. You'll get an array with all the results.

How To:

const discover = require('adnetdiscover')();

const computers = discover.discoverAD(username, password, baseDN) {
};
console.log(computers); // array with all computers object in Active Directory


const devices = discover.scanNetwork(ipstart, ipend)  {
};
console.log(devices); // array with all devices in the network

Options

function discoveryAD(username, password, baseDN)
  
    username: user // username credentials AD
    passw0rd: pwd // password credentials AD
    baseDN: 'OU=Equipos,DC=test,DC=loc' // optional baseDN, specifies the DN where you want to search.

function scanNetwork(ipstart, ipend)

ipstart: // start ip address runs a range scan
ipend: // end ip address runs a range scan
empty option: // without parameters runs a full scan
## Result discoveryAD: Computer Object []

{ dn: 'CN=DS01,OU=Domain Controllers,DC=test,DC=loc', // Full path of location object computer in Active Directory. name: 'DS01', // name of object computer. }

## Result scanNetwork: Device Object []

{ name: null, // name device ip: '192.168.0.12', // ip address vendor: 'HUAWEI TECHNOLOGIES CO.,LTD' } // string - vendor name }