monk-dot / killerbee

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

zbdump update to display incoming traffic #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Proposed Enhancement

Running zbdump does not provide any feedback to the user. The attached patch 
and tool files will, by default, display information about the packet. This 
functionality can be turned on and off using the "-q" option. 

Normal display mode uses the Dot154PacketParser pktchop function and displays 
the resulting list of information. If the user has scapy-com installed the user 
can use the "-s" option to use the Dot15d4 layer to parse the packet and 
display the results. Some logic has been used to test for scapy-com if selected 
and avoid using it if it is not installed

The capturing functionality has also been updated. Now users can capture to 
both PCAP and Daintree formats at the same time by specifying both as usual. 

No testing has been done to determine if any of this new functionality 
negatively impacts packet capture and writing.

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

Usage example:

===================================

cutaway> sudo python ./zbdump_display2 -c 25 -w /tmp/t.pcap -i 2:51 -s
Warning: You are using pyUSB 1.x, support is in beta.
zbdump: listening on '2:51', link-type DLT_IEEE802_15_4, capture size 127 bytes

<bound method Dot15d4.mysummary of <Dot15d4  fcf_reserved_1=0 
fcf_panidcompress=False fcf_ackreq=False fcf_pending=False fcf_security=False 
fcf_frametype=Command fcf_srcaddrmode=None fcf_framever=0 
fcf_destaddrmode=Short fcf_reserved_2=0 seqnum=172 |<Dot15d4Cmd  
dest_panid=0xffff dest_addr=0xffff cmd_id=BeaconReq |<Raw  load='\x0e\x98' |>>>>
^C1 packets captured

cutaway> sudo python ./zbdump_display2 -c 25 -w /tmp/t.pcap -i 2:51
Warning: You are using pyUSB 1.x, support is in beta.
zbdump: listening on '2:51', link-type DLT_IEEE802_15_4, capture size 127 bytes

Packet: FCF | Seq# | DPAN | DA | SPAN | SA | [Beacon Data] | PHY Payload
Beacon: Superframe Spec | GTS Fields | Pending Addr Counts | Proto ID | Stack 
Profile/Profile Version | Device Capabilities | Ext PAN ID | TX Offset | Update 
ID

Packet: ['\x03\x08', '\xd9', '\xff\xff', '\xff\xff', '\x07\x88', 'I', [], '']
Packet: ['\x03\x08', '\xec', '\xff\xff', '\xff\xff', '\x07\xdf', '\x9a', [], '']
^C2 packets captured

===================================
What version of the product are you using?

KillerBee beta (from SVN checkout) Revision # 92

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?

Yes, yes it is

Please provide any additional information below.

Original issue reported on code.google.com by cutaways...@gmail.com on 12 Sep 2014 at 4:49

Attachments: