# adnetdiscover

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

Latest version **1.0.3** (published 2019-08-02) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install adnetdiscover
pnpm add adnetdiscover
yarn add adnetdiscover
bun add adnetdiscover
```

Provides the command `adnetdiscover`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-08-02 |
| First published | 2019-07-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 28.7 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | juanescarragaj |

## Links

- npm: https://www.npmjs.com/package/adnetdiscover
- npm.io page: https://npm.io/package/adnetdiscover

## Dependencies (10)

- [arch](https://npm.io/package/arch.md) ^2.1.1
- [ldapts](https://npm.io/package/ldapts.md) ^1.9.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [semver](https://npm.io/package/semver.md) ^6.3.0
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [pretty-ms](https://npm.io/package/pretty-ms.md) ^5.0.0
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.5.0
- [network-list](https://npm.io/package/network-list.md) ^1.1.5
- [ipv4-calculator](https://npm.io/package/ipv4-calculator.md) ^1.3.0
- [systeminformation](https://npm.io/package/systeminformation.md) ^4.14.4

## Recent versions

- 1.0.3 (latest) — 2019-08-02
- 1.0.2 — 2019-07-31
- 1.0.1 — 2019-07-31
- 1.0.0 — 2019-07-31

## README

## 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
}
```

---
_Source: https://npm.io/package/adnetdiscover · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
