mirror of
https://github.com/lopes/netbox-scanner.git
synced 2025-07-24 22:34:47 +02:00
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):
|
class NetBoxScanner(object):
|
||||||
|
|
||||||
def __init__(self, address, token, ssl_verify, tag, cleanup):
|
def __init__(self, address, token, tls_verify, tag, cleanup):
|
||||||
if (ssl_verify == 'no'):
|
if (tls_verify == 'no'):
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
session.verify = False
|
session.verify = False
|
||||||
self.netbox = api(address, token)
|
self.netbox = api(address, token)
|
||||||
|
@ -4,7 +4,7 @@ token = <token>
|
|||||||
logs = logs/
|
logs = logs/
|
||||||
# use lowercase no if you want to skip ssl verification.
|
# use lowercase no if you want to skip ssl verification.
|
||||||
# any other value will verify the server ssl certificate.
|
# any other value will verify the server ssl certificate.
|
||||||
ssl_verify = no
|
tls_verify = no
|
||||||
|
|
||||||
[NMAP]
|
[NMAP]
|
||||||
path = ./
|
path = ./
|
||||||
|
@ -63,7 +63,7 @@ logging.basicConfig(
|
|||||||
)
|
)
|
||||||
logging.getLogger().addHandler(logging.StreamHandler())
|
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)
|
disable_warnings(InsecureRequestWarning)
|
||||||
|
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ if __name__ == '__main__':
|
|||||||
scanner = NetBoxScanner(
|
scanner = NetBoxScanner(
|
||||||
netbox['address'],
|
netbox['address'],
|
||||||
netbox['token'],
|
netbox['token'],
|
||||||
netbox['ssl_verify'],
|
netbox['tls_verify'],
|
||||||
nmap['tag'],
|
nmap['tag'],
|
||||||
nmap.getboolean('cleanup')
|
nmap.getboolean('cleanup')
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user