diff --git a/README.md b/README.md index 971bb8d..2c07853 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,15 @@ A scanner util for NetBox, because certain networks can be updated automagically $ 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. ## Usage diff --git a/netbox-scanner/nbscan.py b/netbox-scanner/nbscan.py index 20c49e8..ab84cd2 100644 --- a/netbox-scanner/nbscan.py +++ b/netbox-scanner/nbscan.py @@ -42,7 +42,7 @@ class NetBoxScanner(object): try: description = self.get_description(nm[host]['hostnames'][0]['name'], nm[host]['osmatch'][0]['osclass'][0]['cpe']) - except (KeyError, AttributeError): + except (KeyError, AttributeError, IndexError): description = self.unknown hosts.append({'address':address,'description':description}) return hosts diff --git a/setup.py b/setup.py index 806132c..dd7300a 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="netbox-scanner", - version="0.1.0", + version="0.1.1", author='José Lopes de Oliveira Jr.', author_email="jlojunior@gmail.com", description="A scanner util for NetBox",