Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; '16,': 0.03; 'warnings': 0.03; 'error:': 0.05; 'importerror:': 0.05; 'url:pipermail': 0.05; 'dependency': 0.07; 'reason,': 0.07; 'setup.py': 0.07; 'skip:/ 10': 0.07; 'subject:file': 0.07; 'python': 0.09; '75,': 0.09; 'bit...': 0.09; 'bsd': 0.09; 'conf': 0.09; 'errors:': 0.09; 'port,': 0.09; 'question?': 0.09; 'cc:addr :python-list': 0.10; "wouldn't": 0.11; 'suggest': 0.11; 'library': 0.15; 'interfaces': 0.15; '"from': 0.16; '&&': 0.16; 'failed.': 0.16; 'illegal,': 0.16; 'py_none;': 0.16; 'skip:~ 20': 0.16; 'sudo': 0.16; 'there...': 0.16; 'uninstalling': 0.16; '\xc2\xa0i': 0.16; '\xc2\xa0if': 0.16; '\xc2\xa0you': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'jan': 0.18; '>>>': 0.18; 'module': 0.19; 'skip:p 30': 0.20; 'email addr:gmail.com>': 0.20; 'packaging': 0.20; 'skip:" 40': 0.20; 'trying': 0.21; 'import': 0.21; 'not,': 0.21; 'assignment': 0.22; 'install,': 0.22; 'libraries': 0.22; 'help.': 0.22; "i'd": 0.22; 'cc:2**0': 0.23; '>': 0.23; 'kevin': 0.23; 'installed': 0.23; 'downloaded': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'looks': 0.26; 'supported': 0.26; 'am,': 0.27; 'compiled': 0.27; 'skip:" 50': 0.27; 'skip:& 60': 0.27; 'tree': 0.27; 'message-id:@mail.gmail.com': 0.27; 'skip:( 20': 0.28; 'all.': 0.28; 'fine': 0.28; 'installed,': 0.29; 'url:mailman': 0.29; '8bit%:5': 0.29; 'skip:& 10': 0.29; 'class': 0.29; 'install': 0.29; 'point': 0.31; 'url:python': 0.32; 'file': 0.32; 'mac': 0.32; 'could': 0.32; 'url:listinfo': 0.32; 'url:home': 0.33; 'likely': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'updated': 0.34; 'thanks': 0.34; 'clear': 0.35; 'whatever': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'url:org': 0.36; '12,': 0.36; 'should': 0.36; 'does': 0.37; 'two': 0.37; 'quite': 0.37; 'received:209': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'received:209.85.214': 0.39; 'url:mail': 0.40; 'john': 0.60; '&': 0.61; 'mentioned': 0.63; '20,': 0.65; 'cast': 0.65; 'url:lists': 0.65; 'sans': 0.71; './configure': 0.84; '2013': 0.84; '7:25': 0.84; 'leverages': 0.84; 'lvalue': 0.84; 'dennis': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=V3JU8yfw3ZnYKQN4ROb0SCJJufgg6kx2R2n2CYLj3fc=; b=BH0189+8+CtPOoE5C52rVDm/7LW2YIbMIxriC81nRWBDsB2A9hksmIvw1ciCZYv0/z D5zxMvdK1tC9iajoxOQo7OECwp2z3pAQQBhyptMXZc7odVDq7K/OQHecDsZV03UNgqd3 5lm0XP3ut6/FHTNN7arbc2gyntrlncI+0YqLBCpqzUQzgRRBi7dUI5hlKyDTxtgrYumH oGw1ge6039iErisGmFWlmHpaM+MaEC541SbWzLPeErxP6SZYLCPfZdC7i/5aWCg904MO 1J3fPDDdDeA2CblO6eGPjXC0cpBcO1gYZFMTl75Faa5VKz133OgMhOwipmogAAUe9/rq COcw== MIME-Version: 1.0 X-Received: by 10.182.119.105 with SMTP id kt9mr1403493obb.19.1358956649825; Wed, 23 Jan 2013 07:57:29 -0800 (PST) In-Reply-To: References: <50FF5312.50309@davea.name> <50FF5910.7060309@davea.name> Date: Wed, 23 Jan 2013 10:57:29 -0500 Subject: Re: Parse a Wireshark pcap file From: John Evans To: Kevin Holleran Content-Type: multipart/alternative; boundary=f46d0444015e60c62104d3f6c084 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 279 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358956653 news.xs4all.nl 6982 [2001:888:2000:d::a6]:40079 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37487 --f46d0444015e60c62104d3f6c084 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 wr= ote: > >> 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 install= ed >> the py27-libdnet package as well. >> >> >> =EF=9C=AB >> >> >> 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 but= I >>> > received the dnet error: >>> > >>> > from scapy.all import conf >>> > File "/Library/Python/2.7/site-packages/scapy/all.py", line 16, in >>> > >>> > from arch import * >>> > File "/Library/Python/2.7/site-packages/scapy/arch/__init__.py", >>> line 75, >>> > in >>> > from bsd import * >>> > File "/Library/Python/2.7/site-packages/scapy/arch/bsd.py", line 12= , >>> in >>> > >>> > from unix import * >>> > File "/Library/Python/2.7/site-packages/scapy/arch/unix.py", line >>> 20, in >>> > >>> > from pcapdnet import * >>> > File "/Library/Python/2.7/site-packages/scapy/arch/pcapdnet.py", li= ne >>> > 160, in >>> > 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 Pytho= n >>> > there... >>> > >>> "libdnet" is likely a shared object binary... What I /think/ yo= u >>> 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 >>> wlfraed@ix.netcom.com 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.p= y > install, which generates a bunch of warnings & the following two errors: > > /dnet.c:2729:4: error: assignment to cast is illegal, lvalue casts are no= t > supported > ((PyObject*)__pyx_v_next) =3D 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) =3D __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 > > --=20 John Evans --f46d0444015e60c62104d3f6c084 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It looks like there was some very recent reorganization of= the scapy packaging on macports, see=C2=A0http://lists.macosf= orge.org/pipermail/macports-dev/2013-January/021620.html

