python win32 and COM? for internet monitoring

M

Matthew Thorley

Greetings, I have a question I hope some one with more back ground can
give me a little help with.

I want to write a simple internet monitoring script for windows that
watches out bound http traffic and keeps a list of all the site visited.

I am thinking that I might be able to use pywin32 and COM to listen on
open ports (e.g. 80) and watch for http headers. But I'm not sure if
there is a better way to do it.

I would eventualy like to port this to Mac and Linux, but I figured that
networking was at a low enough that I would have to do it differently
for each OS.

Could some one please tell me if I'm way off and point me in the right
direction?

Thanks very much
--Matthew
 
G

Graham Fawcett

Matthew said:
Greetings, I have a question I hope some one with more back ground can
give me a little help with.

I want to write a simple internet monitoring script for windows that
watches out bound http traffic and keeps a list of all the site visited.

I am thinking that I might be able to use pywin32 and COM to listen on
open ports (e.g. 80) and watch for http headers. But I'm not sure if
there is a better way to do it.

You might want to look into PCAP (a.k.a libpcap), which is the
network-sniffing libary used by Ethereal, among other programs. Much
more portable than COM, and there are Python wrappers for it, IIRC.

You could also implement an HTTP proxy server in Python; Google should
turn up numerous existing implementations.

Graham
 
M

Matthew Thorley

Graham said:
You might want to look into PCAP (a.k.a libpcap), which is the
network-sniffing libary used by Ethereal, among other programs. Much
more portable than COM, and there are Python wrappers for it, IIRC.

You could also implement an HTTP proxy server in Python; Google should
turn up numerous existing implementations.

Graham

Thanks for the tip, I'll check that out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top