mirror of
https://github.com/lopes/netbox-scanner.git
synced 2025-07-22 21:34:56 +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
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user