This commit is contained in:
José Lopes 2018-09-27 15:31:29 -03:00
parent 5c97c3dfdd
commit 7ba9116d3e
4 changed files with 12 additions and 3 deletions

View File

@ -12,7 +12,7 @@ NETBOX = {
DEVICE_AUTH = {
'CISCO': {
'USER': '',
'USER': 'netbox',
'PASSWORD': '',
'COMMAND': 'show run | inc hostname'
}

View File

@ -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])

View File

@ -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

View File

@ -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',