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

Module kbutils

source code

Functions [hide private]
String
hexdump(src, length=16)
Creates a tcpdump-style hex dump string output.
source code
String
randbytes(size)
Returns a random string of size bytes.
source code
String
randmac(length=8)
Returns a random MAC address using a list valid OUI's from ZigBee device manufacturers.
source code
Variables [hide private]
  __package__ = 'killerbee'
Function Details [hide private]

hexdump(src, length=16)

source code 

Creates a tcpdump-style hex dump string output.

Parameters:
  • src (String) - Input string to convert to hexdump output.
  • length (Int) - Optional length of data for a single row of output, def=16
Returns: String

randbytes(size)

source code 

Returns a random string of size bytes. Not cryptographically safe.

Parameters:
  • size (Int) - Length of random data to return.
Returns: String

randmac(length=8)

source code 

Returns a random MAC address using a list valid OUI's from ZigBee device manufacturers. Data is returned in air-format byte order (LSB first).

Parameters:
  • length (String) - Optional length of MAC address, def=8. Minimum address return length is 3 bytes for the valid OUI.
Returns: String