Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Does any1 use pcapy module on win32 platforms?

Reply
Thread Tools

Does any1 use pcapy module on win32 platforms?

 
 
billiejoex
Guest
Posts: n/a
 
      08-26-2005
Hi. I'm trying to use pcapy module on Windows XP prof sp2 but it doesn't
work.
The example source reported on the site
(http://oss.coresecurity.com/impacket/sniff.py) works only on *unix
machines.
On Windows machines the findalldevs() function (an output on the bottom)
gives an unicode object that can't be processed by open_live function
that tipically accept strings.
This not happens on linux machines where findalldev() function gives a
string object that can be quietly accepted by open_live.
Does exist a patch to fix this bug? I really would like to write a portable
program usable in both platforms.
Maybe do can I process the unicode outputs and converting them into valid
strings?
Happy summer and happy coding!

Regards

billiejoex


>>> pcapy.findalldevs()

[u'\u445c\u7665\u6369\u5c65\u504e\u5f46\u6547\u656e \u6972\u4e63\u6964\u5773\u6e6
1\u6441\u7061\u6574r\u445c\u7665\u6369\u5c65\u504e \u5f46\u317b\u4534\u3544\u3642
\u2d31\u3030\u3942\u342d\u4441\u2d39\u3341\u4345\u 382d\u3033\u3246\u3938\u3241\u
4531\u7d44\u5c00\u6544\u6976\u6563\u4e5c\u4650\u7b 5f\u3541\u3630\u3934\u3434\u45
2d\u4230\u2d37\u3634\u3239\u382d\u4237\u2d35\u4630 \u3133\u4244\u3933\u3532\u3943
}\u445c\u7665\u6369\u5c65\u504e\u5f46\u377b\u4337\ u3644\u3034\u2d31\u3841\u3143\
u342d\u3743\u2d43\u3241\u4633\u432d\u3731\u3037\u3 538\u3234\u4538\u7d34',
u'\u65
47\u656e\u6972\u2063\u644e\u7369\u6157\u206e\u6461 \u7061\u6574r\u4d56\u6177\u657
2\u5620\u7269\u7574\u6c61\u4520\u6874\u7265\u656e\ u2074\u6441\u7061\u6574r\u4d56
\u6177\u6572\u5620\u7269\u7574\u6c61\u4520\u6874\u 7265\u656e\u2074\u6441\u7061\u
6574r\u564e\u4449\u4149\u6e20\u6f46\u6372\u2065\u4 34d\u2050\u654e\u7774\u726f\u6
96b\u676e\u4120\u6164\u7470\u7265\u4420\u6972\u657 6\u2072\u4d28\u6369\u6f72\u6f7
3\u7466\u7327\u5020\u6361\u656b\u2074\u6353\u6568\ u7564\u656c\u2972 ']



 
Reply With Quote
 
 
 
 
Richie Hindle
Guest
Posts: n/a
 
      08-26-2005

[billiejoex]
> Hi. I'm trying to use pcapy module on Windows XP prof sp2 [...]
> On Windows machines the findalldevs() function (an output on the bottom)
> gives an unicode object that can't be processed by open_live function
> that tipically accept strings.
>
> >>> pcapy.findalldevs()

> [u'\u445c\u7665\u6369\u5c65\u504e\u5f46\u6547\u656e \u6972\u4e63\u6964\u5773\u6e6
> [...]


For what it's worth, I can run that on my XP Professional SP2 machine and
it works perfectly:

>>> pcapy.findalldevs()

[u'\\Device\\NPF_{15310604-FCFC-4016-9D36-14DAA948A600}',
u'\\Device\\NPF_{62280C1D-DC5C-42AF-BA0F-6BDB48418CA5}']

I'm using WinPcap 3.0. My packet.dll is stamped as version 3.0.0.18.
Maybe you're running a different version?

--
Richie Hindle
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
billiejoex
Guest
Posts: n/a
 
      08-26-2005
The problem was my winpcap version. I was using the 3.1.
Now, with the 3.0 it works.

Really thanks.


> For what it's worth, I can run that on my XP Professional SP2 machine and
> it works perfectly:
>
>>>> pcapy.findalldevs()

> [u'\\Device\\NPF_{15310604-FCFC-4016-9D36-14DAA948A600}',
> u'\\Device\\NPF_{62280C1D-DC5C-42AF-BA0F-6BDB48418CA5}']
>
> I'm using WinPcap 3.0. My packet.dll is stamped as version 3.0.0.18.
> Maybe you're running a different version?
>
> --
> Richie Hindle
> (E-Mail Removed)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi help me in installing pcapy extension module pranesh Python 1 11-02-2009 08:44 PM
Any1 patched carpet stains before? Brian Computer Support 7 04-13-2007 10:34 AM
any1 using xbox360 and earthlink wireless router??? Dina Magazzu Computer Support 0 01-26-2007 05:26 AM
icmp sniffer with pcapy module billiejoex Python 0 09-09-2005 03:17 PM
any1 calibrated their monitors under x64? =?Utf-8?B?SGVucmlr?= Windows 64bit 4 07-28-2005 10:34 AM



Advertisments