Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37487

Re: Parse a Wireshark pcap file

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 <john.g.evans.ne@gmail.com>
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; '&amp;&amp;': 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&gt;': 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; '&gt;': 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; '&amp;': 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 <CAN4UfGy3y=Rc47txCWHMJKfJJ1XevLrLHZoW6_V4Etw6QFJt-w@mail.gmail.com>
References <CAN4UfGzwzHJvpY=Er2B2otZMBm=8eVA6FDGejJbirXLZFTXvsg@mail.gmail.com> <50FF5312.50309@davea.name> <CAN4UfGzBv=OjNZy-+_jzZHuWhP44FmcBa_O5pT01QDFkvLGOOw@mail.gmail.com> <50FF5910.7060309@davea.name> <CAN4UfGwxEBoe9XeAuuoiqXu2_4Zav39D8chc7E67np6D+hcfwg@mail.gmail.com> <ae0vf81k8mjs2q07s3lp5j29gjrvd83h4m@invalid.netcom.com> <CAPzg-LXLx5NkfK22-O7uNTK5Q8Za2LJO=95VPJgj7UpYcFmjhg@mail.gmail.com> <CAN4UfGy3y=Rc47txCWHMJKfJJ1XevLrLHZoW6_V4Etw6QFJt-w@mail.gmail.com>
Date Wed, 23 Jan 2013 10:57:29 -0500
Subject Re: Parse a Wireshark pcap file
From John Evans <john.g.evans.ne@gmail.com>
To Kevin Holleran <kdawg44@gmail.com>
Content-Type multipart/alternative; boundary=f46d0444015e60c62104d3f6c084
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.906.1358956653.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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 <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 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 <wlfraed@ix.netcom.com
>> > wrote:
>>
>>> On Tue, 22 Jan 2013 22:43:24 -0500, Kevin Holleran <kdawg44@gmail.com>
>>> 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
>>> > <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
>>>         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.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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Parse a Wireshark pcap file John Evans <john.g.evans.ne@gmail.com> - 2013-01-23 10:57 -0500

csiph-web