low level networking in python

Maxim Veksler hq4ever at gmail.com
Tue Apr 3 11:29:23 EDT 2007


Hello,

I wish to do some low level network stuff using python.

I've googled somewhat and came up with pylibpcap[1], trouble is I
can't compile it on my Ubuntu 6.10 workstation. Can someone please
suggest a way to read some bits from random ports? I'm looking to
write a simple pen-testing tool that would try from one side
connecting to ports and from the other side sniff traffic to see on
what ports traffic is coming.

For pylibpcap I'm getting:

"""
hq4ever at lucky:~/development/personal/pylibpcap/pylibpcap-0.5.1$ python
setup.py build
running build
running build_ext
building '_pcapmodule' extension
swig -python -shadow -ISWIG -o pcap.c pcap.i
pcap.i:72: Warning(124): Specifying the language name in %typemap is
deprecated - use #ifdef SWIG<LANG> instead.
pcap.i:77: Warning(124): Specifying the language name in %typemap is
deprecated - use #ifdef SWIG<LANG> instead.
pcap.i:82: Warning(124): Specifying the language name in %typemap is
deprecated - use #ifdef SWIG<LANG> instead.
/usr/bin/python ./build-tools/docify.py pcap.c
/usr/bin/python ./build-tools/docify-shadow.py pcap.py
Traceback (most recent call last):
  File "./build-tools/docify-shadow.py", line 30, in ?
    raise 'source file doesn\'t look like swigged shadow class code'
source file doesn't look like swigged shadow class code
error: command '/usr/bin/python' failed with exit status 1
"""

[1] http://pylibpcap.sourceforge.net/
[2] http://py.vaults.ca/apyllo.py/126307487

-- 
Cheers,
Maxim Veksler

"Free as in Freedom" - Do u GNU ?



More information about the Python-list mailing list