mirror of
https://github.com/lopes/netbox-scanner.git
synced 2025-07-23 05:44:53 +02:00
bugfix in nbscan
This commit is contained in:
parent
c8dfe5adc4
commit
d41ba6fce7
@ -6,6 +6,15 @@ A scanner util for NetBox, because certain networks can be updated automagically
|
|||||||
|
|
||||||
$ pip3 install netbox-scanner
|
$ pip3 install netbox-scanner
|
||||||
|
|
||||||
|
Another way is download from GitHub:
|
||||||
|
|
||||||
|
$ wget https://github.com/forkd/netbox-scanner/archive/master.zip
|
||||||
|
$ unzip netbox-scanner-master.zip -d netbox-scanner
|
||||||
|
$ cd netbox-scanner
|
||||||
|
$ pip install -r requirements.txt
|
||||||
|
$ vi netbox-scanner/config.py # edit this file, save and exit
|
||||||
|
$ python netbox-scanner/netbox-scanner.py
|
||||||
|
|
||||||
Note that `netbox-scanner` will require Nmap and an instance of NetBox ready to use.
|
Note that `netbox-scanner` will require Nmap and an instance of NetBox ready to use.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -42,7 +42,7 @@ class NetBoxScanner(object):
|
|||||||
try:
|
try:
|
||||||
description = self.get_description(nm[host]['hostnames'][0]['name'],
|
description = self.get_description(nm[host]['hostnames'][0]['name'],
|
||||||
nm[host]['osmatch'][0]['osclass'][0]['cpe'])
|
nm[host]['osmatch'][0]['osclass'][0]['cpe'])
|
||||||
except (KeyError, AttributeError):
|
except (KeyError, AttributeError, IndexError):
|
||||||
description = self.unknown
|
description = self.unknown
|
||||||
hosts.append({'address':address,'description':description})
|
hosts.append({'address':address,'description':description})
|
||||||
return hosts
|
return hosts
|
||||||
|
2
setup.py
2
setup.py
@ -7,7 +7,7 @@ with open("README.md", "r") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="netbox-scanner",
|
name="netbox-scanner",
|
||||||
version="0.1.0",
|
version="0.1.1",
|
||||||
author='José Lopes de Oliveira Jr.',
|
author='José Lopes de Oliveira Jr.',
|
||||||
author_email="jlojunior@gmail.com",
|
author_email="jlojunior@gmail.com",
|
||||||
description="A scanner util for NetBox",
|
description="A scanner util for NetBox",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user