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(*args, **kargs)[source]

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
build_eir()[source]

Builds a list of EIR messages to wrap this frame.

fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             PLIST             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. Apple_BLE_Frame                       
Apple_BLE_Frame fields

plist

PacketListField

[]

class scapy.contrib.ibeacon.Apple_BLE_Submessage(*args, **kargs)[source]

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

A basic Apple submessage.

aliastypes
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
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    SUBTYPE    |      LEN      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. Apple_BLE_Submessage                     
Apple_BLE_Submessage fields

subtype

ByteEnumField

None

len

LenField (Cond)

None

payload_guess

Possible sublayers: IBeacon_Data

class scapy.contrib.ibeacon.IBeacon_Data(*args, **kargs)[source]

Bases: scapy.packet.Packet

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

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              UUID                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             MAJOR             |             MINOR             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TX POWER   |
+-+-+-+-+-+-+-+-+

                        Fig. IBeacon_Data                         
IBeacon_Data fields

uuid

UUIDField

None

major

ShortField

None

minor

ShortField

None

tx_power

SignedByteField

None