Skip to content

Commit 7bafe1e

Browse files
committed
updated anonymize.py
1 parent dbea5a0 commit 7bafe1e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

anonymize.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
sys.exit(4)
9090

9191
__author__ = 'Hari Sekhon'
92-
__version__ = '0.8.5'
92+
__version__ = '0.8.6'
9393

9494

9595
class Anonymize(CLI):
@@ -309,12 +309,12 @@ def __init__(self):
309309
pass_word_phrase=pass_word_phrase,
310310
pw=password_quoted),
311311
'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'(?!-)',
314314
'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)',
318318
# network device format Mac address
319319
'mac2': r'\b(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4}\b',
320320
# _HOST and HTTP are commonly use in Hadoop clusters, let's make sure they are left for debugging purposes

0 commit comments

Comments
 (0)