I have an issue I hope someone can help with (as frankly, my network-fu is pretty weak).
I have a program sending data on a TCP port at localhost. I need to be able to read that data. Is anyone familiar with an application which can:
1) Open and listen to the localhost port.
2) Preferably display the data in hexadecimal
3) Display a timestamp for each packet of the incoming data
4) Record the data (or alternatively dump it to the screen and allow copy-pasting), inlcuding the timestamp.
Thanks!
Technical question - reading data from TCP port
Moderator: Thanas
- Ace Pace
- Hardware Lover
- Posts: 8456
- Joined: 2002-07-07 03:04am
- Location: Wasting time instead of money
- Contact:
Re: Technical question - reading data from TCP port
Netcan to open the port and display the data, wireshark to sniff it. As far as I am aware, wireshark can't open a socket on it's own.
Brotherhood of the Bear | HAB | Mess | SDnet archivist |
Re: Technical question - reading data from TCP port
tcpdump doesn't give a GUI or which makes it more difficult for me. As for netsniff, it's for Linux; I forgot to mention that I need it to work in a Windows 7 64-bit environment.
I can view the data with Netscan (although not in hex, so it looks like gibberish) - can you point me to an explenation of how to get wireshark to see it? I can't seem to figure out how to set it up...Ace Pace wrote:Netcan to open the port and display the data, wireshark to sniff it. As far as I am aware, wireshark can't open a socket on it's own.
Thanks
- Ace Pace
- Hardware Lover
- Posts: 8456
- Joined: 2002-07-07 03:04am
- Location: Wasting time instead of money
- Contact:
Re: Technical question - reading data from TCP port
netcat, not netscan.eyl wrote:I can view the data with Netscan (although not in hex, so it looks like gibberish) - can you point me to an explenation of how to get wireshark to see it? I can't seem to figure out how to set it up...Ace Pace wrote:Netcan to open the port and display the data, wireshark to sniff it. As far as I am aware, wireshark can't open a socket on it's own.
Thanks
To listen to a port and write the results to a file
ncat -l 1234 > blah.bin
If you want to display to screen (doubtful) just remove the > blah.bin.
To get wireshark to see it, apply the following filter.
tcp.port eq 1234
Do note that if you are connecting two network programs locally (I.E your own address, be it localhost or your own IP) then wireshark will not see it. But if it travels over the wire(or wifi), it'll pick it up.
If you're having trouble finding ncat for windows, this link should set you up. I just used it.
Brotherhood of the Bear | HAB | Mess | SDnet archivist |