pylibpcap for Win32?

Gerhard Häring gh at ghaering.de
Fri Mar 21 23:49:32 CET 2003


Grant Edwards wrote:
> In article <b5fv6u$e5a$1 at scotsman.ed.ac.uk>, Eddie Corns wrote:
> 
>>>have to learn C programming under Win32, it's probably less
>>>work to just read the packets in Python...
>>
>>I recently used wpcap.dll (the win32 pre compiled version of
>>libpcap) [...]

I just installed WinPcap 3.0 beta.

> After looking at include files for libpcap, it turns out the
> file format is very simple, and I've got already got Python
> code that can read the packets. 

If you want pylibpcap on Windows a try, I've done a quick port:

http://www.ghaering.de/python/unsupported/pylibpcap/

  pylibpcap-0.4.win32-py2.2.exe 21-Mar-2003 23:41    41k
  pylibpcap_win32.dif           21-Mar-2003 23:42     4k

The 'unsupported' should be obvious enough in how much I can support 
this port - I don't currently use pylibpcap.

The findall.py example seems to run, though, enumerating the network 
adapters.

> Gotta love Python...

mingw + distutils helped me make this port in about half an hour :-)

I'll check if the sniff.py example will work, too.

-- Gerhard





More information about the Python-list mailing list