scapy.layers.bluetooth
Bluetooth layers, sockets and send/receive functions.
- class scapy.layers.bluetooth.ATT_Error_Response(_pkt, /, *, request=0, handle=0, ecode=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | REQUEST | HANDLE | ECODE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Error_Response
request
0
handle
0
ecode
0
- class scapy.layers.bluetooth.ATT_Exchange_MTU_Request(_pkt, /, *, mtu=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Exchange_MTU_Response(_pkt, /, *, mtu=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Execute_Write_Request(_pkt, /, *, flags=1)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Find_By_Type_Value_Request(_pkt, /, *, start=1, end=65535, uuid=None, data=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | START | END | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UUID | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Find_By_Type_Value_Request
start
1
end
65535
uuid
None
data
b''
- class scapy.layers.bluetooth.ATT_Find_By_Type_Value_Response(_pkt, /, *, handles=[])[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Find_Information_Request(_pkt, /, *, start=0, end=65535)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | START | END | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Find_Information_Request
start
0
end
65535
- class scapy.layers.bluetooth.ATT_Find_Information_Response(_pkt, /, *, format=1, handles=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FORMAT |HANDLE| +-+-+-+-+-+-+-+-+ Fig. ATT_Find_Information_Response
format
1
handles
MultipleTypeField
(PacketListField, PacketListField, StrFixedLenField)b''
- class scapy.layers.bluetooth.ATT_Handle(_pkt, /, *, handle=0, value=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Handle_UUID128(_pkt, /, *, handle=0, value=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HANDLE | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + + | | + + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Handle_UUID128
handle
0
value
None
- class scapy.layers.bluetooth.ATT_Handle_Value_Indication(_pkt, /, *, gatt_handle=0, value=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Handle_Value_Indication
gatt_handle
0
value
b''
- class scapy.layers.bluetooth.ATT_Handle_Value_Notification(_pkt, /, *, gatt_handle=0, value=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Handle_Value_Notification
gatt_handle
0
value
b''
- class scapy.layers.bluetooth.ATT_Handle_Variable(_pkt, /, *, handle=0, value=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HANDLE | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Handle_Variable
handle
0
value
0
- val_length
- class scapy.layers.bluetooth.ATT_Hdr(_pkt, /, *, opcode=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OPCODE | +-+-+-+-+-+-+-+-+ Fig. ATT_Hdr
opcode
None
- payload_guess
Possible sublayers:
ATT_Error_Response
,ATT_Exchange_MTU_Request
,ATT_Exchange_MTU_Response
,ATT_Execute_Write_Request
,ATT_Execute_Write_Response
,ATT_Find_By_Type_Value_Request
,ATT_Find_By_Type_Value_Response
,ATT_Find_Information_Request
,ATT_Find_Information_Response
,ATT_Handle_Value_Indication
,ATT_Handle_Value_Notification
,ATT_Prepare_Write_Request
,ATT_Prepare_Write_Response
,ATT_Read_Blob_Request
,ATT_Read_Blob_Response
,ATT_Read_By_Group_Type_Request
,ATT_Read_By_Group_Type_Response
,ATT_Read_By_Type_Request_128bit
,ATT_Read_By_Type_Request
,ATT_Read_By_Type_Response
,ATT_Read_Multiple_Request
,ATT_Read_Multiple_Response
,ATT_Read_Request
,ATT_Read_Response
,ATT_Write_Command
,ATT_Write_Request
,ATT_Write_Response
- class scapy.layers.bluetooth.ATT_Prepare_Write_Request(_pkt, /, *, gatt_handle=0, offset=0, data=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | OFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Prepare_Write_Request
gatt_handle
0
offset
0
data
b''
- class scapy.layers.bluetooth.ATT_Prepare_Write_Response(_pkt, /, *, gatt_handle=0, offset=0, data=b'')[source]
Bases:
ATT_Prepare_Write_Request
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | OFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Prepare_Write_Response
gatt_handle
0
offset
0
data
b''
- class scapy.layers.bluetooth.ATT_Read_Blob_Request(_pkt, /, *, gatt_handle=0, offset=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | OFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Read_Blob_Request
gatt_handle
0
offset
0
- class scapy.layers.bluetooth.ATT_Read_Blob_Response(_pkt, /, *, value=b'')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Read_By_Group_Type_Request(_pkt, /, *, start=0, end=65535, uuid=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | START | END | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UUID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Read_By_Group_Type_Request
start
0
end
65535
uuid
0
- class scapy.layers.bluetooth.ATT_Read_By_Group_Type_Response(_pkt, /, *, length=0, data=b'')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Read_By_Type_Request(_pkt, /, *, start=1, end=65535, uuid=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | START | END | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UUID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Read_By_Type_Request
start
1
end
65535
uuid
None
- class scapy.layers.bluetooth.ATT_Read_By_Type_Request_128bit(_pkt, /, *, start=1, end=65535, uuid1=None, uuid2=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | START | END | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UUID1 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UUID2 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Read_By_Type_Request_128bit
start
1
end
65535
uuid1
None
uuid2
None
- class scapy.layers.bluetooth.ATT_Read_By_Type_Response(_pkt, /, *, len=4, handles=[])[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Read_Multiple_Request(_pkt, /, *, handles=[])[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Read_Multiple_Response(_pkt, /, *, values=b'')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Read_Request(_pkt, /, *, gatt_handle=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Read_Response(_pkt, /, *, value=b'')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.ATT_Write_Command(_pkt, /, *, gatt_handle=0, data=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Write_Command
gatt_handle
0
data
b''
- class scapy.layers.bluetooth.ATT_Write_Request(_pkt, /, *, gatt_handle=0, data=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GATT HANDLE | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ATT_Write_Request
gatt_handle
0
data
b''
- class scapy.layers.bluetooth.BluetoothHCISocket(iface=65536, type=None)[source]
Bases:
SuperSocket
- desc = 'read/write on a BlueTooth HCI socket'
- class scapy.layers.bluetooth.BluetoothL2CAPSocket(bt_address)[source]
Bases:
SuperSocket
- desc = 'read/write packets on a connected L2CAP socket'
- class scapy.layers.bluetooth.BluetoothRFCommSocket(bt_address, port=0)[source]
Bases:
BluetoothL2CAPSocket
read/write packets on a connected RFCOMM socket
- ins: socket.socket
- outs: Optional[socket.socket]
- class scapy.layers.bluetooth.BluetoothUserSocket(adapter_index=0)[source]
Bases:
SuperSocket
- desc = 'read/write H4 over a Bluetooth user channel'
- class scapy.layers.bluetooth.EIR_CompleteList128BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[source]
Bases:
EIR_Element
- aliastypes
- class scapy.layers.bluetooth.EIR_CompleteList16BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[source]
Bases:
EIR_Element
- aliastypes
- class scapy.layers.bluetooth.EIR_CompleteLocalName(_pkt, /, *, local_name=b'')[source]
Bases:
EIR_Element
- aliastypes
- class scapy.layers.bluetooth.EIR_Device_ID(_pkt, /, *, vendor_id_source=0, vendor_id=0, product_id=0, version=0)[source]
Bases:
EIR_Element
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VENDOR ID SOURCE | VENDOR ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PRODUCT ID | VERSION | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. EIR_Device_ID
vendor_id_source
0
vendor_id
0
product_id
0
version
0
- class scapy.layers.bluetooth.EIR_Flags(_pkt, /, *, flags=<Flag 2 (general_disc_mode)>)[source]
Bases:
EIR_Element
- aliastypes
- class scapy.layers.bluetooth.EIR_Hdr(_pkt, /, *, len=None, type=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. EIR_Hdr
len
None
type
0
- payload_guess
Possible sublayers:
EIR_CompleteList128BitServiceUUIDs
,EIR_CompleteList16BitServiceUUIDs
,EIR_CompleteLocalName
,EIR_Device_ID
,EIR_Flags
,EIR_IncompleteList128BitServiceUUIDs
,EIR_IncompleteList16BitServiceUUIDs
,EIR_Manufacturer_Specific_Data
,EIR_Raw
,EIR_ServiceData16BitUUID
,EIR_ShortenedLocalName
,EIR_TX_Power_Level
- class scapy.layers.bluetooth.EIR_IncompleteList128BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[source]
Bases:
EIR_CompleteList128BitServiceUUIDs
- aliastypes
- class scapy.layers.bluetooth.EIR_IncompleteList16BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[source]
Bases:
EIR_CompleteList16BitServiceUUIDs
- aliastypes
- class scapy.layers.bluetooth.EIR_Manufacturer_Specific_Data(_pkt, /, *, company_id=None)[source]
Bases:
EIR_Element
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COMPANY ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. EIR_Manufacturer_Specific_Data
company_id
None
- payload_guess
Possible sublayers:
Apple_BLE_Frame
- classmethod register_magic_payload(payload_cls, magic_check=None)[source]
Registers a payload type that uses magic data.
Traditional payloads require registration of a Bluetooth Company ID (requires company membership of the Bluetooth SIG), or a Bluetooth Short UUID (requires a once-off payment).
There are alternatives which don’t require registration (such as 128-bit UUIDs), but the biggest consumer of energy in a beacon is the radio – so the energy consumption of a beacon is proportional to the number of bytes in a beacon frame.
Some beacon formats side-step this issue by using the Company ID of their beacon hardware manufacturer, and adding a “magic data sequence” at the start of the Manufacturer Specific Data field.
Examples of this are AltBeacon and GeoBeacon.
For an example of this method in use, see
scapy.contrib.altbeacon
.- Parameters
payload_cls (Type[scapy.packet.Packet]) – A reference to a Packet subclass to register as a payload.
magic_check (Callable[[bytes], bool]) – (optional) callable to use to if a payload should be associated with this type. If not supplied,
payload_cls.magic_check
is used instead.
- Raises
TypeError – If
magic_check
is not specified, andpayload_cls.magic_check
is not implemented.
- registered_magic_payloads = {<class 'scapy.contrib.altbeacon.AltBeacon'>: <bound method AltBeacon.magic_check of <class 'scapy.contrib.altbeacon.AltBeacon'>>}
- class scapy.layers.bluetooth.EIR_Raw(_pkt, /, *, data=b'')[source]
Bases:
EIR_Element
- aliastypes
- class scapy.layers.bluetooth.EIR_ServiceData16BitUUID(_pkt, /, *, svc_uuid=None)[source]
Bases:
EIR_Element
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SVC UUID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. EIR_ServiceData16BitUUID
svc_uuid
None
- payload_guess
Possible sublayers:
Eddystone_Frame
,Exposure_Notification_Frame
- class scapy.layers.bluetooth.EIR_ShortenedLocalName(_pkt, /, *, local_name=b'')[source]
Bases:
EIR_CompleteLocalName
- aliastypes
- class scapy.layers.bluetooth.EIR_TX_Power_Level(_pkt, /, *, level=0)[source]
Bases:
EIR_Element
- aliastypes
- class scapy.layers.bluetooth.HCI_ACL_Hdr(_pkt, /, *, BC=0, PB=0, handle=0, len=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BC| PB| HANDLE | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_ACL_Hdr
BC
BitField
(2 bits)0
PB
BitField
(2 bits)0
handle
BitField
(12 bits)0
len
None
- class scapy.layers.bluetooth.HCI_Cmd_Complete_LE_Read_White_List_Size(_pkt, /, *, status=0, size=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_Complete_Read_BD_Addr(_pkt, /, *, addr=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_Complete_Read_BD_Addr
addr
None
- class scapy.layers.bluetooth.HCI_Cmd_Connect_Accept_Timeout(_pkt, /, *, timeout=32000)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_Disconnect(_pkt, /, *, handle=0, reason=19)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Add_Device_To_White_List(_pkt, /, *, atype=0, address=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATYPE | ADDRESS | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Add_Device_To_White_List
atype
0
address
None
- class scapy.layers.bluetooth.HCI_Cmd_LE_Clear_White_List(_pkt, /)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Connection_Update(_pkt, /, *, handle=0, min_interval=0, max_interval=0, latency=0, timeout=0, min_ce=0, max_ce=65535)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HANDLE | MIN INTERVAL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MAX INTERVAL | LATENCY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TIMEOUT | MIN CE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MAX CE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Connection_Update
handle
0
min_interval
0
max_interval
0
latency
0
timeout
0
min_ce
0
max_ce
65535
- class scapy.layers.bluetooth.HCI_Cmd_LE_Create_Connection(_pkt, /, *, interval=96, window=48, filter=0, patype=0, paddr=None, atype=0, min_interval=40, max_interval=56, latency=0, timeout=42, min_ce=0, max_ce=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | INTERVAL | WINDOW | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FILTER | PATYPE | PADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATYPE | MIN INTERVAL | MAX INTERVAL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | LATENCY | TIMEOUT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | MIN CE | MAX CE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Create_Connection
interval
96
window
48
filter
0
patype
0
paddr
None
atype
0
min_interval
40
max_interval
56
latency
0
timeout
42
min_ce
0
max_ce
0
- class scapy.layers.bluetooth.HCI_Cmd_LE_Create_Connection_Cancel(_pkt, /)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Host_Supported(_pkt, /, *, supported=1, simultaneous=1)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Long_Term_Key_Request_Negative_Reply(_pkt, /, *, handle=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Long_Term_Key_Request_Reply(_pkt, /, *, handle=0, ltk=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HANDLE | LTK | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + + | | + + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Long_Term_Key_Request_Reply
handle
0
ltk
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.HCI_Cmd_LE_Read_Buffer_Size(_pkt, /)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Read_Remote_Used_Features(_pkt, /, *, handle=64)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Read_White_List_Size(_pkt, /)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Remove_Device_From_White_List(_pkt, /, *, atype=0, address=None)[source]
Bases:
HCI_Cmd_LE_Add_Device_To_White_List
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATYPE | ADDRESS | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Remove_Device_From_White_List
atype
0
address
None
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Advertise_Enable(_pkt, /, *, enable=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Advertising_Data(_pkt, /, *, len=None, data=[])[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Advertising_Parameters(_pkt, /, *, interval_min=2048, interval_max=2048, adv_type=0, oatype=0, datype=0, daddr=None, channel_map=7, filter_policy=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | INTERVAL MIN | INTERVAL MAX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADV TYPE | OATYPE | DATYPE | DADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | CHANNEL MAP | FILTER POLICY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Set_Advertising_Parameters
interval_min
2048
interval_max
2048
adv_type
0
oatype
0
datype
0
daddr
None
channel_map
7
filter_policy
0
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Random_Address(_pkt, /, *, address=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDRESS | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Set_Random_Address
address
None
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Scan_Enable(_pkt, /, *, enable=1, filter_dups=1)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Scan_Parameters(_pkt, /, *, type=1, interval=16, window=16, atype=0, policy=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | INTERVAL | WINDOW | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ATYPE | POLICY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Set_Scan_Parameters
type
1
interval
16
window
16
atype
0
policy
0
- class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Scan_Response_Data(_pkt, /, *, len=None, data=b'')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_LE_Start_Encryption_Request(_pkt, /, *, handle=0, rand=None, ediv=0, ltk=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HANDLE | RAND | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | EDIV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LTK | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_LE_Start_Encryption_Request
handle
0
rand
None
ediv
0
ltk
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.HCI_Cmd_Set_Event_Filter(_pkt, /, *, type=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Cmd_Set_Event_Mask(_pkt, /, *, mask=b'\xff\xff\xfb\xff\x07\xf8\xbf=')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MASK | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_Set_Event_Mask
mask
b'\xff\xff\xfb\xff\x07\xf8\xbf='
- class scapy.layers.bluetooth.HCI_Cmd_Write_Extended_Inquiry_Response(_pkt, /, *, fec_required=0, eir_data=[])[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC REQUIRED | EIR DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Cmd_Write_Extended_Inquiry_Response
fec_required
0
eir_data
[]
- class scapy.layers.bluetooth.HCI_Cmd_Write_Local_Name(_pkt, /, *, name='Write Local Name')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Command_Hdr(_pkt, /, *, opcode=0, len=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OPCODE | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Command_Hdr
opcode
0
len
None
- payload_guess
Possible sublayers:
HCI_Cmd_Connect_Accept_Timeout
,HCI_Cmd_Disconnect
,HCI_Cmd_LE_Add_Device_To_White_List
,HCI_Cmd_LE_Clear_White_List
,HCI_Cmd_LE_Connection_Update
,HCI_Cmd_LE_Create_Connection_Cancel
,HCI_Cmd_LE_Create_Connection
,HCI_Cmd_LE_Host_Supported
,HCI_Cmd_LE_Long_Term_Key_Request_Negative_Reply
,HCI_Cmd_LE_Long_Term_Key_Request_Reply
,HCI_Cmd_LE_Read_Buffer_Size
,HCI_Cmd_LE_Read_Remote_Used_Features
,HCI_Cmd_LE_Read_White_List_Size
,HCI_Cmd_LE_Remove_Device_From_White_List
,HCI_Cmd_LE_Set_Advertise_Enable
,HCI_Cmd_LE_Set_Advertising_Data
,HCI_Cmd_LE_Set_Advertising_Parameters
,HCI_Cmd_LE_Set_Random_Address
,HCI_Cmd_LE_Set_Scan_Enable
,HCI_Cmd_LE_Set_Scan_Parameters
,HCI_Cmd_LE_Set_Scan_Response_Data
,HCI_Cmd_LE_Start_Encryption_Request
,HCI_Cmd_Read_BD_Addr
,HCI_Cmd_Reset
,HCI_Cmd_Set_Event_Filter
,HCI_Cmd_Set_Event_Mask
,HCI_Cmd_Write_Extended_Inquiry_Response
,HCI_Cmd_Write_Local_Name
- class scapy.layers.bluetooth.HCI_Event_Command_Complete(_pkt, /, *, number=0, opcode=0, status=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NUMBER | OPCODE | STATUS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Event_Command_Complete
number
0
opcode
0
status
0
- payload_guess
Possible sublayers:
HCI_Cmd_Complete_LE_Read_White_List_Size
,HCI_Cmd_Complete_Read_BD_Addr
- class scapy.layers.bluetooth.HCI_Event_Command_Status(_pkt, /, *, status=0, number=0, opcode=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | STATUS | NUMBER | OPCODE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Event_Command_Status
status
0
number
0
opcode
None
- class scapy.layers.bluetooth.HCI_Event_Disconnection_Complete(_pkt, /, *, status=0, handle=0, reason=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | STATUS | HANDLE | REASON | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Event_Disconnection_Complete
status
0
handle
0
reason
0
- class scapy.layers.bluetooth.HCI_Event_Encryption_Change(_pkt, /, *, status=0, handle=0, enabled=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | STATUS | HANDLE | ENABLED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Event_Encryption_Change
status
0
handle
0
enabled
0
- class scapy.layers.bluetooth.HCI_Event_Hdr(_pkt, /, *, code=0, len=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_Event_Hdr
code
0
len
None
- payload_guess
Possible sublayers:
HCI_Event_Command_Complete
,HCI_Event_Command_Status
,HCI_Event_Disconnection_Complete
,HCI_Event_Encryption_Change
,HCI_Event_LE_Meta
,HCI_Event_Number_Of_Completed_Packets
- class scapy.layers.bluetooth.HCI_Event_LE_Meta(_pkt, /, *, event=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | EVENT | +-+-+-+-+-+-+-+-+ Fig. HCI_Event_LE_Meta
event
0
- payload_guess
Possible sublayers:
HCI_LE_Meta_Advertising_Reports
,HCI_LE_Meta_Connection_Complete
,HCI_LE_Meta_Connection_Update_Complete
,HCI_LE_Meta_Long_Term_Key_Request
- class scapy.layers.bluetooth.HCI_Event_Number_Of_Completed_Packets(_pkt, /, *, number=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.HCI_Hdr(_pkt, /, *, type=2)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | +-+-+-+-+-+-+-+-+ Fig. HCI_Hdr
type
2
- payload_guess
Possible sublayers:
HCI_ACL_Hdr
,HCI_Command_Hdr
,HCI_Event_Hdr
,Raw
- class scapy.layers.bluetooth.HCI_LE_Meta_Advertising_Report(_pkt, /, *, type=0, atype=0, addr=None, len=None, data=[], rssi=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | ATYPE | ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | DATA | RSSI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_LE_Meta_Advertising_Report
type
0
atype
0
addr
None
len
None
data
[]
rssi
0
- class scapy.layers.bluetooth.HCI_LE_Meta_Advertising_Reports(_pkt, /, *, len=None, reports=[])[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | REPORTS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_LE_Meta_Advertising_Reports
len
None
reports
[]
- class scapy.layers.bluetooth.HCI_LE_Meta_Connection_Complete(_pkt, /, *, status=0, handle=0, role=0, patype=0, paddr=None, interval=54, latency=0, supervision=42, clock_latency=5)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | STATUS | HANDLE | ROLE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PATYPE | PADDR | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | INTERVAL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | LATENCY | SUPERVISION | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | CLOCK LATENCY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_LE_Meta_Connection_Complete
status
0
handle
0
role
0
patype
0
paddr
None
interval
54
latency
0
supervision
42
clock_latency
5
- class scapy.layers.bluetooth.HCI_LE_Meta_Connection_Update_Complete(_pkt, /, *, status=0, handle=0, interval=54, latency=0, timeout=42)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | STATUS | HANDLE | INTERVAL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | LATENCY | TIMEOUT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. HCI_LE_Meta_Connection_Update_Complete
status
0
handle
0
interval
54
latency
0
timeout
42
- class scapy.layers.bluetooth.HCI_LE_Meta_Long_Term_Key_Request(_pkt, /, *, handle=0, rand=None, ediv=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HANDLE | RAND | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | EDIV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. HCI_LE_Meta_Long_Term_Key_Request
handle
0
rand
None
ediv
0
- class scapy.layers.bluetooth.HCI_PHDR_Hdr(_pkt, /, *, direction=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_CmdHdr(_pkt, /, *, code=8, id=0, len=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | ID | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. L2CAP_CmdHdr
code
8
id
0
len
None
- payload_guess
Possible sublayers:
L2CAP_CmdRej
,L2CAP_ConfReq
,L2CAP_ConfResp
,L2CAP_ConnReq
,L2CAP_ConnResp
,L2CAP_Connection_Parameter_Update_Request
,L2CAP_Connection_Parameter_Update_Response
,L2CAP_DisconnReq
,L2CAP_DisconnResp
,L2CAP_InfoReq
,L2CAP_InfoResp
- class scapy.layers.bluetooth.L2CAP_CmdRej(_pkt, /, *, reason=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_ConfReq(_pkt, /, *, dcid=0, flags=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_ConfResp(_pkt, /, *, scid=0, flags=0, result=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCID | FLAGS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESULT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. L2CAP_ConfResp
scid
0
flags
0
result
0
- class scapy.layers.bluetooth.L2CAP_ConnReq(_pkt, /, *, psm=0, scid=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_ConnResp(_pkt, /, *, dcid=0, scid=0, result=0, status=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DCID | SCID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESULT | STATUS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. L2CAP_ConnResp
dcid
0
scid
0
result
0
status
0
- class scapy.layers.bluetooth.L2CAP_Connection_Parameter_Update_Request(_pkt, /, *, min_interval=0, max_interval=0, slave_latency=0, timeout_mult=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MIN INTERVAL | MAX INTERVAL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SLAVE LATENCY | TIMEOUT MULT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. L2CAP_Connection_Parameter_Update_Request
min_interval
0
max_interval
0
slave_latency
0
timeout_mult
0
- class scapy.layers.bluetooth.L2CAP_Connection_Parameter_Update_Response(_pkt, /, *, move_result=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_DisconnReq(_pkt, /, *, dcid=0, scid=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_DisconnResp(_pkt, /, *, dcid=0, scid=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_Hdr(_pkt, /, *, len=None, cid=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | CID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. L2CAP_Hdr
len
None
cid
0
- payload_guess
Possible sublayers:
ATT_Hdr
,L2CAP_CmdHdr
,SM_Hdr
- class scapy.layers.bluetooth.L2CAP_InfoReq(_pkt, /, *, type=0, data=b'')[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.L2CAP_InfoResp(_pkt, /, *, type=0, result=0, data=b'')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | RESULT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. L2CAP_InfoResp
type
0
result
0
data
b''
- class scapy.layers.bluetooth.LowEnergyBeaconHelper[source]
Bases:
object
Helpers for building packets for Bluetooth Low Energy Beacons.
Implementors provide a
build_eir()
implementation.This is designed to be used as a mix-in – see
scapy.contrib.eddystone
andscapy.contrib.ibeacon
for examples.- base_eir = [<EIR_Hdr type=flags |<EIR_Flags flags=general_disc_mode+br_edr_not_supported |>>]
- build_advertising_report()[source]
Builds a HCI_LE_Meta_Advertising_Report containing this frame.
- Return type
scapy.bluetooth.HCI_LE_Meta_Advertising_Report
- build_eir()[source]
Builds a list of EIR messages to wrap this frame.
Users of this helper must implement this method.
- Returns
List of HCI_Hdr with payloads that describe this beacon type
- Return type
list[scapy.bluetooth.HCI_Hdr]
- build_set_advertising_data()[source]
Builds a HCI_Cmd_LE_Set_Advertising_Data containing this frame.
This includes the
HCI_Hdr
andHCI_Command_Hdr
layers.- Return type
scapy.bluetooth.HCI_Hdr
- class scapy.layers.bluetooth.SM_Confirm(_pkt, /, *, confirm=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CONFIRM | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Confirm
confirm
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_DHKey_Check(_pkt, /, *, dhkey_check=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DHKEY CHECK | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_DHKey_Check
dhkey_check
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_Encryption_Information(_pkt, /, *, ltk=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LTK | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Encryption_Information
ltk
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_Failed(_pkt, /, *, reason=0)[source]
Bases:
Packet
- aliastypes
- class scapy.layers.bluetooth.SM_Hdr(_pkt, /, *, sm_command=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SM COMMAND | +-+-+-+-+-+-+-+-+ Fig. SM_Hdr
sm_command
None
- payload_guess
Possible sublayers:
SM_Confirm
,SM_DHKey_Check
,SM_Encryption_Information
,SM_Failed
,SM_Identity_Address_Information
,SM_Identity_Information
,SM_Master_Identification
,SM_Pairing_Request
,SM_Pairing_Response
,SM_Public_Key
,SM_Random
,SM_Signing_Information
- class scapy.layers.bluetooth.SM_Identity_Address_Information(_pkt, /, *, atype=0, address=None)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATYPE | ADDRESS | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Identity_Address_Information
atype
0
address
None
- class scapy.layers.bluetooth.SM_Identity_Information(_pkt, /, *, irk=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IRK | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Identity_Information
irk
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_Master_Identification(_pkt, /, *, ediv=0, rand=b'\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | EDIV | RAND | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Master_Identification
ediv
0
rand
b'\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_Pairing_Request(_pkt, /, *, iocap=3, oob=0, authentication=0, max_key_size=16, initiator_key_distribution=0, responder_key_distribution=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IOCAP | OOB | AUTHENTICATION| MAX KEY SIZE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |INITIATOR KEY D|RESPONDER KEY D| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Pairing_Request
iocap
3
oob
0
authentication
BitField
(8 bits)0
max_key_size
16
initiator_key_distribution
0
responder_key_distribution
0
- class scapy.layers.bluetooth.SM_Pairing_Response(_pkt, /, *, iocap=3, oob=0, authentication=0, max_key_size=16, initiator_key_distribution=0, responder_key_distribution=0)[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IOCAP | OOB | AUTHENTICATION| MAX KEY SIZE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |INITIATOR KEY D|RESPONDER KEY D| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Pairing_Response
iocap
3
oob
0
authentication
BitField
(8 bits)0
max_key_size
16
initiator_key_distribution
0
responder_key_distribution
0
- class scapy.layers.bluetooth.SM_Public_Key(_pkt, /, *, key_x=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', key_y=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | KEY X | + + | | + + | | + + | | + + | | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | KEY Y | + + | | + + | | + + | | + + | | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Public_Key
key_x
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
key_y
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_Random(_pkt, /, *, random=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RANDOM | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Random
random
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.SM_Signing_Information(_pkt, /, *, csrk=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[source]
Bases:
Packet
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CSRK | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SM_Signing_Information
csrk
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- class scapy.layers.bluetooth.XLEShortField(name: str, default: Optional[int])[source]
Bases:
LEShortField
- class scapy.layers.bluetooth.sockaddr_hci[source]
Bases:
Structure
- hci_channel
Structure/Union member
- hci_dev
Structure/Union member
- sin_family
Structure/Union member