change ssl_verify to tls_verify
This commit is contained in:
parent
0e8be21719
commit
5a6a5a0277
|
@ -6,8 +6,8 @@ from pynetbox import api
|
|||
|
||||
class NetBoxScanner(object):
|
||||
|
||||
def __init__(self, address, token, ssl_verify, tag, cleanup):
|
||||
if (ssl_verify == 'no'):
|
||||
def __init__(self, address, token, tls_verify, tag, cleanup):
|
||||
if (tls_verify == 'no'):
|
||||
session = requests.Session()
|
||||
session.verify = False
|
||||
self.netbox = api(address, token)
|
||||
|
|
|
@ -4,7 +4,7 @@ token = <token>
|
|||
logs = logs/
|
||||
# use lowercase no if you want to skip ssl verification.
|
||||
# any other value will verify the server ssl certificate.
|
||||
ssl_verify = no
|
||||
tls_verify = no
|
||||
|
||||
[NMAP]
|
||||
path = ./
|
||||
|
|
|
@ -63,7 +63,7 @@ logging.basicConfig(
|
|||
)
|
||||
logging.getLogger().addHandler(logging.StreamHandler())
|
||||
|
||||
# useful if you have ssl_verify set to no
|
||||
# useful if you have tls_verify set to no
|
||||
disable_warnings(InsecureRequestWarning)
|
||||
|
||||
|
||||
|
@ -101,7 +101,7 @@ if __name__ == '__main__':
|
|||
scanner = NetBoxScanner(
|
||||
netbox['address'],
|
||||
netbox['token'],
|
||||
netbox['ssl_verify'],
|
||||
netbox['tls_verify'],
|
||||
nmap['tag'],
|
||||
nmap.getboolean('cleanup')
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue