scapy.contrib.ibeacon

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

Packet format documentation can be found at at:

class scapy.contrib.ibeacon.Apple_BLE_Frame(_pkt, /, *, plist=[])[source]

Bases: Packet, 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'>]
build_eir()[source]

Builds a list of EIR messages to wrap this frame.

fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<PacketListField (Apple_BLE_Frame).plist>]
class scapy.contrib.ibeacon.Apple_BLE_Submessage(_pkt, /, *, subtype=None, len=None)[source]

Bases: Packet, LowEnergyBeaconHelper

A basic Apple submessage.

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

See Apple_BLE_Frame.build_eir.

build_frame()[source]

Wraps this submessage in a Apple_BLE_Frame.

extract_padding(s)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteEnumField (Apple_BLE_Submessage).subtype>, <scapy.fields.ConditionalField object>]
payload_guess: List[Tuple[Dict[str, Any], Type[Packet]]] = [({'subtype': 2}, <class 'scapy.contrib.ibeacon.IBeacon_Data'>)]
class scapy.contrib.ibeacon.IBeacon_Data(_pkt, /, *, uuid=None, major=None, minor=None, tx_power=None)[source]

Bases: 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: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<UUIDField (IBeacon_Data).uuid>, <ShortField (IBeacon_Data).major>, <ShortField (IBeacon_Data).minor>, <SignedByteField (IBeacon_Data).tx_power>]