Package killerbee :: Module scapy_extensions
[hide private]
[frames] | no frames]

Module scapy_extensions

source code

Functions [hide private]
 
__kb_send(kb, x, channel=None, inter=0, loop=0, count=None, verbose=None, realtime=None, *args, **kargs) source code
 
__kb_recv(kb, count=0, store=1, prn=None, lfilter=None, stop_filter=None, verbose=None, timeout=None) source code
 
kbdev()
List KillerBee recognized devices
source code
 
kbsendp(pkt, channel=None, inter=0, loop=0, iface=None, verbose=None, realtime=None)
Send a packet with KillerBee
source code
 
kbsrp(pkt, channel=None, inter=0, count=0, iface=None, store=1, prn=None, lfilter=None, timeout=None, verbose=None, realtime=None)
Send and receive packets with KillerBee
source code
 
kbsrp1(pkt, channel=None, inter=0, iface=None, store=1, prn=None, lfilter=None, timeout=None, verbose=None, realtime=None)
Send and receive packets with KillerBee and return only the first answer
source code
 
kbsniff(channel=None, count=0, iface=None, store=1, prn=None, lfilter=None, stop_filter=None, verbose=None, timeout=None)
Sniff packets with KillerBee.
source code
 
kbrdpcap(filename, count=-1, skip=0, nofcs=False)
Read a pcap file with the KillerBee library.
source code
 
kbwrpcap(save_file, pkts)
Write a pcap using the KillerBee library.
source code
 
kbrddain(filename, count=-1, skip=0)
Read a dain tree file with the KillerBee library Wraps the DainTreeReader to return scapy packet object from daintree files.
source code
 
kbwrdain(save_file, pkts)
Write a daintree file using the KillerBee library.
source code
 
kbkeysearch(packet, searchdata, ispath=True, skipfcs=True, raw=False)
Search a binary file for the encryption key to an encrypted packet.
source code
 
kbgetnetworkkey(pkts)
Search packets for a plaintext key exchange returns the first one found.
source code
 
kbtshark(store=0, *args, **kargs)
Sniff packets using KillerBee and print them calling pkt.show()
source code
 
kbrandmac(length=8)
Returns a random MAC address using a list valid OUI's from ZigBee device manufacturers.
source code
 
kbdecrypt(pkt, key=None, verbose=None)
Decrypt Zigbee frames using AES CCM* with 32-bit MIC
source code
 
kbencrypt(pkt, data, key=None, verbose=None)
Encrypt Zigbee frames using AES CCM* with 32-bit MIC
source code
Variables [hide private]
  DEFAULT_KB_CHANNEL = 11
  DEFAULT_KB_DEVICE = None
  log_killerbee = logging.getLogger('scapy.killerbee')
  __package__ = 'killerbee'
Function Details [hide private]

kbdev()

source code 

List KillerBee recognized devices

Decorators:
  • @conf.commands.register

kbsendp(pkt, channel=None, inter=0, loop=0, iface=None, verbose=None, realtime=None)

source code 

Send a packet with KillerBee

Parameters:
  • channel - 802.15.4 channel to transmit/receive on
  • inter - time to wait between tranmissions
  • loop - number of times to process the packet list
  • iface - KillerBee interface to use, or KillerBee() class instance
  • verbose - set verbosity level
  • realtime - use packet's timestamp, bending time with realtime value
Decorators:
  • @conf.commands.register

kbsrp(pkt, channel=None, inter=0, count=0, iface=None, store=1, prn=None, lfilter=None, timeout=None, verbose=None, realtime=None)

source code 

Send and receive packets with KillerBee

Parameters:
  • channel - 802.15.4 channel to transmit/receive on
  • inter - time to wait between tranmissions
  • count - number of packets to capture. 0 means infinity
  • iface - KillerBee interface to use, or KillerBee() class instance
  • store - wether to store sniffed packets or discard them
  • prn - function to apply to each packet. If something is returned, it is displayed. Ex: ex: prn = lambda x: x.summary()
  • lfilter - python function applied to each packet to determine if further action may be done ex: lfilter = lambda x: x.haslayer(Padding)
  • timeout - stop sniffing after a given time (default: None)
  • verbose - set verbosity level
  • realtime - use packet's timestamp, bending time with realtime value
Decorators:
  • @conf.commands.register

kbsrp1(pkt, channel=None, inter=0, iface=None, store=1, prn=None, lfilter=None, timeout=None, verbose=None, realtime=None)

source code 

Send and receive packets with KillerBee and return only the first answer

Decorators:
  • @conf.commands.register

kbsniff(channel=None, count=0, iface=None, store=1, prn=None, lfilter=None, stop_filter=None, verbose=None, timeout=None)

source code 

Sniff packets with KillerBee.

Parameters:
  • channel - 802.15.4 channel to transmit/receive on
  • count - number of packets to capture. 0 means infinity
  • iface - KillerBee interface to use, or KillerBee() class instance
  • store - wether to store sniffed packets or discard them
  • prn - function to apply to each packet. If something is returned, it is displayed. Ex: ex: prn = lambda x: x.summary()
  • lfilter - python function applied to each packet to determine if further action may be done ex: lfilter = lambda x: x.haslayer(Padding)
  • timeout - stop sniffing after a given time (default: None)
Decorators:
  • @conf.commands.register

kbrdpcap(filename, count=-1, skip=0, nofcs=False)

source code 

Read a pcap file with the KillerBee library. Wraps the PcapReader to return scapy packet object from pcap files. This uses the killerbee internal methods instead of the scapy native methods. This is not necessarily better, and suggestions are welcome. Specify nofcs parameter as True if for some reason the packets in the PCAP don't have FCS (checksums) at the end.

Returns:
Scapy packetlist of Dot15d4 packets parsed from the given PCAP file.
Decorators:
  • @conf.commands.register

kbwrpcap(save_file, pkts)

source code 

Write a pcap using the KillerBee library.

Decorators:
  • @conf.commands.register

kbrddain(filename, count=-1, skip=0)

source code 

Read a dain tree file with the KillerBee library Wraps the DainTreeReader to return scapy packet object from daintree files.

Decorators:
  • @conf.commands.register

kbwrdain(save_file, pkts)

source code 

Write a daintree file using the KillerBee library.

Decorators:
  • @conf.commands.register

kbkeysearch(packet, searchdata, ispath=True, skipfcs=True, raw=False)

source code 

Search a binary file for the encryption key to an encrypted packet.

Decorators:
  • @conf.commands.register

kbgetnetworkkey(pkts)

source code 

Search packets for a plaintext key exchange returns the first one found.

Decorators:
  • @conf.commands.register

kbtshark(store=0, *args, **kargs)

source code 

Sniff packets using KillerBee and print them calling pkt.show()

Decorators:
  • @conf.commands.register

kbrandmac(length=8)

source code 

Returns a random MAC address using a list valid OUI's from ZigBee device manufacturers.

Decorators:
  • @conf.commands.register

kbdecrypt(pkt, key=None, verbose=None)

source code 

Decrypt Zigbee frames using AES CCM* with 32-bit MIC

Decorators:
  • @conf.commands.register

kbencrypt(pkt, data, key=None, verbose=None)

source code 

Encrypt Zigbee frames using AES CCM* with 32-bit MIC

Decorators:
  • @conf.commands.register