|
89 | 89 | sys.exit(4) |
90 | 90 |
|
91 | 91 | __author__ = 'Hari Sekhon' |
92 | | -__version__ = '0.8.5' |
| 92 | +__version__ = '0.8.6' |
93 | 93 |
|
94 | 94 |
|
95 | 95 | class Anonymize(CLI): |
@@ -309,12 +309,12 @@ def __init__(self): |
309 | 309 | pass_word_phrase=pass_word_phrase, |
310 | 310 | pw=password_quoted), |
311 | 311 | 'ip': r'(?<!\d\.)' + ip_regex + r'/\d{1,2}', |
312 | | - 'ip2': r'(?<!\d\.)' + ip_regex + r'(?![.-]\w)', |
313 | | - 'ip3': aws_host_ip_regex + r'(?!-\d)', |
| 312 | + 'ip2': r'(?<!\d\.)' + ip_regex + r'(?!\w*[.-]\w)', |
| 313 | + 'ip3': aws_host_ip_regex + r'(?!-)', |
314 | 314 | 'ip_prefix': r'(?<!\d\.)' + ip_prefix_regex + r'(\d+)/\d{1,2}', |
315 | | - 'ip_prefix2': r'(?<!\d\.)' + ip_prefix_regex + r'(\d+)(?![.-]\w)', |
316 | | - 'ip_prefix3': r'\bip-\d+-\d+-\d+-(\d+)(?!-\d)', |
317 | | - 'subnet_mask': r'(?<!\d\.)' + subnet_mask_regex + r'(?![^:]\w)', |
| 315 | + 'ip_prefix2': r'(?<!\d\.)' + ip_prefix_regex + r'(\d+)(?!\w*[.-]\w)', |
| 316 | + 'ip_prefix3': r'\bip-\d+-\d+-\d+-(\d+)(?!-)', |
| 317 | + 'subnet_mask': r'(?<!\d\.)' + subnet_mask_regex + r'(?!-|\w*[.-:]\w)', |
318 | 318 | # network device format Mac address |
319 | 319 | 'mac2': r'\b(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4}\b', |
320 | 320 | # _HOST and HTTP are commonly use in Hadoop clusters, let's make sure they are left for debugging purposes |
|
0 commit comments