Advertisement
Guest User

Untitled

a guest
Apr 14th, 2017
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
  2.  
  3. curl ipinfo.io/ip
  4.  
  5. $ wget -qO- http://ipecho.net/plain ; echo
  6.  
  7. $ curl ipecho.net/plain
  8.  
  9. $ curl ipecho.net/plain ; echo
  10.  
  11. $ dig +short myip.opendns.com @resolver1.opendns.com
  12.  
  13. 111.222.333.444
  14.  
  15. $ LANG=c ifconfig <interface_name> | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'
  16.  
  17. $ LANG=c ifconfig ppp0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'
  18. 111.222.333.444
  19.  
  20. $ 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 }'
  21.  
  22. $ 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 }'
  23. lo: 127.0.0.1
  24. ppp0: 111.222.333.444
  25.  
  26. curl ifconfig.me
  27.  
  28. curl icanhazip.com
  29.  
  30. curl ipecho.net
  31.  
  32. curl icanhazip.com
  33.  
  34. curl ipv4.icanhazip.com
  35.  
  36. wget -qO- icanhazip.com
  37.  
  38. curl ident.me
  39. curl v4.ident.me
  40. curl v6.ident.me
  41.  
  42. $ dig +short myip.opendns.com @resolver1.opendns.com
  43.  
  44. wget -O - -q icanhazip.com
  45.  
  46. $ telnet ipecho.net 80
  47. Trying 146.255.36.1...
  48. Connected to ipecho.net.
  49. Escape character is '^]'.
  50. GET /plain HTTP/1.1
  51. HOST: ipecho.net
  52. BROWSER: web-kit
  53.  
  54. HTTP/1.1 200 OK
  55. Date: Tue, 02 Jul 2013 07:11:42 GMT
  56. Server: Apache
  57. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  58. Cache-Control: no-cache
  59. Pragma: no-cache
  60. Vary: Accept-Encoding
  61. Transfer-Encoding: chunked
  62. Content-Type: text/html
  63.  
  64. f
  65. 111.222.333.444
  66. 0
  67.  
  68. curl http://checkip.amazonaws.com
  69.  
  70. 123.123.123.123
  71.  
  72. curl ipecho.net/plain
  73.  
  74. telnet myip.gelma.net
  75.  
  76. Your IPv4: xxx.xxx.xxx.xxx
  77. Your IPv6: ::ffff:xxxx:xxxx
  78.  
  79. $stunclient stun.services.mozilla.com
  80. Binding test: success
  81. Local address: A.B.C.D:42541
  82. Mapped address: W.X.Y.Z:42541
  83.  
  84. stunclient stun.services.mozilla.com |
  85. sed -n -e "s/^Mapped address: (.*):.*$/1/p"
  86.  
  87. $echo -en 'x00x01x00x08xc0x0cxeex42x7cx20x25xa3x3fx0fxa1x7fxfdx7fx00x00x00x03x00x04x00x00x00x00' |
  88. nc -u -w 2 stun.services.mozilla.com 3478 |
  89. dd bs=1 count=4 skip=28 2>/dev/null |
  90. hexdump -e '1/1 "%u."' |
  91. sed 's/.$/n/'
  92.  
  93. $ exec 3<> /dev/tcp/icanhazip.com/80 && # open connection
  94. echo 'GET /' >&3 && # send http 0.9 request
  95. read -u 3 && echo $REPLY && # read response
  96. exec 3>&- # close fd
  97.  
  98. curl ipv4.ipogre.com
  99.  
  100. curl ipv6.ipogre.com
  101.  
  102. import urllib, urllib2, cookielib
  103. import re
  104. from subprocess import check_output as co
  105.  
  106. cookie_jar = cookielib.CookieJar()
  107. opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar))
  108. urllib2.install_opener(opener)
  109.  
  110. def get(url, values=None):
  111. data = None
  112. if values: data = urllib.urlencode(values)
  113. req = urllib2.Request(url, data)
  114. rsp = urllib2.urlopen(req)
  115. return rsp.read()
  116.  
  117. router = co(['ip', '-o', 'ro', 'list', '0.0.0.0/0']).split()[2]
  118. url = "http://" + router
  119.  
  120. get(url+"/index.asp")
  121. get(url+"/LoginCheck", dict(checkEn='0', Username='admin', Password='admin'))
  122. page = get(url+"/system_status.asp")
  123.  
  124. for line in page.split("n"):
  125. if line.startswith("wanIP = "):
  126. print line.split('"')[1]
  127. exit(1)
  128.  
  129. ifconfig
  130.  
  131. ifconfig | grep inet
  132.  
  133. ip addr show
  134.  
  135. hostname -I
  136.  
  137. wget http://smart-ip.net/myip -O - -q ; echo
  138.  
  139. curl http://smart-ip.net/myip
  140.  
  141. lynx bot.whatismyipaddress.com
  142.  
  143. ip addr show
  144.  
  145. 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
  146.  
  147. grep -Eo '<[[:digit:]]{1,3}(.[[:digit:]]{1,3}){3}>'
  148.  
  149. curl -s 192.168.1.1 | grep "ipinfo" | awk -v FS="(IP: |</span)" '{print $2}'
  150.  
  151. curl -s -u your_ddwrt_username:your_ddwrt_password http://192.168.1.1 | grep "ipinfo" | awk -v FS="(IP: |</span)" '{print $2}'
  152.  
  153. echo $(ip route get 8.8.8.8 | awk '{print $NF; exit}')
  154.  
  155. sudo traceroute -I google.com
  156.  
  157. user@user-PC ~ $ sudo traceroute -I google.com
  158. traceroute to google.com (173.194.46.104), 30 hops max, 60 byte packets
  159. 1 25.0.8.1 (25.0.8.1) 230.739 ms 231.416 ms 237.819 ms
  160. 2 199.21.149.1 (199.21.149.1) 249.136 ms 250.754 ms 253.994 ms**
  161.  
  162. sudo traceroute -I google.com | awk -F '[ ]' '{ if ( $2 ="2" ) { print $5 } }'
  163.  
  164. (199.21.149.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement