diff options
Diffstat (limited to 'hyperterm/tools')
-rw-r--r-- | hyperterm/tools/network.sh | 7 |
1 files changed, 4 insertions, 3 deletions
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")}" } |