sniffer in python

billiejoex billiejoex at fastwebnet.it
Mon Aug 15 08:51:10 EDT 2005


Thank you for your fast reply. You're right. I'll be more specific, sorry.
The example source is the one you can find on the 'Impacket' page on the 
same site of pcapy:
http://oss.coresecurity.com/impacket/sniff.py
I use a Win XP prof sp2 system, python ver. 2.4.1.
Here's the output:

C:\Python24>1.py
Traceback (most recent call last):
File "C:\Python24\1.py", line 107, in ?
main(filter)
File "C:\Python24\1.py", line 88, in main
dev = getInterface()
File "C:\Python24\1.py", line 81, in getInterface
print '%i - %s' % (count, iface)
File "C:\Python23\lib\encodings\cp850.py", line 18, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode characters in position 
4-19: ch
aracter maps to <undefined>




>> For python exist a porting called pcapy:
>> http://oss.coresecurity.com/projects/pcapy.html
>> ...that I'd like to use BUT... all the examples reported on the sites 
>> don't works!!
>
> It usually helps to describe *in what way* things don't work.
>
> Do they crash?  If so, provide the full traceback.
>
> Do they not install?  If so, provide error messages.
>
> Do they appear to run but without visible signs of activity?  If so, say 
> so... and describe exactly what options you were using, what platform and 
> version of platform, Python, and library you are using, and any other 
> conditions relevant to the situation.
>
> Help us help you...
>
> (Alternative suggestion: use whatever mailing list is provided for that 
> specific project, if there is one, so you get access to more people with 
> direct knowledge of what might go wrong.)
>
> -Peter 





More information about the Python-list mailing list