Giter VIP home page Giter VIP logo

Comments (13)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Any plans to release a 2.6 binary for windows?

Original comment by [email protected] on 7 May 2009 at 10:23

from pypcap.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
(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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Hi Victor Lin, Is this the same as pcapy module?

Original comment by [email protected] on 4 Feb 2010 at 1:15

from pypcap.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
for Python2.7

Original comment by [email protected] on 24 Jun 2012 at 12:27

Attachments:

from pypcap.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
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.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.