Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
- curl ipinfo.io/ip
- $ wget -qO- http://ipecho.net/plain ; echo
- $ curl ipecho.net/plain
- $ curl ipecho.net/plain ; echo
- $ dig +short myip.opendns.com @resolver1.opendns.com
- 111.222.333.444
- $ LANG=c ifconfig <interface_name> | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'
- $ LANG=c ifconfig ppp0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'
- 111.222.333.444
- $ LANG=c ifconfig | grep -B1 "inet addr" |awk '{ if ( $1 == "inet" ) { print $2 } else if ( $2 == "Link" ) { printf "%s:" ,$1 } }' |awk -F: '{ print $1 ": " $3 }'
- $ LANG=c ifconfig | grep -B1 "inet addr" |awk '{ if ( $1 == "inet" ) { print $2 } else if ( $2 == "Link" ) { printf "%s:" ,$1 } }' |awk -F: '{ print $1 ": " $3 }'
- lo: 127.0.0.1
- ppp0: 111.222.333.444
- curl ifconfig.me
- curl icanhazip.com
- curl ipecho.net
- curl icanhazip.com
- curl ipv4.icanhazip.com
- wget -qO- icanhazip.com
- curl ident.me
- curl v4.ident.me
- curl v6.ident.me
- $ dig +short myip.opendns.com @resolver1.opendns.com
- wget -O - -q icanhazip.com
- curl http://checkip.amazonaws.com
- 123.123.123.123
- $ telnet ipecho.net 80
- Trying 146.255.36.1...
- Connected to ipecho.net.
- Escape character is '^]'.
- GET /plain HTTP/1.1
- HOST: ipecho.net
- BROWSER: web-kit
- HTTP/1.1 200 OK
- Date: Tue, 02 Jul 2013 07:11:42 GMT
- Server: Apache
- Expires: Mon, 26 Jul 1997 05:00:00 GMT
- Cache-Control: no-cache
- Pragma: no-cache
- Vary: Accept-Encoding
- Transfer-Encoding: chunked
- Content-Type: text/html
- f
- 111.222.333.444
- 0
- curl ipecho.net/plain
- $stunclient stun.services.mozilla.com
- Binding test: success
- Local address: A.B.C.D:42541
- Mapped address: W.X.Y.Z:42541
- stunclient stun.services.mozilla.com |
- sed -n -e "s/^Mapped address: (.*):.*$/1/p"
- $echo -en 'x00x01x00x08xc0x0cxeex42x7cx20x25xa3x3fx0fxa1x7fxfdx7fx00x00x00x03x00x04x00x00x00x00' |
- nc -u -w 2 stun.services.mozilla.com 3478 |
- dd bs=1 count=4 skip=28 2>/dev/null |
- hexdump -e '1/1 "%u."' |
- sed 's/.$/n/'
- telnet myip.gelma.net
- Your IPv4: xxx.xxx.xxx.xxx
- Your IPv6: ::ffff:xxxx:xxxx
- $ exec 3<> /dev/tcp/icanhazip.com/80 && # open connection
- echo 'GET /' >&3 && # send http 0.9 request
- read -u 3 && echo $REPLY && # read response
- exec 3>&- # close fd
- curl ipv4.ipogre.com
- curl ipv6.ipogre.com
- import urllib, urllib2, cookielib
- import re
- from subprocess import check_output as co
- cookie_jar = cookielib.CookieJar()
- opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar))
- urllib2.install_opener(opener)
- def get(url, values=None):
- data = None
- if values: data = urllib.urlencode(values)
- req = urllib2.Request(url, data)
- rsp = urllib2.urlopen(req)
- return rsp.read()
- router = co(['ip', '-o', 'ro', 'list', '0.0.0.0/0']).split()[2]
- url = "http://" + router
- get(url+"/index.asp")
- get(url+"/LoginCheck", dict(checkEn='0', Username='admin', Password='admin'))
- page = get(url+"/system_status.asp")
- for line in page.split("n"):
- if line.startswith("wanIP = "):
- print line.split('"')[1]
- exit(1)
- ifconfig
- ifconfig | grep inet
- ip addr show
- hostname -I
- wget http://smart-ip.net/myip -O - -q ; echo
- curl http://smart-ip.net/myip
- lynx bot.whatismyipaddress.com
- curl "http://fritz.box:49000/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" -d "<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:GetExternalIPAddress xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>" -s
- grep -Eo '<[[:digit:]]{1,3}(.[[:digit:]]{1,3}){3}>'
- curl -s 192.168.1.1 | grep "ipinfo" | awk -v FS="(IP: |</span)" '{print $2}'
- curl -s -u your_ddwrt_username:your_ddwrt_password http://192.168.1.1 | grep "ipinfo" | awk -v FS="(IP: |</span)" '{print $2}'
- ip addr show
- sudo traceroute -I google.com
- user@user-PC ~ $ sudo traceroute -I google.com
- traceroute to google.com (173.194.46.104), 30 hops max, 60 byte packets
- 1 25.0.8.1 (25.0.8.1) 230.739 ms 231.416 ms 237.819 ms
- 2 199.21.149.1 (199.21.149.1) 249.136 ms 250.754 ms 253.994 ms**
- sudo traceroute -I google.com | awk -F '[ ]' '{ if ( $2 ="2" ) { print $5 } }'
- (199.21.149.1)
- echo $(ip route get 8.8.8.8 | awk '{print $NF; exit}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement