views:

24

answers:

2

Hi

I would like to make a small program listing running programs on my computer - this seems simple. But I would also like to detect their connections, ex.: I detect a running Internet Explorer (or other browser), but I would like to know which websites it is visiting. Another example; I detect Word is running, and would like to know what document(s) it is working with. Is it possible to query the http- protocol to discover online connections? And how about programs that open local resources? So, listing running programs and their connections is what I want to do - and do I have to poll for it every minute or is there better ways of watching these processes?

It must be able to run on MS Windows, but the programminglanguage is not important

Thanx

Ask

A: 

You might want to consider some of the pre-existing tools capable of doing this. Both Windows NT and most Unixes come with the "netstat" command.

Windows NT: netstat -b

Unix: netstat -p

Nick Meyer
right... But I need to format it nicely since it will be shown to "normal" people. Thus a list of ip-numbers, ports and apps wont be enough. But programs and their connections can be fetched from the "netstat"? Sounds good. How about what documents are open in i.e. MSWord?
Ah, yes. If you're interested in more than just network connections, then netstat won't do it. Try Peter's suggestion of Process Monitor. If your concerned about nice formatting, you might see if it can export data in the format you require; but I think it can do most of what you want and might save you from reinventing the wheel.
Nick Meyer
A: 

I like using Process Monitor. Find it here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Peter Mourfield