From dea497d03eb4ec36b59fed482c04912ee43691bf Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 5 Nov 2024 09:53:35 +0100 Subject: [PATCH] Use timeout in dnspython calls Fixes #328 --- dnsrecon/lib/dnshelper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnsrecon/lib/dnshelper.py b/dnsrecon/lib/dnshelper.py index ea6ddd6e..9fce1bd0 100644 --- a/dnsrecon/lib/dnshelper.py +++ b/dnsrecon/lib/dnshelper.py @@ -108,7 +108,7 @@ def query( self, q, where, - timeout=None, + timeout=DNS_QUERY_TIMEOUT, port=53, af=None, source=None, @@ -462,7 +462,7 @@ def zone_transfer(self): logger.info(f'{ns_srv} Has port 53 TCP Open') try: - zone = self.from_wire(dns.query.xfr(ns_srv, self._domain)) + zone = self.from_wire(dns.query.xfr(ns_srv, self._domain, timeout=DNS_QUERY_TIMEOUT)) logger.info('Zone Transfer was successful!!') zone_records.append({'type': 'info', 'zone_transfer': 'success', 'ns_server': ns_srv})