mirror of https://github.com/fail2ban/fail2ban
- Fixed textToDNS method which generated wrong matches for "rhost=12-xyz...". Thanks to Tom Pike
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@107 a942ae1a-1317-0410-a47c-b1dcaea8d6050.6
parent
a051e05cb4
commit
51f1dcee55
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue