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
|
||||
- Expand <HOST> in ignoreregex. 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
|
||||
----------
|
||||
|
|
|
@ -267,7 +267,7 @@ class Filter(JailThread):
|
|||
# @return True when the thread exits nicely
|
||||
|
||||
def run(self):
|
||||
raise Exception("run() is abstract")
|
||||
raise NotImplementedException("run() is abstract")
|
||||
|
||||
##
|
||||
# Add an IP/DNS to the ignore list.
|
||||
|
@ -494,18 +494,6 @@ class DNSUtils:
|
|||
return list()
|
||||
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
|
||||
def searchIP(text):
|
||||
""" Search if an IP address if directly available and return
|
||||
|
@ -543,11 +531,9 @@ class DNSUtils:
|
|||
ipList.append(plainIPStr)
|
||||
if not ipList:
|
||||
# Try to get IP from possible DNS
|
||||
dns = DNSUtils.textToDns(text)
|
||||
if not dns == None:
|
||||
ip = DNSUtils.dnsToIp(dns.group(0))
|
||||
for e in ip:
|
||||
ipList.append(e)
|
||||
ip = DNSUtils.dnsToIp(text)
|
||||
for e in ip:
|
||||
ipList.append(e)
|
||||
return ipList
|
||||
textToIp = staticmethod(textToIp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue