monk-dot / killerbee

Automatically exported from code.google.com/p/killerbee
0 stars 1 forks source link

scapy-extensions.py requires scapy-com #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Running zbscapy on a system without scapy-com will produce errors when trying 
to parse Dot15d4 layers of the ZigBee packets. 

=======================================
cutaway> zbscapy
In [1]: cap = kbrdpcap('/tmp/zb_test.pcap')
WARNING: PcapReader: unknown LL type [195]/[0xc3]. Using Raw packets
AttributeError  Traceback
---> cap = kbrdpcap('/tmp/zb_test.pcap')
/usr/local/lib/python2.7/dist-packages/killerbee-2.5.0-py2.7-linux-x86_64.egg/ki
llerbee/scapy_extensions.py
in kbrdpcap(filename, count, skip, nofcs)
   229    continue
   230  if nofcs: packet = Dot15d4(packet[1])
>>>231  else: packet = Dot15d4FCS(packet[1])
   224  lst.append(packet)
AttributeError: global name 'Dot15d4FCS' is not defined

In [2]:
=======================================

Therefore, scapy-com is a requirement to use scapy-extensions.py and should be 
listed as such. This could be tested using the following (which might require 
the loading of the sys module as well) after all of the imports:

=======================================
try:
    scapy.layers.dot15d4
except:
    print "Scapy-com required to use scapy-extensions.py"
    print "Scapy-com can be found at http://bb.secdev.org/scapy-com"
    sys.exit()
=======================================

What is the expected output? What do you see instead?

Packets should parse properly without error.

What version of the product are you using?

KillerBee beta (from SVN checkout) Revision # 93

On what operating system?

Linux kubuntu_rules 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:02:06 UTC 
2014 x86_64 x86_64 x86_64 GNU/Linux

With what Python version? (python -V)

Python 2.7.5+

Is scapy-com installed?

No, not on this system

Please provide any additional information below.

Original issue reported on code.google.com by cutaways...@gmail.com on 16 Sep 2014 at 10:37