From eb3a284d551a1d7259834fe6ca9d9390c545dcff Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 21 Feb 2017 11:46:56 +0100 Subject: Use schell script for anonymizing logs --- clean-log.sed | 18 ------------------ clean-log.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) delete mode 100644 clean-log.sed create mode 100755 clean-log.sh diff --git a/clean-log.sed b/clean-log.sed deleted file mode 100644 index f1e6e26..0000000 --- a/clean-log.sed +++ /dev/null @@ -1,18 +0,0 @@ -# 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|[.])+)//g - -# Replace username -s/varac//g - -#Replace domain -s/wazokazi.is//g 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|[.])+)//g + +# Replace username +s/your_username//g + +#Replace domain +s/your_domain//g +' "$1" -- cgit v1.2.3