Skip to main content

A tool for automating network discovery.

Project description

DiscoNet scans specified subnets and IPs for SSH servers that can be accessed with the provided credentials and executes an arbitrary list of commands.

The process of scanning networks and collecting command output is built on a multiprocess architecture, so DiscoNet can rapidly scan through management and loopback subnets, populating an xlsx workbook with the output.

Installation

Install DiscoNet using the latest version of setuptools and pip:

$ pip install --upgrade setuptools pip
$ pip install DiscoNet

You can also opt to install the DiscoNet GUI which uses to Kivy library. To install it, you will first need to follow the Kivy Installation Instructions for your platform. Then install DiscoNet with the GUI marker:

$ pip install DiscoNet[kivy]

Binary distributions for OS X and Windows are available here.

Usage

The GUI and command line application take several input parameters:
  • workbook: Path to output xlsx file

  • subnets: Comma delimited list of networks and IP addresses to scan

  • username: SSH username

  • password: SSH password

  • commands: One per line in the GUI or passed as parameters from the command line

Examples:

To open the GUI application:

$ python -m DiscoNet

To scan and create a discovery workbook from the command line:

$ python -m DiscoNet.discoveryscan workbook subnets username password commands

A convenience script is included so that the GUI and command line utility can each be run using the following commands accordingly:

$ DiscoNet
$ discoveryscan workbook subnets username password commands ...

Use double quotes for each command and include as many as required, e.g.:

$ discoveryscan out.xlsx 172.16.0.0/24 admin password "show ver" "show run"

API

To use the module in your own projects, please reference the API Documentation.

Examples:

Initiate a discovery scan from python:

from DiscoNet.discoveryscan import DiscoveryScan

d = DiscoveryScan(workbook, subnets, username, password, [commands, ...])
d.start()

The commands parameter should be a list of command strings. The start method will block until the scan is complete. Optionally, the start method can be non-blocking when supplied with a callback function:

from DiscoNet.discoveryscan import DiscoveryScan

def cb()
    #callback function
    return

d = DiscoveryScan(workbook, subnets, username, password, [commands, ...])
d.start(cb)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DiscoNet-0.3.0.tar.gz (779.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DiscoNet-0.3.0-py2.py3-none-any.whl (782.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file DiscoNet-0.3.0.tar.gz.

File metadata

  • Download URL: DiscoNet-0.3.0.tar.gz
  • Upload date:
  • Size: 779.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for DiscoNet-0.3.0.tar.gz
Algorithm Hash digest
SHA256 24f7e94872d3a2b816b38fbc5dd07ec652f1bb1cc4623c2b226f78063635d77c
MD5 2b1913c0bf2e62b4f5006e9401fd6258
BLAKE2b-256 086a207711f2cf1f4e82b9d5efe6b175474a1246123f552365a302ebc6a17216

See more details on using hashes here.

File details

Details for the file DiscoNet-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for DiscoNet-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cfb36d1fe732f18b4354ffa87f6bb7a266a6b0d2947a9c4a92fb7d5fbddd8f36
MD5 3bb7600a3862e457b001693f0d880e70
BLAKE2b-256 274e676783ff1ae2246f01568390c68efc66addbd044eb6633458546f0a84fdb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page