diff --git a/utils/dns.py b/utils/dns.py index 9c8e47a7..ce629d69 100644 --- a/utils/dns.py +++ b/utils/dns.py @@ -37,8 +37,9 @@ def dnsToIp(dns): def textToDns(text): """ Search for possible DNS in an arbitrary text. + Thanks to Tom Pike. """ - match = re.findall("\S*\.\w*\.\w*", text) + match = re.findall("(?:(?:\w|-)+\.){2,}\w+", text) if match: return match else: