GithubHelp home page GithubHelp logo

wyko / netcrawl Goto Github PK

View Code? Open in Web Editor NEW
52.0 52.0 10.0 5.53 MB

Netcrawl is a tool designed to discover and poll one or more devices, inventory them, and then provide useful data on the processed devices.

Home Page: http://netcrawl.readthedocs.io

Python 100.00%
cdp cisco netmiko

netcrawl's People

Contributors

wyko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netcrawl's Issues

Support Keyboard Interrupts

Problem

Currently, when the application runs and is interrupted, there is no code to gracefully exit execution. Especially when scanning with subprocesses, as they have a tenancy to stick around after the interrupt.

Objective

Implement support for interrupts.

Ideas

  • Using the signal module to get the subprocesses to ignore the KeyboardInterrupt, then terminating the workers normally

Support for Juniper

Please let me know if you'd like to incorporate support for JUNOS devices in the future, I would be happy to help out.

Netmiko establishes SSH connection but no data extraction

Hello, I'm using python 3.6 with inside a virtualenv and I can't get information to display whatever the platform (cisco_nxos, cisco_ios or cisco_xe).

python run.py -sS -t 172.28.46.253 -p cisco_nxos
main.main : #3 Start new run
main.main : #3 ##### Starting Single Run #####
main.single_run : #3 Processing connection to 172.28.46.253
base_device.process_devices : #4 Processing device
cli.connect : ? SSH auth error to 172.28.46.253 using admin, In
cli.connect : ? SSH auth error to 172.28.46.253 using admin, In
cli.connect : #4 Successful ssh auth to 172.28.46.253 using administrator, In
base_device.process_devices : ? _enable - Error: 'CiscoNxosSSH' object has no attribute 'ip'
main.single_run : ? Connection to 172.28.46.253 failed: 'CiscoNxosSSH' object has no attribute 'ip'
Device processing failed
main.main : #3 ##### Single Run Complete #####

Could you please help to point what is wrong?

Add PyTests to improve overall coverage

Objective

All parts of the program need more tests. Optimal test coverage should reach over 80%.

Concerns

A lot of the application depends on a populated database or a connection to a live device. How do we test without a live network to test on? Maybe through pre-downloaded samples of device output?

Help Wanted to make Web Front-End

Problem

Netcrawl currently polls devices properly, but once the data is in the database there's no convenient way to interact with it outside of an SQL query

Objective

Implement a web-based front end to allow users to interact with the polled data. Obviously, there are a lot of ways to do this, but I'm not a web developer and I am open to ideas and help.

Create Fake Interfaces, Devices, and Databases for Testing

Objective

For testing purposes, we should have fully populated structures to work with. For this, we need helper functions which create on-demand, populated interfaces and devices, as well as filling the inventory and main databases with fake data.

When appropriate, these fake structures can be used alongside pre-made ones in situations where exactly known data is not needed.

Possible Implementation

Using the Faker package will expedite this

Switchport Tracing for MAC's

Each device will save it's mac address table per switchport. The result is that both the directly connected device and all devices in the same layer two path storing an end device's MAC address.

MAC audit module

The MAC Audit module will take a csv (or any other input, as added in the future) and to compare it with the database of polled mac addresses. The purpose is for things like Rogue AP audits, where a rogue device may be detected, its MAC polled, and then compared against macs connected to switchports for a similar OUI.

For each csv mac address:

  1. Get a list of all polled MAC addresses in the given subnet
  2. Compare the csv MAC against the polled MACS
  3. Generate a confidence rating that indicates how similar the MAC's are

The csv needs at minimum the mac column as well as either a network_ip column or an ip and subnet column.

Challenges:

  • Currently, MAC addresses are stored by interface. The interface will not always have an associated subnet, due to being a layer 2 interface. The module should intelligently use the device's subnets when an interface specific one isn't available.

Add 'Update Existing Device' Functionality

Objective

When performing a scan with a pre-existing database, the application will identify pre-existing devices and update them rather than adding duplicate entries.

Possible Implementation

After polling a device, search the database for a duplicate unique_name.

If found:

  • Full Replace (preferred): Cascade delete the old entry and add the new one.
  • Update: Add the device_id of the match to the polled device. Compare each entry and update them.

Concerns

The application may be interested in tracking changes in device state over time. What would be the best way to do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.