Solved

Passive listening on a port using raw sockets

Posted on 2004-04-19
5
947 Views
Last Modified: 2008-03-06
Hello,

I want to be able to passively listen to a port on my computer which is already in use by a program.
I'm not allowed to interfear with the traffic going on the port, but I want to see all incomming traffic on the port.

It has to be "real time". I can't afford to miss any information coming in on the port.

0
Comment
Question by:gaborone
  • 3
5 Comments
 
LVL 7

Expert Comment

by:fim32
ID: 10864720
what operating system?

you just want a sniffer.  any sniffer will do.

if you're using a unix variant, they usually come with one, like 'snoop' for solaris or 'tcpdump' on linux/bsd...
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10865857
using a sniffer such as tcpdump or ethereal is one option and if you wish to do it programatically on your own then
1. either add your code to the network stack and get a packet there
2. If you are on linux or similar machine, use libipq to get packets which you want ... I am not sure if windows has such a thing to offer
0
 

Author Comment

by:gaborone
ID: 10872276
Unfortunately I'm on a windows machine, so I have to go from there.

I need to parse the data for information as well, so i can't use an existing program if i can't modify it.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10875433
this should do it
http://windump.polito.it/
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 300 total points
ID: 10875438
and if you still want to do it programatically, look into the winpcap library
http://winpcap.polito.it/
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now