Commit 7f042988 authored by Alexandre's avatar Alexandre
Browse files

Rename classes DoT,DoH to DOT,DOH

parent 17962686
......@@ -314,7 +314,7 @@ class Request:
self.data = self.message.to_wire()
class RequestDoT(Request):
class RequestDOT(Request):
# raising custom exception for each unexpected response might be a good idea
def check_response(self, debug=False):
if self.response is None:
......@@ -337,7 +337,7 @@ class RequestDoT(Request):
self.response_size = size
class RequestDoH(Request):
class RequestDOH(Request):
def __init__(self, qname, qtype='AAAA', use_edns=True, want_dnssec=False, no_ecs=True):
Request.__init__(self, qname, qtype=qtype, use_edns=use_edns, want_dnssec=want_dnssec, no_ecs=no_ecs)
self.message.id = 0 # DoH requests that
......@@ -424,7 +424,7 @@ class Connection:
pass
class ConnectionDoT(Connection):
class ConnectionDOT(Connection):
def __init__(self, server, servername=None, connect_to=None,
forceIPv4=False, forceIPv6=False, insecure=False,
......@@ -704,7 +704,7 @@ def create_handle(connection):
return handle
class ConnectionDoH(Connection):
class ConnectionDOH(Connection):
def __init__(self, server, servername=None, connect_to=None,
forceIPv4=False, forceIPv6=False,
......@@ -917,9 +917,9 @@ def print_result(connection, request, prefix=None, display_err=True):
def create_request(qname, qtype='AAAA', use_edns=True, want_dnssec=False, no_ecs=True, dot=False, trunc=False):
if dot:
request = RequestDoT(qname, qtype, use_edns, want_dnssec, no_ecs)
request = RequestDOT(qname, qtype, use_edns, want_dnssec, no_ecs)
else:
request = RequestDoH(qname, qtype, use_edns, want_dnssec, no_ecs)
request = RequestDOH(qname, qtype, use_edns, want_dnssec, no_ecs)
if trunc:
request.trunc_data()
else:
......@@ -1419,12 +1419,12 @@ for ip in ip_set:
print("Checking \"%s\" on %s ..." % (url, ip))
try:
if opts.dot:
conn = ConnectionDoT(url, servername=extracheck, connect_to=ip,
conn = ConnectionDOT(url, servername=extracheck, connect_to=ip,
forceIPv4=opts.forceIPv4, forceIPv6=opts.forceIPv6,
insecure=opts.insecure, verbose=opts.verbose, debug=opts.debug,
sni=opts.sni, key=opts.key, pipelining=opts.pipelining)
else:
conn = ConnectionDoH(url, servername=extracheck, connect_to=ip,
conn = ConnectionDOH(url, servername=extracheck, connect_to=ip,
forceIPv4=opts.forceIPv4, forceIPv6=opts.forceIPv6,
insecure=opts.insecure, verbose=opts.verbose, debug=opts.debug,
multistreams=opts.multistreams)
......
Markdown is supported
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