mirror of https://github.com/fail2ban/fail2ban
amend for 3036ed18893b6aae6619e53201aa53deb701b94f: eliminate "invalid sequence" warnings
parent
607e965e7b
commit
49bf6132cc
|
@ -24,7 +24,7 @@ def is_googlebot(ip):
|
||||||
import re
|
import re
|
||||||
|
|
||||||
host = DNSUtils.ipToName(ip)
|
host = DNSUtils.ipToName(ip)
|
||||||
if not host or not re.match('.*\.google(bot)?\.com$', host):
|
if not host or not re.match(r'.*\.google(bot)?\.com$', host):
|
||||||
return False
|
return False
|
||||||
host_ips = DNSUtils.dnsToIp(host)
|
host_ips = DNSUtils.dnsToIp(host)
|
||||||
return (ip in host_ips)
|
return (ip in host_ips)
|
||||||
|
|
Loading…
Reference in New Issue