Created
March 2, 2022 03:19
-
-
Save zulhfreelancer/4e10c862b9bb039b1284faf45504f1c6 to your computer and use it in GitHub Desktop.
Bash one-liner script to get current ISP name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Method #1 | |
whois $(whois $(curl -s icanhazip.com) | grep origin | awk '{print $2}') | grep -i descr | cut -d: -f2- | tail -n1 | xargs | |
# Method #2 | |
whois $(whois $(curl -s icanhazip.com) | grep origin | awk '{print $2}') | grep -i 'org-name\|orgname' | cut -d: -f2- | tail -n1 | xargs | |
# Method #3 | |
whois $(curl -s icanhazip.com) | grep -i 'org-name\|orgname' | cut -d: -f2- | tail -n1 | xargs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment