diff options
-rwxr-xr-x[-rw-r--r--] | clean-log.sh (renamed from clean-log.sed) | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/clean-log.sed b/clean-log.sh index f1e6e26..17ca209 100644..100755 --- a/clean-log.sed +++ b/clean-log.sh @@ -1,18 +1,26 @@ +#!/bin/sh + # Use this sed script to clean your logs before # pasting it publicly # Usage: -# sed -r -f clean-log.sed LOGFILE +# 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/varac/<USERNAME_REDACTED>/g +s/your_username/<USERNAME_REDACTED>/g #Replace domain -s/wazokazi.is/<DOMAIN_REDACTED>/g +s/your_domain/<DOMAIN_REDACTED>/g +' "$1" |