From 7ba9116d3e86fcb72f429684953cc27ac42bdf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lopes?= Date: Thu, 27 Sep 2018 15:31:29 -0300 Subject: [PATCH] bugfixes --- netbox-scanner/config.py | 2 +- netbox-scanner/nbscan.py | 3 ++- requirements.txt | 8 ++++++++ setup.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/netbox-scanner/config.py b/netbox-scanner/config.py index cd5dd21..6d6d1f5 100644 --- a/netbox-scanner/config.py +++ b/netbox-scanner/config.py @@ -12,7 +12,7 @@ NETBOX = { DEVICE_AUTH = { 'CISCO': { - 'USER': '', + 'USER': 'netbox', 'PASSWORD': '', 'COMMAND': 'show run | inc hostname' } diff --git a/netbox-scanner/nbscan.py b/netbox-scanner/nbscan.py index f36319a..072a986 100644 --- a/netbox-scanner/nbscan.py +++ b/netbox-scanner/nbscan.py @@ -38,7 +38,8 @@ class NetBoxScanner(object): return '{}: {}'.format(vendor.lower(), re.search(r'hostname ([A-Z|a-z|0-9|\-|_]+)', str(stdout.read().decode('utf-8'))).group(1)) - except (AuthenticationException, SSHException, NoValidConnectionsError): + except (AuthenticationException, SSHException, + NoValidConnectionsError, TimeoutError): pass return '{}.{}.{}'.format(c.get_vendor()[0], c.get_product()[0], c.get_version()[0]) diff --git a/requirements.txt b/requirements.txt index f0a2965..66d389e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,16 @@ +asn1crypto==0.24.0 +bcrypt==3.1.4 certifi==2018.8.24 +cffi==1.11.5 chardet==3.0.4 cpe==1.2.1 +cryptography==2.3.1 idna==2.7 netaddr==0.7.19 +paramiko==2.4.2 +pyasn1==0.4.4 +pycparser==2.19 +PyNaCl==1.3.0 pynetbox==3.4.6 python-nmap==0.6.1 requests==2.19.1 diff --git a/setup.py b/setup.py index 6ce8142..9e5b7b9 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.4.0', + version='0.4.1', author='José Lopes de Oliveira Jr.', author_email='jlojunior@gmail.com', description='A scanner util for NetBox',