I'm trying to duplicate a program's feature, but have it perform a different set of tasks.
What's going on is that Program A is communicating to Program B, which is typically performed over a closed LAN (you push a button in Program A - Program B changes the state of a the appropriate label, which is NOT it's only function/purpose). Program B IS receiving instructions from Program A.
If I use Micro$oft's TCPView, there is a connection between the two.
However, and for whatever reason, neither Wireshark nor Micro$oft Network Monitor 3.4 are showing ANY traffic between the two programs, even with all filters disabled.
I'm wanting to capture the data-stream between the two for analysis because it's supposedly using a proprietary protocol. Soooo, I wrote a quickie set of instructions to aid me in that with my program, but it's throwing an exception 10048 error ("Only one usage of each socket address (protocol/network address/port) is normally permitted"). I've turned on the service Net.TCP, and still get this error.
TCPView reports...
Program A:
Remote Port: 9000
Local Port: 3822
Program B:
Remote Port: 3822
Local Port: 9000
My computer is on 192.168.1.174, if that helps any.
I know it should be possible to passively listen in on this, I just don't know how to do it.
Anyone have a better solution?
Thanks,
-Shooter
What's going on is that Program A is communicating to Program B, which is typically performed over a closed LAN (you push a button in Program A - Program B changes the state of a the appropriate label, which is NOT it's only function/purpose). Program B IS receiving instructions from Program A.
If I use Micro$oft's TCPView, there is a connection between the two.
However, and for whatever reason, neither Wireshark nor Micro$oft Network Monitor 3.4 are showing ANY traffic between the two programs, even with all filters disabled.
I'm wanting to capture the data-stream between the two for analysis because it's supposedly using a proprietary protocol. Soooo, I wrote a quickie set of instructions to aid me in that with my program, but it's throwing an exception 10048 error ("Only one usage of each socket address (protocol/network address/port) is normally permitted"). I've turned on the service Net.TCP, and still get this error.
TCPView reports...
Program A:
Remote Port: 9000
Local Port: 3822
Program B:
Remote Port: 3822
Local Port: 9000
My computer is on 192.168.1.174, if that helps any.
I know it should be possible to passively listen in on this, I just don't know how to do it.
Anyone have a better solution?
vb.net Code:
Imports System Imports System.Xml Imports System.IO Imports System.Net Imports System.Net.Sockets Imports System.Text Imports Microsoft.VisualBasic Dim listener As Net.Sockets.TcpListener Dim listenThread As Threading.Thread Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Other code for different form calls here listener = New Net.Sockets.TcpListener(Net.IPAddress.Any, 9000) listener.Start() listenThread = New Threading.Thread(AddressOf DoListen) listenThread.IsBackground = True listenThread.Start() End Sub Private Sub DoListen() Dim sr As IO.StreamReader Do Try Dim client As Net.Sockets.TcpClient = listener.AcceptTcpClient sr = New IO.StreamReader(client.GetStream) MessageBox.Show(sr.ReadToEnd) sr.Close() Catch ex As Exception MessageBox.Show(ex.Message) End Try Loop End Sub
Thanks,
-Shooter