From 0b0369524a0e5a56c93206f0847d1c4711d0b372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Mon, 27 Sep 2021 16:25:16 -0500 Subject: network: usage only IPv4 to ISP --- hyperterm/tools/network.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hyperterm/tools') diff --git a/hyperterm/tools/network.sh b/hyperterm/tools/network.sh index 6a2325f..132b090 100644 --- a/hyperterm/tools/network.sh +++ b/hyperterm/tools/network.sh @@ -1,8 +1,9 @@ #!/bin/bash function __network() { unset MY_IP - : "${MY_IP:=$(ip route show table local | awk -F "local" '{print $2}' | uniq)}" - unset MY_ISP - : "${MY_ISP:=$(host whoami.akamai.net. ns1-1.akamaitech.net. | grep "whoami.akamai.net has" | awk '{print $4}')}" + local ipv4 + ipv4=$(curl -fsSL https://v4.myip.vc/flat) + : "${MY_IP:=$(ip route show table local | awk -F "local" '{print $2}' | uniq)}" + : "${MY_ISP:=$(printf '%s\e[1;36m%s\e[m\n' 'IPv4: ' "$ipv4")}" } -- cgit v1.2.3