From 9d2c11f38f8c9f18682446105fcb216ce8ef612a Mon Sep 17 00:00:00 2001 From: Nils Steinger Date: Fri, 7 Apr 2017 16:24:40 +0200 Subject: [PATCH] Redact host part of IP addresses --- nench.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nench.sh b/nench.sh index 5f952db..66f98b4 100755 --- a/nench.sh +++ b/nench.sh @@ -139,7 +139,7 @@ ipv4=$(curl -4 -s --max-time 5 http://icanhazip.com/) if [ -n "$ipv4" ] then printf 'IPv4 speedtests\n' - printf ' your IPv4: %s\n' $ipv4 + printf ' your IPv4: %s\n' $(printf '%s\n' $ipv4 | sed 's!\(\([0-9a-f]\+[.:]\)\{3\}\).\+!\1xxxx!') printf '\n' printf ' Cachefly CDN: ' @@ -172,7 +172,7 @@ ipv6=$(curl -6 -s --max-time 5 http://icanhazip.com/) if [ -n "$ipv6" ] then printf 'IPv6 speedtests\n' - printf ' your IPv6: %s\n' $ipv6 + printf ' your IPv6: %s\n' $(printf '%s\n' $ipv6 | sed 's!\(\([0-9a-f]\+[.:]\)\{3\}\).\+!\1xxxx!') printf '\n' printf ' Leaseweb (NL): '