Jump to content

cbox


Recommended Posts

Posted (edited)
-------------
External IP
-------------

Try
Dim WC As New System.Net.WebClient
MsgBox(System.Text.Encoding.ASCII.GetString(WC.DownloadData("http://www.swlink.net/~styma/REMOTE_ADDR.shtml")))
MsgBox(System.Text.Encoding.ASCII.GetString(WC.DownloadData("http://whatismyip.com/automation/n09230945.asp")))
WC.Dispose()
Catch
'Display Error Message
End Try


-------------
Internal IP
-------------

Try
Dim ipEntry As System.Net.IPHostEntry = Net.Dns.GetHostEntry(Environment.MachineName)
Dim IpAddr As System.Net.IPAddress() = ipEntry.AddressList
MsgBox(IpAddr(0).ToString())
Catch
'Display Error Message
End Try


---------------
Address to IP
---------------

If Not T2.Text = "" Then
Try
ipE = Dns.GetHostEntry(T2.Text)
Catch
MessageBoxEx.Show("Site does not exist!", "DoS", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try

Dim IpA() As IPAddress = ipE.AddressList
TX.Text = IpA(0).ToString
End If

Edited by iBotPeaches
  • Like 1
Posted
Only way I knew how to do it.

 

You can dump the output of ipconfig in cmd, and display it that way too, but people won't understand it.

 

Do a tutorial on that ;) I wanted to look up displaying cmd outputs, got too lazy...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...