mirror of https://github.com/fail2ban/fail2ban
- Removed textToDns() which is not required anymore. Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@619 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
9e2430a80c
commit
d0259bb790
|
@ -14,6 +14,8 @@ ver. 0.9.0 (2007/??/??) - alpha
|
||||||
- Fixed vulnerability in sshd.conf. Thanks to Daniel B. Cid
|
- Fixed vulnerability in sshd.conf. Thanks to Daniel B. Cid
|
||||||
- Expand <HOST> in ignoreregex. Thanks to Yaroslav Halchenko
|
- Expand <HOST> in ignoreregex. Thanks to Yaroslav Halchenko
|
||||||
- Improved regular expressions. Thanks to Yaroslav Halchenko
|
- Improved regular expressions. Thanks to Yaroslav Halchenko
|
||||||
|
- Removed textToDns() which is not required anymore. Thanks
|
||||||
|
to Yaroslav Halchenko
|
||||||
|
|
||||||
ver. 0.8.0 (2007/05/03) - stable
|
ver. 0.8.0 (2007/05/03) - stable
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -267,7 +267,7 @@ class Filter(JailThread):
|
||||||
# @return True when the thread exits nicely
|
# @return True when the thread exits nicely
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
raise Exception("run() is abstract")
|
raise NotImplementedException("run() is abstract")
|
||||||
|
|
||||||
##
|
##
|
||||||
# Add an IP/DNS to the ignore list.
|
# Add an IP/DNS to the ignore list.
|
||||||
|
@ -494,18 +494,6 @@ class DNSUtils:
|
||||||
return list()
|
return list()
|
||||||
dnsToIp = staticmethod(dnsToIp)
|
dnsToIp = staticmethod(dnsToIp)
|
||||||
|
|
||||||
#@staticmethod
|
|
||||||
def textToDns(text):
|
|
||||||
""" Search for possible DNS in an arbitrary text.
|
|
||||||
Thanks to Tom Pike.
|
|
||||||
"""
|
|
||||||
match = DNSUtils.DNS_CRE.match(text)
|
|
||||||
if match:
|
|
||||||
return match
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
textToDns = staticmethod(textToDns)
|
|
||||||
|
|
||||||
#@staticmethod
|
#@staticmethod
|
||||||
def searchIP(text):
|
def searchIP(text):
|
||||||
""" Search if an IP address if directly available and return
|
""" Search if an IP address if directly available and return
|
||||||
|
@ -543,11 +531,9 @@ class DNSUtils:
|
||||||
ipList.append(plainIPStr)
|
ipList.append(plainIPStr)
|
||||||
if not ipList:
|
if not ipList:
|
||||||
# Try to get IP from possible DNS
|
# Try to get IP from possible DNS
|
||||||
dns = DNSUtils.textToDns(text)
|
ip = DNSUtils.dnsToIp(text)
|
||||||
if not dns == None:
|
for e in ip:
|
||||||
ip = DNSUtils.dnsToIp(dns.group(0))
|
ipList.append(e)
|
||||||
for e in ip:
|
|
||||||
ipList.append(e)
|
|
||||||
return ipList
|
return ipList
|
||||||
textToIp = staticmethod(textToIp)
|
textToIp = staticmethod(textToIp)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue