reading another applications data (coming thru a port) at OS level (socket prog)
I am pradeep and my friend is doing a project.. we are stuck up here:
My friend's software is going to do a port scan, and determine when XYZ application opens a port. When a port opens, our software also connects to that port and copies all incoming data into a file.
Question is, is this possible directly with the BSD or Winsock API?
We have thought of other approaches, such as using libcap to copy packets from the network card. But thats a great deal of job to be done.
We have also seen a program: tcpflow which creates files for incoming data on all ports.
However, we would like to have a solution by which we can directly copy data from a port at programming level.
Kindly tell us if this is possible at all.
Maybe I should tell you why we need this: our software is going to be a APPLICATION INDEPENDENT DOWNLOAD RESUMER. This means that, it is going to add download resume support for any software which downloads or updates from the internet (different softwares use different port numbers).
Another thought was to firewall ports. When some application connects out of a port, we will send and receive for it and thus achieve the desired result.
Hmm hope it makes some sense
Thanks for ur time! Awaiting your comments/answers
With best regards,
Pradeep

