Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
124
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. curl http://checkip.amazonaws.com
  47.  
  48. 123.123.123.123
  49.  
  50. $ telnet ipecho.net 80
  51. Trying 146.255.36.1...
  52. Connected to ipecho.net.
  53. Escape character is '^]'.
  54. GET /plain HTTP/1.1
  55. HOST: ipecho.net
  56. BROWSER: web-kit
  57.  
  58. HTTP/1.1 200 OK
  59. Date: Tue, 02 Jul 2013 07:11:42 GMT
  60. Server: Apache
  61. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  62. Cache-Control: no-cache
  63. Pragma: no-cache
  64. Vary: Accept-Encoding
  65. Transfer-Encoding: chunked
  66. Content-Type: text/html
  67.  
  68. f
  69. 111.222.333.444
  70. 0
  71.  
  72. curl ipecho.net/plain
  73.  
  74. $stunclient stun.services.mozilla.com
  75. Binding test: success
  76. Local address: A.B.C.D:42541
  77. Mapped address: W.X.Y.Z:42541
  78.  
  79. stunclient stun.services.mozilla.com |
  80. sed -n -e "s/^Mapped address: (.*):.*$/1/p"
  81.  
  82. $echo -en 'x00x01x00x08xc0x0cxeex42x7cx20x25xa3x3fx0fxa1x7fxfdx7fx00x00x00x03x00x04x00x00x00x00' |
  83. nc -u -w 2 stun.services.mozilla.com 3478 |
  84. dd bs=1 count=4 skip=28 2>/dev/null |
  85. hexdump -e '1/1 "%u."' |
  86. sed 's/.$/n/'
  87.  
  88. telnet myip.gelma.net
  89.  
  90. Your IPv4: xxx.xxx.xxx.xxx
  91. Your IPv6: ::ffff:xxxx:xxxx
  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. 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
  144.  
  145. grep -Eo '<[[:digit:]]{1,3}(.[[:digit:]]{1,3}){3}>'
  146.  
  147. curl -s 192.168.1.1 | grep "ipinfo" | awk -v FS="(IP: |</span)" '{print $2}'
  148.  
  149. curl -s -u your_ddwrt_username:your_ddwrt_password http://192.168.1.1 | grep "ipinfo" | awk -v FS="(IP: |</span)" '{print $2}'
  150.  
  151. ip addr show
  152.  
  153. sudo traceroute -I google.com
  154.  
  155. user@user-PC ~ $ sudo traceroute -I google.com
  156. traceroute to google.com (173.194.46.104), 30 hops max, 60 byte packets
  157. 1 25.0.8.1 (25.0.8.1) 230.739 ms 231.416 ms 237.819 ms
  158. 2 199.21.149.1 (199.21.149.1) 249.136 ms 250.754 ms 253.994 ms**
  159.  
  160. sudo traceroute -I google.com | awk -F '[ ]' '{ if ( $2 ="2" ) { print $5 } }'
  161.  
  162. (199.21.149.1)
  163.  
  164. echo $(ip route get 8.8.8.8 | awk '{print $NF; exit}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement