473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Does any1 use pcapy module on win32 platforms?

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 ']

Aug 26 '05 #1
2 2391

[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
ri****@entrian.com
Aug 26 '05 #2
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
ri****@entrian.com

Aug 26 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
0
by: F. GEIGER | last post by:
py2exe and datetime -> No module named datetime I've begun to use the stdlib module datetime instead of my home brewn classes. Since then a py2exe app doesn't run anymore: Traceback (most...
2
by: syed_saqib_ali | last post by:
I have a file named testPython.py as shown below. I have shown a trace of the Interpreter Session in which I import the modules from this file using the command: "from testPython import *" When...
11
by: Grant Edwards | last post by:
I've read over and over that Python leaves floating point issues up to the underlying platform. This seems to be largely true, but not always. My underlying platform (IA32 Linux) correctly...
2
by: billiejoex | last post by:
Hi all. I'm using pcapy module to sniff some ICMP packets. I would like to modify this source: http://www.google.it/search?hl=it&q=pcapy&btnG=Cerca+con+Google&meta= and visualize only the DATA...
1
by: billiejoex | last post by:
Hi all. I noticed that with the original pcap sniffing library it is possible to listen on multiple devices by using "select()" or "poll()" function. These function aren't present in pcapy module....
28
by: Peter Olcott | last post by:
I want to double check my understanding about how the .NET framework works. From what I understand every call to the .NET framework is ultimately translated into one of more API calls, is this...
14
by: John | last post by:
My friend told me that his company will migrate the VC++ win32 applications to C++ .NET windows applications. I don't understand why since currently Microsoft only supports .NET on windows...
2
by: T00l | last post by:
I'm a newbie to python and for my first project i'm trying to create a packet filter. Having looked around i think pcapy will be the best way, there is a sniffer script available that incorporates a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.