Comments (14)
Any plans to release a 2.6 binary for windows?
Original comment by [email protected]
on 7 May 2009 at 10:23
from pypcap.
winpcap development is free.
http://www.winpcap.org/install/bin/WpdPack_4_0_2.zip
1) Download MinGW32. Install to c:\wingw32
2) path=%path%;c:\wingw32\bin
3) Download winpcap development pack from above. Unzip to c:\WpdPack
4) From pypcap-1.1 directory.
> python .\setup.py --with-pcap="C:\WpdPack"
> python .\setup.py build -cmingw32
> python .\setup.py install
Original comment by [email protected]
on 19 May 2009 at 1:27
from pypcap.
Sorry, this doesn't work.
First, the MinGW32 folder should be c:\MinGW.
Even so, second, there's no Python that gets installed with MinGW!!! Nor any
option
to do so. g++, etc., yes. Buy no python. I AM running the standard Python 2.6
however, but when I try
setup.py --with-pcap="C:\WpdPack"
it's clueless about --with, says bad option.
Appreciate any help you can give, I'm blocked.
Thanks in advance, -david
Original comment by [email protected]
on 7 Oct 2009 at 9:40
from pypcap.
Try this (after installing MinGW, adding its \bin subdirectory to your PATH and
extracting WpdPack to C:\WpdPack as shown above):
python setup.py config --with-pcap="C:\WpdPack"
python setup.py build -cmingw32
python setup.py bdist_wininst
The installer will be put into the \dist subdirectory of pypcap.
An alternative way:
The default argument of --with-pcap is "..\WpdPack". So if you put WpdPack to a
sibling directory of your pypcap directory, you don't need to specify it
explicitly:
python setup.py config
Moreover, you can set the default compiler for distutils to MinGW by creatiing
a file
"C:\Python26\Lib\distutils\distutils.cfg" that has the following two lines:
[build]
compiler = mingw32
Then you do not need to specify the compiler:
python setup.py build
Hope that helps.
Regards
Dirk
Original comment by [email protected]
on 23 Oct 2009 at 9:15
from pypcap.
(On WinXP/Python 2.6)
I've gotten a bunch of it to work by modifying the python 2.5 binaries in a hex
editor (after extracting pcap.pyd). This is obviously pretty dangerous, but it's
worked so far:
import pcap #with pcap.pyd in the current directory
#see http://www.monkey.org/~dugsong/pypcap/pcap.html for reference
int = pcap.pcap(pcap.lookupdev())
timestamp, pkt = int.next()
print timestamp
print str(pkt) #this gives you the actual contents of the buffer
Original comment by [email protected]
on 12 Nov 2009 at 12:56
Attachments:
from pypcap.
Hi,
I just build a windows installer distribute for Python 2.6. And it seems work
fine.
http://static.ez2learn.com/temp/pcap-1.1.win32-py2.6.exe
Hope this could be helpful.
Victor Lin.
Original comment by [email protected]
on 4 Jan 2010 at 12:49
from pypcap.
Hi Victor Lin, Is this the same as pcapy module?
Original comment by [email protected]
on 4 Feb 2010 at 1:15
from pypcap.
Just a quick note.
1) Download and install MinGW32.
2) add MinGW's "\bin" path to your PATH variable
3) Download winpcap development pack
http://www.winpcap.org/install/bin/WpdPack_4_0_2.zip. Unzip to c:\WpdPack
4) From pypcap-1.1 directory:
> python setup.py config --with-pcap="C:\WpdPack"
> python setup.py build -cmingw32
> python setup.py bdist_wininst
The installer will be put into the \dist subdirectory of pypcap.
This worked!
But a side note will be that your anti virus application will most likely
detect this
installer as a security-risk to your computer. I'm no security expert so i
don't know
why this happens but it will. Tried it with the latest Norton (as of date,
"Norton
Internet Security 2010") and McAfee.
Don't forget to install the rest of the demanded packages:
http://trac.secdev.org/scapy/wiki/WindowsInstallationGuide
Original comment by [email protected]
on 24 Mar 2010 at 4:11
from pypcap.
There is one caveat in using MinGW to build Windows binaries for pypcap:
Just building it "as is" will result in a binary which uses two different C
libaries.
msvcrt and msvcr71 (or msvcr90 for Python 2.7). This can be shown a tool like
Dependency Walker.
This will cause crashes on Vista and Win7. XP does not seem to be affected.
msvcrt is included because of the strdup() function and the name mangling
MinGW's libmoldname does to convert strdup() to the "leading underscore"
_strdup() name Windows uses.
Workaround: After generating the pcap.c file with Pyrex or Cython, replace all
occurences of strdup() in pcap.c with _strdup(). Then rebuild. msvcrt should
not be used anymore.
If somebody has a better solution for this, please let me know.
Regards
Dirk
References:
http://lists-archives.org/mingw-users/09604-linking-against-msvcr71-dll.html
http://trac.secdev.org/scapy/ticket/166
http://code.google.com/p/pyproj/issues/detail?id=15
Original comment by [email protected]
on 14 Jul 2010 at 9:44
from pypcap.
Hello,
I compiled the version for anyone who looks for it...
Python26: http://ul.to/j6wuam0n
Python27: http://uploaded.to/file/773pq95y
one has to unpack it into the site-packages manually since i donnot know how to
build a .msi
Regards,
Me
Original comment by [email protected]
on 22 Nov 2011 at 12:33
from pypcap.
for Python2.7
Original comment by [email protected]
on 24 Jun 2012 at 12:27
Attachments:
from pypcap.
hi,i download the pcap-1.1.win32-py2.7.exe ,and i found dpkt-1.7.win32.exe here:
http://code.google.com/p/dpkt/downloads/list.
It is for py2.6 and py2.7.
Original comment by [email protected]
on 12 Jul 2012 at 3:30
Attachments:
from pypcap.
Any one can upload a pypcap exe for python2.6 windows 64bits
i am carzy for this sujet and i lost 3 days just for looking a library.
i tried seach in google. MinGW32 MinGW64.
Original comment by [email protected]
on 17 Oct 2013 at 3:45
from pypcap.
Hi.
You would like to try Npcap: https://github.com/nmap/npcap.
It's another fork of WinPcap with multiple new features.
from pypcap.
Related Issues (20)
- PCAP on Python 2.7 HOT 12
- Building under Windows gets error HOT 8
- Problems with timeout_ms at least on Windows 7
- Installing on Win7 64-bit gives 'undefined reference to `__imp_Py_InitModule4' HOT 1
- Thread safety problem in pcap_ex_next()
- is dumping packets to a file supported ? HOT 2
- how to use pcap module
- [patch] Add dumpfile support
- Errot message: "TypeError: raise: exception class must be a subclass of BaseException " raised while executing test.py HOT 1
- upload the pypcap of python2.7 HOT 6
- timeout_ms less than 1 second is not supported
- Pypcap on Mac OS X and Python 2.7 HOT 1
- "couldn't find pcap build or installation directory" HOT 4
- Move pypcap to github HOT 1
- [deleted issue]
- AttributeError: 'pcap.pcap' object has no attribute 'inject' HOT 3
- comilation commands
- immediate = True is ignored
- pypcap depends from pcap-int.h which is internal pcap stuff and shouldn't be included (breaking build on some systems)
- error: no suitable device found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypcap.