aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/tools
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-09-27 16:25:16 -0500
committerJesús <heckyel@hyperbola.info>2021-09-27 16:25:16 -0500
commit0b0369524a0e5a56c93206f0847d1c4711d0b372 (patch)
tree8e06c03f1ac151e17952c97832f9313203014757 /hyperterm/tools
parent2e507a2d2fe6672bc72a735d0b8fd548bac2eee8 (diff)
downloadhyperterm-0b0369524a0e5a56c93206f0847d1c4711d0b372.tar.lz
hyperterm-0b0369524a0e5a56c93206f0847d1c4711d0b372.tar.xz
hyperterm-0b0369524a0e5a56c93206f0847d1c4711d0b372.zip
network: usage only IPv4 to ISP
Diffstat (limited to 'hyperterm/tools')
-rw-r--r--hyperterm/tools/network.sh7
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")}"
}