Commit 60e77fae authored by Alexandre's avatar Alexandre
Browse files

Update variable scope and name

parent cb4554ce
......@@ -428,10 +428,10 @@ class Connection:
class ConnectionDoT(Connection):
def __init__(self, server, servername=None, connect=None, forceIPv4=False, forceIPv6=False,
def __init__(self, server, servername=None, connect_to=None, forceIPv4=False, forceIPv6=False,
sni=True, pipelining=False, verbose=False, debug=False, insecure=False):
Connection.__init__(self, server, servername=servername, connect_to=connect,
Connection.__init__(self, server, servername=servername, connect_to=connect_to,
forceIPv4=forceIPv4, forceIPv6=forceIPv6, dot=True,
verbose=verbose, debug=debug, insecure=insecure)
......@@ -704,9 +704,9 @@ def create_handle(connection):
class ConnectionDoH(Connection):
def __init__(self, server, servername=None, connect=None, forceIPv4=False, forceIPv6=False,
def __init__(self, server, servername=None, connect_to=None, forceIPv4=False, forceIPv6=False,
multistreams=False, verbose=False, debug=False, insecure=False):
Connection.__init__(self, server, servername=servername, connect_to=connect,
Connection.__init__(self, server, servername=servername, connect_to=connect_to,
forceIPv4=forceIPv4, forceIPv6=forceIPv6, dot=False,
verbose=verbose, debug=debug, insecure=insecure)
self.url = server
......@@ -1352,21 +1352,21 @@ else:
ip_set = resolved_ips(netloc, port, family, opts.dot)
ok = True
for opts.connectTo in ip_set:
for ip in ip_set:
start = time.time()
if opts.dot and opts.vhostname is not None:
extracheck = opts.vhostname
else:
extracheck = None
if opts.verbose and opts.check and opts.connectTo:
print(f'Checking "{url}" on {opts.connectTo} ...')
if opts.verbose and opts.check and ip:
print(f'Checking "{url}" on {ip} ...')
try:
if opts.dot:
conn = ConnectionDoT(url, servername=extracheck, connect=opts.connectTo, verbose=opts.verbose,
conn = ConnectionDoT(url, servername=extracheck, connect_to=ip, verbose=opts.verbose,
debug=opts.debug, forceIPv4=opts.forceIPv4, forceIPv6=opts.forceIPv6,
sni=opts.sni, pipelining=opts.pipelining, insecure=opts.insecure)
else:
conn = ConnectionDoH(url, servername=extracheck, connect=opts.connectTo, verbose=opts.verbose,
conn = ConnectionDoH(url, servername=extracheck, connect_to=ip, verbose=opts.verbose,
debug=opts.debug, forceIPv4=opts.forceIPv4, forceIPv6=opts.forceIPv6,
multistreams=opts.multistreams, insecure=opts.insecure)
except TimeoutError:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment