diff options
author | varac <varacanero@zeromail.org> | 2017-02-21 11:46:56 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2017-02-21 11:46:56 +0100 |
commit | eb3a284d551a1d7259834fe6ca9d9390c545dcff (patch) | |
tree | d5c6dfbcd5bd3f11e50ab4845994e9dd6dfa4afd /clean-log.sh | |
parent | 5ce08087d19796170916cb38324dc12cf93ef539 (diff) |
Use schell script for anonymizing logs
Diffstat (limited to 'clean-log.sh')
-rwxr-xr-x | clean-log.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clean-log.sh b/clean-log.sh new file mode 100755 index 0000000..17ca209 --- /dev/null +++ b/clean-log.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Use this sed script to clean your logs before +# pasting it publicly + +# Usage: +# Replace `your_username` and `your_domain` in this script, then: +# +# ./clean-log.sh LOGFILE + +# Todo: +# - IPs (should be already cleaned by rsyslog) +# - Browser user agents +# - Generate this script from leap_cli + + +sed -r ' +# Clean all email addresses +s/((\w|[.])+)@((\w|[.])+)/<EMAIL REDACTED>/g + +# Replace username +s/your_username/<USERNAME_REDACTED>/g + +#Replace domain +s/your_domain/<DOMAIN_REDACTED>/g +' "$1" |