scapy.contrib.ibeacon module

scapy.contrib.ibeacon - Apple iBeacon Bluetooth LE proximity beacons.

Packet format documentation can be found at at:

class scapy.contrib.ibeacon.Apple_BLE_Frame

Bases: scapy.packet.Packet, scapy.layers.bluetooth.LowEnergyBeaconHelper

The wrapper for a BLE manufacturer-specific data advertisement from Apple devices.

Each advertisement is composed of one or multiple submessages.

The length of this field comes from the EIR_Hdr.

aliastypes = [<class 'scapy.contrib.ibeacon.Apple_BLE_Frame'>, <class 'scapy.packet.Packet'>]

Builds a list of EIR messages to wrap this frame.

fields_desc = [<Field (Apple_BLE_Frame).plist>]
class scapy.contrib.ibeacon.Apple_BLE_Submessage

Bases: scapy.packet.Packet, scapy.layers.bluetooth.LowEnergyBeaconHelper

A basic Apple submessage.

aliastypes = [<class 'scapy.contrib.ibeacon.Apple_BLE_Submessage'>, <class 'scapy.packet.Packet'>]

See Apple_BLE_Frame.build_eir.


Wraps this submessage in a Apple_BLE_Frame.


DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (Apple_BLE_Submessage).subtype>, <Field (Apple_BLE_Submessage).len>]
payload_guess = [({'subtype': 2}, <class 'scapy.contrib.ibeacon.IBeacon_Data'>)]
class scapy.contrib.ibeacon.IBeacon_Data

Bases: scapy.packet.Packet

iBeacon broadcast data frame. Composed on top of an Apple_BLE_Submessage.

aliastypes = [<class 'scapy.contrib.ibeacon.IBeacon_Data'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IBeacon_Data).uuid>, <Field (IBeacon_Data).major>, <Field (IBeacon_Data).minor>, <Field (IBeacon_Data).tx_power>]