From f933e531cbd2cfd00a5fd61f372323f260a406db Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Fri, 29 Jul 2022 10:17:25 +0200 Subject: [PATCH] chg: [lib] add the port option for recursive resolver outside the standard TCP/UDP 53 port --- DomainClassifier/domainclassifier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DomainClassifier/domainclassifier.py b/DomainClassifier/domainclassifier.py index a386499..1ca5e8f 100644 --- a/DomainClassifier/domainclassifier.py +++ b/DomainClassifier/domainclassifier.py @@ -34,10 +34,11 @@ class Extract: from a rawtext stream. When call, the rawtext parameter is a string containing the raw data to be process.""" - def __init__(self, rawtext=None, nameservers=['8.8.8.8']): + def __init__(self, rawtext=None, nameservers=['8.8.8.8'], port= 53): self.rawtext = rawtext self.presolver = dns.resolver.Resolver() self.presolver.nameservers = nameservers + self.presolver.port = 53 self.presolver.lifetime = 1.0 self.bgprankingserver = 'pdns.circl.lu' self.vdomain = []