1

I wondered how to get URL destination like Sniffer/Wireshark/Proxifier does on VB.net

so, the application detects all destination URL from all applications running on Windows, and output it into listbox on VB.net

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59

1 Answers1

0

You can use System.Net.NetworkInformation.IPGlobalProperties object to retrieve all existing connections:

Private Sub list_active_connections()
    Dim _IPGlobalProperties As System.Net.NetworkInformation.IPGlobalProperties = System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties()
    For Each conn As System.Net.NetworkInformation.TcpConnectionInformation In _IPGlobalProperties.GetActiveTcpConnections
        ListBox1.Items.Add(conn.RemoteEndPoint.ToString)
    Next
End Sub
Andrea
  • 11,801
  • 17
  • 65
  • 72
  • Thanks for the solve :D . but how to get the domain than the IP Destination if available :D – faisalakbar Nov 05 '14 at 05:18
  • @faisalakbar You could try with `Dns.GetHostEntry` (see [this](http://stackoverflow.com/questions/3252845/how-to-get-domain-name-from-given-ip-in-c) answer) – Andrea Nov 05 '14 at 07:41