Add log anonymizer sed script
authorvarac <varacanero@zeromail.org>
Tue, 21 Feb 2017 09:49:48 +0000 (10:49 +0100)
committervarac <varacanero@zeromail.org>
Tue, 21 Feb 2017 09:49:48 +0000 (10:49 +0100)
clean-log.sed [new file with mode: 0644]

diff --git a/clean-log.sed b/clean-log.sed
new file mode 100644 (file)
index 0000000..f1e6e26
--- /dev/null
@@ -0,0 +1,18 @@
+# Use this sed script to clean your logs before
+# pasting it publicly
+
+# Usage:
+#   sed -r -f clean-log.sed LOGFILE
+
+# Todo:
+#  - IPs (should be already cleaned by rsyslog)
+#  - Browser user agents
+
+# Clean all email addresses
+s/((\w|[.])+)@((\w|[.])+)/<EMAIL REDACTED>/g
+
+# Replace username
+s/varac/<USERNAME_REDACTED>/g
+
+#Replace domain
+s/wazokazi.is/<DOMAIN_REDACTED>/g