Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

add timeout (#1464)

TheTechromancerc8f59e76e5ea
diff --git a/modules/sfp_dnszonexfer.py b/modules/sfp_dnszonexfer.py
index 8c793fd6..5598d3b0 100644
--- a/modules/sfp_dnszonexfer.py
+++ b/modules/sfp_dnszonexfer.py
@@ -29,9 +29,11 @@ class sfp_dnszonexfer(SpiderFootPlugin):
}
opts = {
+ "timeout": 30
}
optdescs = {
+ "timeout": "Timeout in seconds"
}
events = None
@@ -96,7 +98,7 @@ class sfp_dnszonexfer(SpiderFootPlugin):
self.debug("Trying for name: " + name)
try:
ret = list()
- z = dns.zone.from_xfr(dns.query.xfr(nsip, name))
+ z = dns.zone.from_xfr(dns.query.xfr(nsip, name, timeout=int(self.opts["timeout"])))
names = list(z.nodes.keys())
for n in names:
ret.append(z[n].to_text(n))