From 88ad786c7335a17d2f179a84b52a1500a3a1e68b Mon Sep 17 00:00:00 2001 From: david Date: Thu, 26 Mar 2009 18:45:25 +0000 Subject: [PATCH] Remove service fingerprints in anonymize.py because they often contain identifying information. --- ndiff/test-scans/anonymize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ndiff/test-scans/anonymize.py b/ndiff/test-scans/anonymize.py index 20d0c55b8..b1df5785f 100755 --- a/ndiff/test-scans/anonymize.py +++ b/ndiff/test-scans/anonymize.py @@ -2,13 +2,12 @@ # Anonymize an Nmap XML file, replacing host name and IP addresses with random # anonymous ones. Anonymized names will be consistent between runs of the -# program. Give a file name as an argument. The anonymized file is written to -# stdout. +# program. Any servicefp attributes are removed. Give a file name as an +# argument. The anonymized file is written to stdout. # # The anonymization is not rigorous. This program just matches regular # expressions against things that look like address and host names. It is -# possible that it will leave some identifying information, for example a host -# name split across lines in a service fingerprint. +# possible that it will leave some identifying information. import hashlib import random @@ -99,6 +98,7 @@ def anonymize_file(f): line = re.sub(ipv6_re, repl_addr, line) line = re.sub(r'