diff --git a/server/failregex.py b/server/failregex.py index 8536300b..91778003 100644 --- a/server/failregex.py +++ b/server/failregex.py @@ -44,7 +44,7 @@ class Regex: self._matchCache = None # Perform shortcuts expansions. # Replace "" with default regular expression for host. - regex = regex.replace("", "(?:::f{4,6}:)?(?P\S+)") + regex = regex.replace("", "(?:::f{4,6}:)?(?P[\w\-.^_]+)") if regex.lstrip() == '': raise RegexException("Cannot add empty regex") try: diff --git a/server/filter.py b/server/filter.py index 457bb031..6bd27ffd 100644 --- a/server/filter.py +++ b/server/filter.py @@ -492,7 +492,7 @@ import socket, struct class DNSUtils: - IP_CRE = re.compile("(?:\d{1,3}\.){3}\d{1,3}") + IP_CRE = re.compile("(?:\d{1,3}\.){3}\d{1,3}$") #@staticmethod def dnsToIp(dns):