Skip to content

Instantly share code, notes, and snippets.

@eshizhan
Last active July 13, 2016 08:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save eshizhan/6099298 to your computer and use it in GitHub Desktop.
show your public ip and location
#!/bin/bash
# get your public ip
curl ip.3322.net
curl api.ipify.org
curl www.trackip.net/ip
curl canihazip.com/s
curl icanhazip.com
curl ns1.dnspod.net:6666
curl ifconfig.me
curl members.3322.org/dyndns/getip
curl -s httpbin.org/ip | grep -oP '(?<="origin": ").+?(?=")'
curl -s ip4.me | grep -oP '(?<=size=\+3>).+?(?=</font>)'
curl -s ip6.me | grep -oP '(?<=size=\+3>).+?(?=</font>)'
# get your public ip and location
curl ip.zishuo.net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment