Re: Parse a Wireshark pcap file

Discussion in 'Python' started by John Evans, Jan 23, 2013.

  1. John Evans

    John Evans Guest

    It looks like there was some very recent reorganization of the scapy
    packaging on macports, see
    http://lists.macosforge.org/pipermail/macports-dev/2013-January/021620.html

    Did you have an updated port tree when you installed? If not, I'd suggest
    uninstalling whatever port you installed, resync with "port selfupdate",
    then install the scapy port again. You should see not only the libdnet
    port installed, but also py27-libdnet, which is the missing glue you need
    for interfacing with libdnet.


    On Wed, Jan 23, 2013 at 9:01 AM, Kevin Holleran <> wrote:

    >
    > On Wed, Jan 23, 2013 at 7:25 AM, John Evans <>wrote:
    >
    >> The import "from scapy.all import *" does work for me with macports and
    >> 10.6.8 When I installed the scapy port, I did see that macports installed
    >> the py27-libdnet package as well.
    >>
    >>
    >> 
    >>
    >>
    >> On Wed, Jan 23, 2013 at 1:24 AM, Dennis Lee Bieber <
    >> > wrote:

    >>
    >>> On Tue, 22 Jan 2013 22:43:24 -0500, Kevin Holleran <>
    >>> declaimed the following in gmane.comp.python.general:
    >>>
    >>> >
    >>> > Mac OS 10.8.2
    >>> > Python v.2.7
    >>> > I downloaded from the sourceforge site, then tried to install with
    >>> MacPorts
    >>> > when some dependencies were failing. I then downloaded & installed
    >>> > pcapy-0.10.6 when that dependency still failed. That solved that butI
    >>> > received the dnet error:
    >>> >
    >>> > from scapy.all import conf
    >>> > File "/Library/Python/2.7/site-packages/scapy/all.py", line 16, in
    >>> > <module>
    >>> > from arch import *
    >>> > File "/Library/Python/2.7/site-packages/scapy/arch/__init__.py",
    >>> line 75,
    >>> > in <module>
    >>> > from bsd import *
    >>> > File "/Library/Python/2.7/site-packages/scapy/arch/bsd.py", line 12,
    >>> in
    >>> > <module>
    >>> > from unix import *
    >>> > File "/Library/Python/2.7/site-packages/scapy/arch/unix.py", line
    >>> 20, in
    >>> > <module>
    >>> > from pcapdnet import *
    >>> > File "/Library/Python/2.7/site-packages/scapy/arch/pcapdnet.py", line
    >>> > 160, in <module>
    >>> > import dnet
    >>> > ImportError: No module named dnet
    >>> >
    >>> > So I downloaded and compiled libdnet-1.11 with a:
    >>> > $ sudo ./configure && make
    >>> >
    >>> > I see it compile fine & the libraries have been installed to:
    >>> > /usr/local/sbin/dnet
    >>> >
    >>> > However, python can't find it... I am not clear on how to point Python
    >>> > there...
    >>> >
    >>> "libdnet" is likely a shared object binary... What I /think/ you
    >>> are
    >>> missing is the Python library that interfaces with that binary...
    >>>
    >>> Could http://pypi.python.org/pypi/dnet answer the question?
    >>> --
    >>> Wulfraed Dennis Lee Bieber AF6VN
    >>> HTTP://wlfraed.home.netcom.com/
    >>>
    >>> --
    >>> http://mail.python.org/mailman/listinfo/python-list
    >>>

    >>
    >>
    >>
    >> --
    >> John Evans
    >>
    >> --
    >> http://mail.python.org/mailman/listinfo/python-list
    >>
    >>

    >
    > I downloaded scapy manually since for some reason, after using macports,
    > it wouldn't find the package at all.
    >
    > I am also trying to install libdnet manually as mentioned above, so after
    > ./configure && make I go into the python directory & do a python setup.py
    > install, which generates a bunch of warnings & the following two errors:
    >
    > /dnet.c:2729:4: error: assignment to cast is illegal, lvalue casts are not
    > supported
    > ((PyObject*)__pyx_v_next) = Py_None;
    > Py_INCREF(((PyObject*)__pyx_v_next));
    > ~^~~~~~~~~~~~~~~~~~~~~~~~ ~
    > ./dnet.c:2741:6: error: assignment to cast is illegal, lvalue casts are
    > not supported
    > ((PyObject *)__pyx_v_next) = __pyx_3;
    > ~^~~~~~~~~~~~~~~~~~~~~~~~~ ~
    >
    >
    > Thanks again for any help. Need to get all this working for this
    > mini-project and also because I am starting a SANS class that leverages
    > scapy quite a bit...
    >
    > Kevin
    >
    >



    --
    John Evans
    John Evans, Jan 23, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Holleran

    Re: Parse a Wireshark pcap file

    Kevin Holleran, Jan 23, 2013, in forum: Python
    Replies:
    0
    Views:
    238
    Kevin Holleran
    Jan 23, 2013
  2. Dave Angel

    Re: Parse a Wireshark pcap file

    Dave Angel, Jan 23, 2013, in forum: Python
    Replies:
    0
    Views:
    106
    Dave Angel
    Jan 23, 2013
  3. Kevin Holleran

    Re: Parse a Wireshark pcap file

    Kevin Holleran, Jan 23, 2013, in forum: Python
    Replies:
    0
    Views:
    165
    Kevin Holleran
    Jan 23, 2013
  4. Dave Angel

    Re: Parse a Wireshark pcap file

    Dave Angel, Jan 23, 2013, in forum: Python
    Replies:
    0
    Views:
    148
    Dave Angel
    Jan 23, 2013
  5. Kevin Holleran

    Re: Parse a Wireshark pcap file

    Kevin Holleran, Jan 23, 2013, in forum: Python
    Replies:
    0
    Views:
    176
    Kevin Holleran
    Jan 23, 2013
Loading...

Share This Page