import re


def ipblur(text): # brutalizer ;-)
    """ blurs IP address  """
    m = re.match(r'^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}.*', text)
    if not m:
        return text
    return '%sxxx' % m.group(1)