Too stupid to memorize even the most important ports...

This commit is contained in:
Klaus-Uwe Mitterer 2017-10-09 19:27:51 +02:00
parent 935c172ee2
commit 7ade18b2e0

View file

@ -20,15 +20,16 @@ class SuperResolver(dnslib.server.BaseResolver):
self.rip = str(resolver.query(raddr)[0]) self.rip = str(resolver.query(raddr)[0])
class HTTPResolver(SuperResolver): class HTTPResolver(SuperResolver):
def __init__(self, raddr = "httpns.kumi.systems", rport = 9229, timeout = 0): def __init__(self, raddr = "httpns.kumi.systems", rport = 9539, timeout = 0):
SuperResolver.__init__(self, raddr, rport, timeout) SuperResolver.__init__(self, raddr, rport, timeout)
def resolve(self, req, handler): def resolve(self, req, handler):
rep = req.reply() rep = req.reply()
rep.header.rcode = getattr(dnslib.RCODE, "NXDOMAIN")
return rep return rep
class DNSResolver(SuperResolver): class DNSResolver(SuperResolver):
def __init__(self, raddr = "8.8.8.8", rport = 22, timeout = 0): def __init__(self, raddr = "8.8.8.8", rport = 53, timeout = 0):
SuperResolver.__init__(self, raddr, rport, timeout) SuperResolver.__init__(self, raddr, rport, timeout)
def resolve(self, req, handler): def resolve(self, req, handler):
@ -41,4 +42,3 @@ class DNSResolver(SuperResolver):
return rep return rep