Changeset 106:c28a7a8f2165 in livinglogic.python.tipimaid

Show
Ignore:
Timestamp:
10/07/11 14:08:33 (7 years ago)
Author:
Nikolas Tautenhahn <nik@…>
Branch:
default
Message:

renamed ip-regexp to ipv4-regexp

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tipimaid_obfuscate_ip.py

    r104 r106  
    2626        self.stream = stream 
    2727        self.progname = progname 
    28         self.pattern = re.compile(r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b") 
     28        self.patternipv4 = re.compile(r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b") 
    2929        self.randip = randip 
    3030 
     
    5555        try: 
    5656            for line in self.readlines(): 
    57                 sys.stdout.write(self.pattern.sub(self.obfuscate_ip, line)) 
     57                sys.stdout.write(self.patternipv4.sub(self.obfuscate_ip, line)) 
    5858        finally: 
    5959            sys.stdout.flush()