fix(dns): don't make NS explicit if None

This commit is contained in:
missytake
2026-05-07 15:27:29 +02:00
committed by holger krekel
parent ac58b3fe6f
commit 529d0713f1

View File

@@ -81,7 +81,8 @@ def query_dns(typ, domain):
ns = get_authoritative_ns(domain)
# Query authoritative nameserver directly to bypass DNS cache.
res = shell(f"dig @{ns} -r -q {domain} -t {typ} +short", print=log_progress)
direct_ns = f"@{ns}" if ns else ""
res = shell(f"dig {direct_ns} -r -q {domain} -t {typ} +short", print=log_progress)
return next((line for line in res.split("\n") if not line.startswith(";")), "")