Did you have an updated port tree when you installed? =C2=A0= If not, I'd suggest uninstalling whatever port you installed, resync wi= th "port selfupdate", then install the scapy port again. =C2=A0Yo= u should see not only the libdnet port installed, but also py27-libdnet, wh= ich is the missing glue you need for interfacing with libdnet.


On Wed,= Jan 23, 2013 at 9:01 AM, Kevin Holleran <kdawg44@gmail.com>= wrote:

On Wed, Jan 23, 2013 at 7:25 AM, John Evans = <john.g.evans.ne@gmail.com> wrote:
The import "from scapy.all impo= rt *" does work for me with macports and 10.6.8 =C2=A0When I installed= the scapy port, I did see that macports installed the py27-libdnet package= as well. =C2=A0


=EF=9C=AB


On Wed, Jan 23, 2013 a= t 1:24 AM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wro= te:
On Tue, 22 Jan 2013 22:43:24 -0500, Kevin Holleran <kdawg44@gmail.com&g= t;
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 Mac= Ports
> when some dependencies were failing. =C2=A0I then downloaded & ins= talled
> pcapy-0.10.6 when that dependency still failed. =C2=A0That solved that= but I
> received the dnet error:
>
> =C2=A0 =C2=A0 from scapy.all import conf
> =C2=A0 File "/Library/Python/2.7/site-packages/scapy/all.py"= , line 16, in
> <module>
> =C2=A0 =C2=A0 from arch import *
> =C2=A0 File "/Library/Python/2.7/site-packages/scapy/arch/__init_= _.py", line 75,
> in <module>
> =C2=A0 =C2=A0 from bsd import *
> =C2=A0 File "/Library/Python/2.7/site-packages/scapy/arch/bsd.py&= quot;, line 12, in
> <module>
> =C2=A0 =C2=A0 from unix import *
> =C2=A0 File "/Library/Python/2.7/site-packages/scapy/arch/unix.py= ", line 20, in
> <module>
> =C2=A0 =C2=A0 from pcapdnet import *
> =C2=A0 File "/Library/Python/2.7/site-packages/scapy/arch/pcapdne= t.py", line
> 160, in <module>
> =C2=A0 =C2=A0 import dnet
> ImportError: No module named dnet
>
> So I downloaded and compiled libdnet-1.11 with a:
> =C2=A0$ 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 Py= thon
> there...
>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "libdnet" is likely a sha= red object binary... What I /think/ you are
missing is the Python library that interfaces with that binary...

=C2=A0 =C2=A0 =C2=A0 =C2=A0 Could http://pypi.python.org/pypi/dnet answer the quest= ion?
--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Wulfraed =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 Dennis Lee Bieber =C2=A0 =C2=A0 =C2=A0 =C2=A0 AF6VN
=C2=A0 =C2=A0 =C2=A0 =C2=A0 wlfraed@ix.netcom.com =C2=A0 =C2=A0HTTP://wlfraed.home.netcom.com/
--
http://mail.python.org/mailman/listinfo/python-list



<= /div>--
John Evans

--
http://mail.python.org/mailman/listinfo/python-list



I downloaded scapy manu= ally since for some reason, after using macports, it wouldn't find the = package at all.=C2=A0

I am also trying to install = libdnet manually as mentioned above, so after ./configure && make I= go into the python directory & do a =C2=A0python setup.py install, whi= ch generates a bunch of warnings & the following two errors:

/dnet.c:2729:4: error: assignment to cast is illeg= al, lvalue casts are not supported
=C2=A0 ((PyObject*)__pyx_v_nex= t) =3D Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
=C2=A0 ~^~~= ~~~~~~~~~~~~~~~~~~~~~ ~
./dnet.c:2741:6: error: assignment to cast is illegal, lvalue casts ar= e not supported
=C2=A0 =C2=A0 ((PyObject *)__pyx_v_next) =3D __py= x_3;
=C2=A0 =C2=A0 ~^~~~~~~~~~~~~~~~~~~~~~~~~ ~


Thanks again for any help. =C2=A0Need to get all this working for this= mini-project and also because I am starting a SANS class that leverages sc= apy quite a bit...

Kevin




--
John Evans
--f46d0444015e60c62104d3f6c084--