scapy.layers.bluetooth

Bluetooth layers, sockets and send/receive functions.

class scapy.layers.bluetooth.ATT_Error_Response(_pkt, /, *, request=0, handle=0, ecode=0)[源代码]

基类: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                      
ATT_Error_Response fields

request

XByteField

0

handle

LEShortField

0

ecode

ByteEnumField

0

class scapy.layers.bluetooth.ATT_Exchange_MTU_Request(_pkt, /, *, mtu=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MTU              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ATT_Exchange_MTU_Request                   
ATT_Exchange_MTU_Request fields

mtu

LEShortField

0

class scapy.layers.bluetooth.ATT_Exchange_MTU_Response(_pkt, /, *, mtu=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MTU              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ATT_Exchange_MTU_Response                  
ATT_Exchange_MTU_Response fields

mtu

LEShortField

0

class scapy.layers.bluetooth.ATT_Execute_Write_Request(_pkt, /, *, flags=1)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     FLAGS     |
+-+-+-+-+-+-+-+-+

                  Fig. ATT_Execute_Write_Request                  
ATT_Execute_Write_Request fields

flags

ByteEnumField

1

class scapy.layers.bluetooth.ATT_Execute_Write_Response(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.ATT_Find_By_Type_Value_Request(_pkt, /, *, start=1, end=65535, uuid=None, data=b'')[源代码]

基类: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                
ATT_Find_By_Type_Value_Request fields

start

XLEShortField

1

end

XLEShortField

65535

uuid

XLEShortField

None

data

StrField

b''

class scapy.layers.bluetooth.ATT_Find_By_Type_Value_Response(_pkt, /, *, handles=[])[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            HANDLES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. ATT_Find_By_Type_Value_Response               
ATT_Find_By_Type_Value_Response fields

handles

PacketListField

[]

class scapy.layers.bluetooth.ATT_Find_Information_Request(_pkt, /, *, start=0, end=65535)[源代码]

基类: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                 
ATT_Find_Information_Request fields

start

XLEShortField

0

end

XLEShortField

65535

class scapy.layers.bluetooth.ATT_Find_Information_Response(_pkt, /, *, format=1, handles=None)[源代码]

基类: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                
ATT_Find_Information_Response fields

format

XByteField

1

handles

MultipleTypeField (PacketListField, PacketListField, StrFixedLenField)

b''

class scapy.layers.bluetooth.ATT_Handle(_pkt, /, *, handle=0, value=0)[源代码]

基类:Packet

aliastypes
extract_padding(s)[源代码]
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                          
ATT_Handle fields

handle

XLEShortField

0

value

XLEShortField

0

class scapy.layers.bluetooth.ATT_Handle_UUID128(_pkt, /, *, handle=0, value=None)[源代码]

基类:Packet

aliastypes
extract_padding(s)[源代码]
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                      
ATT_Handle_UUID128 fields

handle

XLEShortField

0

value

UUIDField

None

class scapy.layers.bluetooth.ATT_Handle_Value_Indication(_pkt, /, *, gatt_handle=0, value=b'')[源代码]

基类: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                 
ATT_Handle_Value_Indication fields

gatt_handle

XLEShortField

0

value

StrField

b''

class scapy.layers.bluetooth.ATT_Handle_Value_Notification(_pkt, /, *, gatt_handle=0, value=b'')[源代码]

基类: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                
ATT_Handle_Value_Notification fields

gatt_handle

XLEShortField

0

value

StrField

b''

class scapy.layers.bluetooth.ATT_Handle_Variable(_pkt, /, *, handle=0, value=0)[源代码]

基类:Packet

aliastypes
extract_padding(s)[源代码]
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                     
ATT_Handle_Variable fields

handle

XLEShortField

0

value

XStrLenField

0

val_length
class scapy.layers.bluetooth.ATT_Hdr(_pkt, /, *, opcode=None)[源代码]

基类: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                           
ATT_Hdr fields

opcode

XByteField

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'')[源代码]

基类: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                  
ATT_Prepare_Write_Request fields

gatt_handle

XLEShortField

0

offset

LEShortField

0

data

StrField

b''

class scapy.layers.bluetooth.ATT_Prepare_Write_Response(_pkt, /, *, gatt_handle=0, offset=0, data=b'')[源代码]

基类: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                  
ATT_Prepare_Write_Response fields

gatt_handle

XLEShortField

0

offset

LEShortField

0

data

StrField

b''

class scapy.layers.bluetooth.ATT_Read_Blob_Request(_pkt, /, *, gatt_handle=0, offset=0)[源代码]

基类: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                    
ATT_Read_Blob_Request fields

gatt_handle

XLEShortField

0

offset

LEShortField

0

class scapy.layers.bluetooth.ATT_Read_Blob_Response(_pkt, /, *, value=b'')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             VALUE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ATT_Read_Blob_Response                    
ATT_Read_Blob_Response fields

value

StrField

b''

class scapy.layers.bluetooth.ATT_Read_By_Group_Type_Request(_pkt, /, *, start=0, end=65535, uuid=0)[源代码]

基类: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                
ATT_Read_By_Group_Type_Request fields

start

XLEShortField

0

end

XLEShortField

65535

uuid

XLEShortField

0

class scapy.layers.bluetooth.ATT_Read_By_Group_Type_Response(_pkt, /, *, length=0, data=b'')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     LENGTH    |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. ATT_Read_By_Group_Type_Response               
ATT_Read_By_Group_Type_Response fields

length

XByteField

0

data

StrField

b''

class scapy.layers.bluetooth.ATT_Read_By_Type_Request(_pkt, /, *, start=1, end=65535, uuid=None)[源代码]

基类: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                   
ATT_Read_By_Type_Request fields

start

XLEShortField

1

end

XLEShortField

65535

uuid

XLEShortField

None

class scapy.layers.bluetooth.ATT_Read_By_Type_Request_128bit(_pkt, /, *, start=1, end=65535, uuid1=None, uuid2=None)[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
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               
ATT_Read_By_Type_Request_128bit fields

start

XLEShortField

1

end

XLEShortField

65535

uuid1

XLELongField

None

uuid2

XLELongField

None

class scapy.layers.bluetooth.ATT_Read_By_Type_Response(_pkt, /, *, len=4, handles=[])[源代码]

基类: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      |            HANDLES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ATT_Read_By_Type_Response                  
ATT_Read_By_Type_Response fields

len

ByteField

4

handles

PacketListField

[]

class scapy.layers.bluetooth.ATT_Read_Multiple_Request(_pkt, /, *, handles=[])[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            HANDLES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ATT_Read_Multiple_Request                  
ATT_Read_Multiple_Request fields

handles

FieldListField

[]

class scapy.layers.bluetooth.ATT_Read_Multiple_Response(_pkt, /, *, values=b'')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             VALUES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. ATT_Read_Multiple_Response                  
ATT_Read_Multiple_Response fields

values

StrField

b''

class scapy.layers.bluetooth.ATT_Read_Request(_pkt, /, *, gatt_handle=0)[源代码]

基类: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          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ATT_Read_Request                       
ATT_Read_Request fields

gatt_handle

XLEShortField

0

class scapy.layers.bluetooth.ATT_Read_Response(_pkt, /, *, value=b'')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             VALUE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ATT_Read_Response                      
ATT_Read_Response fields

value

StrField

b''

class scapy.layers.bluetooth.ATT_Write_Command(_pkt, /, *, gatt_handle=0, data=b'')[源代码]

基类: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                      
ATT_Write_Command fields

gatt_handle

XLEShortField

0

data

StrField

b''

class scapy.layers.bluetooth.ATT_Write_Request(_pkt, /, *, gatt_handle=0, data=b'')[源代码]

基类: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                      
ATT_Write_Request fields

gatt_handle

XLEShortField

0

data

StrField

b''

class scapy.layers.bluetooth.ATT_Write_Response(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.BT_Mon_Hdr(_pkt, /, *, opcode=None, adapter_id=None, len=None)[源代码]

基类: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            |           ADAPTER ID          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. BT_Mon_Hdr                          
BT_Mon_Hdr fields

opcode

LEShortField

None

adapter_id

LEShortField

None

len

LEShortField

None

class scapy.layers.bluetooth.BT_Mon_Pcap_Hdr(_pkt, /, *, adapter_id=None, opcode=None)[源代码]

基类:BT_Mon_Hdr

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           ADAPTER ID          |             OPCODE            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. BT_Mon_Pcap_Hdr                       
BT_Mon_Pcap_Hdr fields

adapter_id

ShortField

None

opcode

ShortField

None

exception scapy.layers.bluetooth.BluetoothCommandError[源代码]

基类:BaseException

class scapy.layers.bluetooth.BluetoothHCISocket(iface=65536, type=None)[源代码]

基类:SuperSocket

desc = 'read/write on a BlueTooth HCI socket'
recv(x=65535)[源代码]
class scapy.layers.bluetooth.BluetoothL2CAPSocket(bt_address)[源代码]

基类:SuperSocket

desc = 'read/write packets on a connected L2CAP socket'
recv(x=65535)[源代码]
class scapy.layers.bluetooth.BluetoothMonitorSocket[源代码]

基类:SuperSocket

desc = 'read/write over a Bluetooth monitor channel'
recv(x=65535)[源代码]
class scapy.layers.bluetooth.BluetoothRFCommSocket(bt_address, port=0)[源代码]

基类:BluetoothL2CAPSocket

read/write packets on a connected RFCOMM socket

exception scapy.layers.bluetooth.BluetoothSocketError[源代码]

基类:BaseException

class scapy.layers.bluetooth.BluetoothUserSocket(adapter_index=0)[源代码]

基类:_BluetoothLibcSocket

desc = 'read/write H4 over a Bluetooth user channel'
recv(x=65535)[源代码]
send_command(cmd)[源代码]
class scapy.layers.bluetooth.EIR_CompleteList128BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[源代码]

基类: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 UUIDS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Fig. EIR_CompleteList128BitServiceUUIDs              
EIR_CompleteList128BitServiceUUIDs fields

svc_uuids

FieldListField

[]

class scapy.layers.bluetooth.EIR_CompleteList16BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[源代码]

基类: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 UUIDS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. EIR_CompleteList16BitServiceUUIDs              
EIR_CompleteList16BitServiceUUIDs fields

svc_uuids

FieldListField

[]

class scapy.layers.bluetooth.EIR_CompleteLocalName(_pkt, /, *, local_name=b'')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           LOCAL NAME          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. EIR_CompleteLocalName                    
EIR_CompleteLocalName fields

local_name

StrLenField

b''

class scapy.layers.bluetooth.EIR_Device_ID(_pkt, /, *, vendor_id_source=0, vendor_id=0, product_id=0, version=0)[源代码]

基类: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                        
EIR_Device_ID fields

vendor_id_source

XLEShortField

0

vendor_id

XLEShortField

0

product_id

XLEShortField

0

version

XLEShortField

0

class scapy.layers.bluetooth.EIR_Element(_pkt, /)[源代码]

基类:Packet

aliastypes
extract_padding(s)[源代码]
static length_from(pkt)[源代码]
class scapy.layers.bluetooth.EIR_Flags(_pkt, /, *, flags=<Flag 2 (general_disc_mode)>)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     FLAGS     |
+-+-+-+-+-+-+-+-+

                          Fig. EIR_Flags                          
EIR_Flags fields

flags

FlagsField

<Flag 2 (general_disc_mode)>

class scapy.layers.bluetooth.EIR_Hdr(_pkt, /, *, len=None, type=0)[源代码]

基类: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                           
EIR_Hdr fields

len

LenField

None

type

ByteEnumField

0

mysummary()[源代码]
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=[])[源代码]

基类:EIR_CompleteList128BitServiceUUIDs

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 UUIDS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. EIR_IncompleteList128BitServiceUUIDs             
EIR_IncompleteList128BitServiceUUIDs fields

svc_uuids

FieldListField

[]

class scapy.layers.bluetooth.EIR_IncompleteList16BitServiceUUIDs(_pkt, /, *, svc_uuids=[])[源代码]

基类:EIR_CompleteList16BitServiceUUIDs

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 UUIDS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Fig. EIR_IncompleteList16BitServiceUUIDs             
EIR_IncompleteList16BitServiceUUIDs fields

svc_uuids

FieldListField

[]

class scapy.layers.bluetooth.EIR_Manufacturer_Specific_Data(_pkt, /, *, company_id=None)[源代码]

基类:EIR_Element

aliastypes
default_payload_class(payload)[源代码]
extract_padding(s)[源代码]
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                
EIR_Manufacturer_Specific_Data fields

company_id

XLEShortField

None

payload_guess

Possible sublayers: Apple_BLE_Frame

classmethod register_magic_payload(payload_cls, magic_check=None)[源代码]

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.

参数:
  • 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.

抛出:

TypeError -- If magic_check is not specified, and payload_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'')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. EIR_Raw                           
EIR_Raw fields

data

StrLenField

b''

class scapy.layers.bluetooth.EIR_ServiceData16BitUUID(_pkt, /, *, svc_uuid=None)[源代码]

基类:EIR_Element

aliastypes
extract_padding(s)[源代码]
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                   
EIR_ServiceData16BitUUID fields

svc_uuid

XLEShortField

None

payload_guess

Possible sublayers: Eddystone_Frame, Exposure_Notification_Frame

class scapy.layers.bluetooth.EIR_ShortenedLocalName(_pkt, /, *, local_name=b'')[源代码]

基类:EIR_CompleteLocalName

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           LOCAL NAME          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. EIR_ShortenedLocalName                    
EIR_ShortenedLocalName fields

local_name

StrLenField

b''

class scapy.layers.bluetooth.EIR_TX_Power_Level(_pkt, /, *, level=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     LEVEL     |
+-+-+-+-+-+-+-+-+

                     Fig. EIR_TX_Power_Level                      
EIR_TX_Power_Level fields

level

SignedByteField

0

class scapy.layers.bluetooth.HCI_ACL_Hdr(_pkt, /, *, BC=0, PB=0, handle=0, len=None)[源代码]

基类: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                         
HCI_ACL_Hdr fields

BC

BitField (2 bits)

0

PB

BitField (2 bits)

0

handle

BitField (12 bits)

0

len

LEShortField

None

payload_guess

Possible sublayers: L2CAP_Hdr

post_build(p, pay)[源代码]
class scapy.layers.bluetooth.HCI_Cmd_Accept_Connection_Request(_pkt, /, *, bd_addr=None, role=1)[源代码]

基类:Packet

7.1.8 Accept Connection Request command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |      ROLE     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. HCI_Cmd_Accept_Connection_Request              
HCI_Cmd_Accept_Connection_Request fields

bd_addr

LEMACField

None

role

ByteField

1

class scapy.layers.bluetooth.HCI_Cmd_Authentication_Requested(_pkt, /, *, handle=0)[源代码]

基类:Packet

7.1.15 Authentication Requested command

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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. HCI_Cmd_Authentication_Requested               
HCI_Cmd_Authentication_Requested fields

handle

LEShortField

0

基类:Packet

7.1.17 Change Connection Link Key command

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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Fig. HCI_Cmd_Change_Connection_Link_Key              
HCI_Cmd_Change_Connection_Link_Key fields

handle

LEShortField

0

class scapy.layers.bluetooth.HCI_Cmd_Change_Connection_Packet_Type(_pkt, /, *, connection_handle=None, packet_type=0)[源代码]

基类:Packet

7.1.14 Change Connection Packet Type command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       CONNECTION HANDLE       |          PACKET TYPE          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. HCI_Cmd_Change_Connection_Packet_Type            
HCI_Cmd_Change_Connection_Packet_Type fields

connection_handle

XLEShortField

None

packet_type

LEShortField

0

class scapy.layers.bluetooth.HCI_Cmd_Complete_LE_Read_White_List_Size(_pkt, /, *, status=0, size=0)[源代码]

基类: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    |      SIZE     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          Fig. HCI_Cmd_Complete_LE_Read_White_List_Size           
HCI_Cmd_Complete_LE_Read_White_List_Size fields

status

ByteField

0

size

ByteField

0

class scapy.layers.bluetooth.HCI_Cmd_Complete_Read_BD_Addr(_pkt, /, *, addr=None)[源代码]

基类: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                
HCI_Cmd_Complete_Read_BD_Addr fields

addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_Create_Connection(_pkt, /, *, bd_addr=None, packet_type=52248, page_scan_repetition_mode=2, reserved=0, clock_offset=0, allow_role_switch=1)[源代码]

基类:Packet

7.1.5 Create Connection command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |          PACKET TYPE          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PAGE SCAN REPET|    RESERVED   |          CLOCK OFFSET         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|ALLOW ROLE SWIT|
+-+-+-+-+-+-+-+-+

                  Fig. HCI_Cmd_Create_Connection                  
HCI_Cmd_Create_Connection fields

bd_addr

LEMACField

None

packet_type

LEShortField

52248

page_scan_repetition_mode

ByteField

2

reserved

ByteField

0

clock_offset

LEShortField

0

allow_role_switch

ByteField

1

class scapy.layers.bluetooth.HCI_Cmd_Create_Connection_Cancel(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.7 Create Connection Cancel command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. HCI_Cmd_Create_Connection_Cancel               
HCI_Cmd_Create_Connection_Cancel fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_Disconnect(_pkt, /, *, handle=0, reason=19)[源代码]

基类:Packet

7.1.6 Disconnect command

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            |     REASON    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. HCI_Cmd_Disconnect                      
HCI_Cmd_Disconnect fields

handle

XLEShortField

0

reason

ByteField

19

class scapy.layers.bluetooth.HCI_Cmd_Exit_Peiodic_Inquiry_Mode(_pkt, /)[源代码]

基类:Packet

7.1.4 Exit Periodic Inquiry Mode command

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_Hold_Mode(_pkt, /, *, connection_handle=0, hold_mode_max_interval=2, hold_mode_min_interval=2)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       CONNECTION HANDLE       |     HOLD MODE MAX INTERVAL    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     HOLD MODE MIN INTERVAL    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. HCI_Cmd_Hold_Mode                      
HCI_Cmd_Hold_Mode fields

connection_handle

LEShortField

0

hold_mode_max_interval

LEShortField

2

hold_mode_min_interval

LEShortField

2

class scapy.layers.bluetooth.HCI_Cmd_IO_Capability_Request_Reply(_pkt, /, *, bd_addr=None, io_capability=None, oob_data_present=None, authentication_requirement=None)[源代码]

基类:Packet

7.1.29 IO Capability Request Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               | IO CAPABILITY |OOB DATA PRESEN|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|AUTHENTICATION |
+-+-+-+-+-+-+-+-+

             Fig. HCI_Cmd_IO_Capability_Request_Reply             
HCI_Cmd_IO_Capability_Request_Reply fields

bd_addr

LEMACField

None

io_capability

ByteEnumField

None

oob_data_present

ByteEnumField

None

authentication_requirement

ByteEnumField

None

class scapy.layers.bluetooth.HCI_Cmd_Inquiry(_pkt, /, *, lap=10390323, inquiry_length=0, num_responses=0)[源代码]

基类:Packet

7.1.1 Inquiry command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              LAP                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| INQUIRY LENGTH| NUM RESPONSES |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. HCI_Cmd_Inquiry                       
HCI_Cmd_Inquiry fields

lap

XLE3BytesField

10390323

inquiry_length

ByteField

0

num_responses

ByteField

0

class scapy.layers.bluetooth.HCI_Cmd_Inquiry_Cancel(_pkt, /)[源代码]

基类:Packet

7.1.2 Inquiry Cancel command

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_LE_Add_Device_To_Filter_Accept_List(_pkt, /, *, address_type=0, address=None)[源代码]

基类: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 TYPE |                    ADDRESS                    |
+-+-+-+-+-+-+-+-+                               +-+-+-+-+-+-+-+-+
|                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

         Fig. HCI_Cmd_LE_Add_Device_To_Filter_Accept_List         
HCI_Cmd_LE_Add_Device_To_Filter_Accept_List fields

address_type

ByteEnumField

0

address

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_LE_Clear_Filter_Accept_List(_pkt, /)[源代码]

基类: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)[源代码]

基类: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                 
HCI_Cmd_LE_Connection_Update fields

handle

XLEShortField

0

min_interval

XLEShortField

0

max_interval

XLEShortField

0

latency

XLEShortField

0

timeout

XLEShortField

0

min_ce

LEShortField

0

max_ce

LEShortField

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)[源代码]

基类: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                 
HCI_Cmd_LE_Create_Connection fields

interval

LEShortField

96

window

LEShortField

48

filter

ByteEnumField

0

patype

ByteEnumField

0

paddr

LEMACField

None

atype

ByteEnumField

0

min_interval

LEShortField

40

max_interval

LEShortField

56

latency

LEShortField

0

timeout

LEShortField

42

min_ce

LEShortField

0

max_ce

LEShortField

0

class scapy.layers.bluetooth.HCI_Cmd_LE_Create_Connection_Cancel(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_LE_Enable_Encryption(_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')[源代码]

基类: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_Enable_Encryption                 
HCI_Cmd_LE_Enable_Encryption fields

handle

LEShortField

0

rand

StrFixedLenField

None

ediv

XLEShortField

0

ltk

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

class scapy.layers.bluetooth.HCI_Cmd_LE_Long_Term_Key_Request_Negative_Reply(_pkt, /, *, handle=0)[源代码]

基类: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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       Fig. HCI_Cmd_LE_Long_Term_Key_Request_Negative_Reply       
HCI_Cmd_LE_Long_Term_Key_Request_Negative_Reply fields

handle

LEShortField

0

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')[源代码]

基类: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            
HCI_Cmd_LE_Long_Term_Key_Request_Reply fields

handle

LEShortField

0

ltk

StrFixedLenField

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_V1(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_LE_Read_Buffer_Size_V2(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_LE_Read_Filter_Accept_List_Size(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_LE_Read_Local_Supported_Features(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_LE_Read_Remote_Features(_pkt, /, *, handle=64)[源代码]

基类: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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. HCI_Cmd_LE_Read_Remote_Features               
HCI_Cmd_LE_Read_Remote_Features fields

handle

LEShortField

64

class scapy.layers.bluetooth.HCI_Cmd_LE_Remove_Device_From_Filter_Accept_List(_pkt, /, *, address_type=0, address=None)[源代码]

基类:HCI_Cmd_LE_Add_Device_To_Filter_Accept_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  ADDRESS TYPE |                    ADDRESS                    |
+-+-+-+-+-+-+-+-+                               +-+-+-+-+-+-+-+-+
|                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Fig. HCI_Cmd_LE_Remove_Device_From_Filter_Accept_List       
HCI_Cmd_LE_Remove_Device_From_Filter_Accept_List fields

address_type

ByteEnumField

0

address

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Advertise_Enable(_pkt, /, *, enable=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     ENABLE    |
+-+-+-+-+-+-+-+-+

               Fig. HCI_Cmd_LE_Set_Advertise_Enable               
HCI_Cmd_LE_Set_Advertise_Enable fields

enable

ByteField

0

class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Advertising_Data(_pkt, /, *, len=None, data=[])[源代码]

基类: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      |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. HCI_Cmd_LE_Set_Advertising_Data               
HCI_Cmd_LE_Set_Advertising_Data fields

len

FieldLenField

None

data

PadField

[]

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)[源代码]

基类: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            
HCI_Cmd_LE_Set_Advertising_Parameters fields

interval_min

LEShortField

2048

interval_max

LEShortField

2048

adv_type

ByteEnumField

0

oatype

ByteEnumField

0

datype

ByteEnumField

0

daddr

LEMACField

None

channel_map

ByteField

7

filter_policy

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Random_Address(_pkt, /, *, address=None)[源代码]

基类: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                
HCI_Cmd_LE_Set_Random_Address fields

address

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Scan_Enable(_pkt, /, *, enable=1, filter_dups=1)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     ENABLE    |  FILTER DUPS  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. HCI_Cmd_LE_Set_Scan_Enable                  
HCI_Cmd_LE_Set_Scan_Enable fields

enable

ByteField

1

filter_dups

ByteField

1

class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Scan_Parameters(_pkt, /, *, type=0, interval=16, window=16, atype=0, policy=0)[源代码]

基类: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                
HCI_Cmd_LE_Set_Scan_Parameters fields

type

ByteEnumField

0

interval

XLEShortField

16

window

XLEShortField

16

atype

ByteEnumField

0

policy

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Cmd_LE_Set_Scan_Response_Data(_pkt, /, *, len=None, data=b'')[源代码]

基类: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      |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. HCI_Cmd_LE_Set_Scan_Response_Data              
HCI_Cmd_LE_Set_Scan_Response_Data fields

len

FieldLenField

None

data

StrLenField

b''

基类:Packet

7.1.11 Link Key Request Negative Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Fig. HCI_Cmd_Link_Key_Request_Negative_Reply           
HCI_Cmd_Link_Key_Request_Negative_Reply fields

bd_addr

LEMACField

None

基类:Packet

7.1.10 Link Key Request Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            LINK KEY           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. HCI_Cmd_Link_Key_Request_Reply                
HCI_Cmd_Link_Key_Request_Reply fields

bd_addr

LEMACField

None

link_key

NBytesField

None

基类:Packet

7.1.18 Change Connection Link Key command

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    |
+-+-+-+-+-+-+-+-+

                 Fig. HCI_Cmd_Link_Key_Selection                  
HCI_Cmd_Link_Key_Selection fields

handle

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Cmd_PIN_Code_Request_Negative_Reply(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.13 PIN Code Request Negative Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Fig. HCI_Cmd_PIN_Code_Request_Negative_Reply           
HCI_Cmd_PIN_Code_Request_Negative_Reply fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_PIN_Code_Request_Reply(_pkt, /, *, bd_addr=None, pin_code_length=7, pin_code=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[源代码]

基类:Packet

7.1.12 PIN Code Request Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |PIN CODE LENGTH|    PIN CODE   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                               +-+-+-+-+-+-+-+-+
|                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. HCI_Cmd_PIN_Code_Request_Reply                
HCI_Cmd_PIN_Code_Request_Reply fields

bd_addr

LEMACField

None

pin_code_length

ByteField

7

pin_code

NBytesField

b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

class scapy.layers.bluetooth.HCI_Cmd_Periodic_Inquiry_Mode(_pkt, /, *, max_period_length=3, min_period_length=2, lap=10390323, inquiry_length=0, num_responses=0)[源代码]

基类:Packet

7.1.3 Periodic Inquiry Mode command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       MAX PERIOD LENGTH       |       MIN PERIOD LENGTH       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              LAP                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| INQUIRY LENGTH| NUM RESPONSES |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. HCI_Cmd_Periodic_Inquiry_Mode                
HCI_Cmd_Periodic_Inquiry_Mode fields

max_period_length

LEShortField

3

min_period_length

LEShortField

2

lap

XLE3BytesField

10390323

inquiry_length

ByteField

0

num_responses

ByteField

0

class scapy.layers.bluetooth.HCI_Cmd_Read_BD_Addr(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_Read_LE_Host_Support(_pkt, /)[源代码]

基类:Packet

aliastypes

基类:Packet

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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. HCI_Cmd_Read_Link_Quality                  
HCI_Cmd_Read_Link_Quality fields

handle

LEShortField

0

class scapy.layers.bluetooth.HCI_Cmd_Read_Loopback_Mode(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_Read_RSSI(_pkt, /, *, handle=0)[源代码]

基类: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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. HCI_Cmd_Read_RSSI                      
HCI_Cmd_Read_RSSI fields

handle

LEShortField

0

class scapy.layers.bluetooth.HCI_Cmd_Read_Remote_Extended_Features(_pkt, /, *, connection_handle=None, page_number=None)[源代码]

基类:Packet

7.1.22 Read Remote Extended Features command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       CONNECTION HANDLE       |  PAGE NUMBER  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. HCI_Cmd_Read_Remote_Extended_Features            
HCI_Cmd_Read_Remote_Extended_Features fields

connection_handle

LEShortField

None

page_number

ByteField

None

class scapy.layers.bluetooth.HCI_Cmd_Read_Remote_Supported_Features(_pkt, /, *, connection_handle=None)[源代码]

基类:Packet

7.1.21 Read Remote Supported Features command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       CONNECTION HANDLE       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Fig. HCI_Cmd_Read_Remote_Supported_Features            
HCI_Cmd_Read_Remote_Supported_Features fields

connection_handle

LEShortField

None

class scapy.layers.bluetooth.HCI_Cmd_Reject_Connection_Response(_pkt, /, *, bd_addr=None, reason=1)[源代码]

基类:Packet

7.1.9 Reject Connection Request command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |     REASON    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Fig. HCI_Cmd_Reject_Connection_Response              
HCI_Cmd_Reject_Connection_Response fields

bd_addr

LEMACField

None

reason

ByteField

1

class scapy.layers.bluetooth.HCI_Cmd_Remote_Name_Request(_pkt, /, *, bd_addr=None, page_scan_repetition_mode=2, reserved=0, clock_offset=0)[源代码]

基类:Packet

7.1.19 Remote Name Request command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |PAGE SCAN REPET|    RESERVED   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          CLOCK OFFSET         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. HCI_Cmd_Remote_Name_Request                 
HCI_Cmd_Remote_Name_Request fields

bd_addr

LEMACField

None

page_scan_repetition_mode

ByteField

2

reserved

ByteField

0

clock_offset

LEShortField

0

class scapy.layers.bluetooth.HCI_Cmd_Remote_Name_Request_Cancel(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.20 Remote Name Request Cancel command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Fig. HCI_Cmd_Remote_Name_Request_Cancel              
HCI_Cmd_Remote_Name_Request_Cancel fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_Remote_OOB_Data_Request_Negative_Reply(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.35 Remote OOB Data Request Negative Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       Fig. HCI_Cmd_Remote_OOB_Data_Request_Negative_Reply        
HCI_Cmd_Remote_OOB_Data_Request_Negative_Reply fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_Remote_OOB_Data_Request_Reply(_pkt, /, *, bd_addr=None, C=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', R=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')[源代码]

基类:Packet

7.1.34 Remote OOB Data Request Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |               C               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |               R               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. HCI_Cmd_Remote_OOB_Data_Request_Reply            
HCI_Cmd_Remote_OOB_Data_Request_Reply fields

bd_addr

LEMACField

None

C

NBytesField

b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

R

NBytesField

b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

class scapy.layers.bluetooth.HCI_Cmd_Reset(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.layers.bluetooth.HCI_Cmd_Set_Connection_Encryption(_pkt, /, *, handle=0, encryption_enable=0)[源代码]

基类:Packet

7.1.16 Set Connection Encryption command

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            |ENCRYPTION ENAB|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. HCI_Cmd_Set_Connection_Encryption              
HCI_Cmd_Set_Connection_Encryption fields

handle

LEShortField

0

encryption_enable

ByteField

0

class scapy.layers.bluetooth.HCI_Cmd_Set_Event_Filter(_pkt, /, *, type=0)[源代码]

基类: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_Cmd_Set_Event_Filter                   
HCI_Cmd_Set_Event_Filter fields

type

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Cmd_Set_Event_Mask(_pkt, /, *, mask=b'\xff\xff\xfb\xff\x07\xf8\xbf=')[源代码]

基类: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                    
HCI_Cmd_Set_Event_Mask fields

mask

StrFixedLenField

b'\xff\xff\xfb\xff\x07\xf8\xbf='

class scapy.layers.bluetooth.HCI_Cmd_User_Confirmation_Request_Negative_Reply(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.31 User Confirmation Request Negative Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Fig. HCI_Cmd_User_Confirmation_Request_Negative_Reply       
HCI_Cmd_User_Confirmation_Request_Negative_Reply fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_User_Confirmation_Request_Reply(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.30 User Confirmation Request Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Fig. HCI_Cmd_User_Confirmation_Request_Reply           
HCI_Cmd_User_Confirmation_Request_Reply fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_User_Passkey_Request_Negative_Reply(_pkt, /, *, bd_addr=None)[源代码]

基类:Packet

7.1.33 User Passkey Request Negative Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

         Fig. HCI_Cmd_User_Passkey_Request_Negative_Reply         
HCI_Cmd_User_Passkey_Request_Negative_Reply fields

bd_addr

LEMACField

None

class scapy.layers.bluetooth.HCI_Cmd_User_Passkey_Request_Reply(_pkt, /, *, bd_addr=None, numeric_value=None)[源代码]

基类:Packet

7.1.32 User Passkey Request Reply command

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BD ADDR                            |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |         NUMERIC VALUE         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Fig. HCI_Cmd_User_Passkey_Request_Reply              
HCI_Cmd_User_Passkey_Request_Reply fields

bd_addr

LEMACField

None

numeric_value

LEIntField

None

class scapy.layers.bluetooth.HCI_Cmd_Write_Connect_Accept_Timeout(_pkt, /, *, timeout=32000)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            TIMEOUT            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. HCI_Cmd_Write_Connect_Accept_Timeout             
HCI_Cmd_Write_Connect_Accept_Timeout fields

timeout

LEShortField

32000

class scapy.layers.bluetooth.HCI_Cmd_Write_Extended_Inquiry_Response(_pkt, /, *, fec_required=0, eir_data=[])[源代码]

基类: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           
HCI_Cmd_Write_Extended_Inquiry_Response fields

fec_required

ByteField

0

eir_data

PacketListField

[]

class scapy.layers.bluetooth.HCI_Cmd_Write_LE_Host_Support(_pkt, /, *, supported=1, unused=1)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   SUPPORTED   |     UNUSED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. HCI_Cmd_Write_LE_Host_Support                
HCI_Cmd_Write_LE_Host_Support fields

supported

ByteField

1

unused

ByteField

1

class scapy.layers.bluetooth.HCI_Cmd_Write_Local_Name(_pkt, /, *, name='HCI_Write_Local_Name')[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              NAME             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. HCI_Cmd_Write_Local_Name                   
HCI_Cmd_Write_Local_Name fields

name

StrField

'HCI_Write_Local_Name'

class scapy.layers.bluetooth.HCI_Cmd_Write_Loopback_Mode(_pkt, /, *, loopback_mode=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LOOPBACK MODE |
+-+-+-+-+-+-+-+-+

                 Fig. HCI_Cmd_Write_Loopback_Mode                 
HCI_Cmd_Write_Loopback_Mode fields

loopback_mode

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Command_Hdr(_pkt, /, *, ogf=0, ocf=0, len=None)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    OGF    |        OCF        |      LEN      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. HCI_Command_Hdr                       
HCI_Command_Hdr fields

ogf

XBitField (6 bits)

0

ocf

XBitField (10 bits)

0

len

LenField

None

property opcode
payload_guess

Possible sublayers: HCI_Cmd_Accept_Connection_Request, HCI_Cmd_Authentication_Requested, HCI_Cmd_Change_Connection_Link_Key, HCI_Cmd_Change_Connection_Packet_Type, HCI_Cmd_Create_Connection_Cancel, HCI_Cmd_Create_Connection, HCI_Cmd_Disconnect, HCI_Cmd_Exit_Peiodic_Inquiry_Mode, HCI_Cmd_Hold_Mode, HCI_Cmd_IO_Capability_Request_Reply, HCI_Cmd_Inquiry_Cancel, HCI_Cmd_Inquiry, HCI_Cmd_LE_Add_Device_To_Filter_Accept_List, HCI_Cmd_LE_Clear_Filter_Accept_List, HCI_Cmd_LE_Connection_Update, HCI_Cmd_LE_Create_Connection_Cancel, HCI_Cmd_LE_Create_Connection, HCI_Cmd_LE_Enable_Encryption, HCI_Cmd_LE_Long_Term_Key_Request_Negative_Reply, HCI_Cmd_LE_Long_Term_Key_Request_Reply, HCI_Cmd_LE_Read_Buffer_Size_V1, HCI_Cmd_LE_Read_Buffer_Size_V2, HCI_Cmd_LE_Read_Filter_Accept_List_Size, HCI_Cmd_LE_Read_Local_Supported_Features, HCI_Cmd_LE_Read_Remote_Features, HCI_Cmd_LE_Remove_Device_From_Filter_Accept_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_Link_Key_Request_Negative_Reply, HCI_Cmd_Link_Key_Request_Reply, HCI_Cmd_PIN_Code_Request_Reply, HCI_Cmd_Periodic_Inquiry_Mode, HCI_Cmd_Read_BD_Addr, HCI_Cmd_Read_LE_Host_Support, HCI_Cmd_Read_Link_Quality, HCI_Cmd_Read_Loopback_Mode, HCI_Cmd_Read_RSSI, HCI_Cmd_Read_Remote_Supported_Features, HCI_Cmd_Reject_Connection_Response, HCI_Cmd_Remote_Name_Request_Cancel, HCI_Cmd_Remote_Name_Request, HCI_Cmd_Remote_OOB_Data_Request_Negative_Reply, HCI_Cmd_Remote_OOB_Data_Request_Reply, HCI_Cmd_Reset, HCI_Cmd_Set_Connection_Encryption, HCI_Cmd_Set_Event_Filter, HCI_Cmd_Set_Event_Mask, HCI_Cmd_User_Confirmation_Request_Negative_Reply, HCI_Cmd_User_Confirmation_Request_Reply, HCI_Cmd_User_Passkey_Request_Negative_Reply, HCI_Cmd_User_Passkey_Request_Reply, HCI_Cmd_Write_Connect_Accept_Timeout, HCI_Cmd_Write_Extended_Inquiry_Response, HCI_Cmd_Write_LE_Host_Support, HCI_Cmd_Write_Local_Name, HCI_Cmd_Write_Loopback_Mode

post_build(p, pay)[源代码]
class scapy.layers.bluetooth.HCI_Event_Command_Complete(_pkt, /, *, number=0, opcode=0, status=0)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                  
HCI_Event_Command_Complete fields

number

ByteField

0

opcode

XLEShortField

0

status

ByteEnumField

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)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                   
HCI_Event_Command_Status fields

status

ByteEnumField

0

number

ByteField

0

opcode

XLEShortField

None

class scapy.layers.bluetooth.HCI_Event_Connection_Complete(_pkt, /, *, status=0, handle=256, bd_addr=None, link_type=0, encryption_enaled=0)[源代码]

基类:Packet

7.7.3 Connection Complete event

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            |    BD ADDR    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |   LINK TYPE   |ENCRYPTION ENAL|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. HCI_Event_Connection_Complete                
HCI_Event_Connection_Complete fields

status

ByteField

0

handle

LEShortField

256

bd_addr

LEMACField

None

link_type

ByteEnumField

0

encryption_enaled

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Event_Disconnection_Complete(_pkt, /, *, status=0, handle=0, reason=0)[源代码]

基类: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               
HCI_Event_Disconnection_Complete fields

status

ByteEnumField

0

handle

LEShortField

0

reason

XByteField

0

class scapy.layers.bluetooth.HCI_Event_Encryption_Change(_pkt, /, *, status=0, handle=0, enabled=0)[源代码]

基类: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                 
HCI_Event_Encryption_Change fields

status

ByteEnumField

0

handle

LEShortField

0

enabled

ByteEnumField

0

class scapy.layers.bluetooth.HCI_Event_Hdr(_pkt, /, *, code=0, len=None)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                        
HCI_Event_Hdr fields

code

XByteField

0

len

LenField

None

payload_guess

Possible sublayers: HCI_Event_Command_Complete, HCI_Event_Command_Status, HCI_Event_Connection_Complete, HCI_Event_Disconnection_Complete, HCI_Event_Encryption_Change, HCI_Event_Inquiry_Complete, HCI_Event_LE_Meta, HCI_Event_Number_Of_Completed_Packets, HCI_Event_Remote_Name_Request_Complete

class scapy.layers.bluetooth.HCI_Event_Inquiry_Complete(_pkt, /, *, status=0)[源代码]

基类:Packet

7.7.1 Inquiry Complete event

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    |
+-+-+-+-+-+-+-+-+

                 Fig. HCI_Event_Inquiry_Complete                  
HCI_Event_Inquiry_Complete fields

status

ByteField

0

class scapy.layers.bluetooth.HCI_Event_LE_Meta(_pkt, /, *, event=0)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                      
HCI_Event_LE_Meta fields

event

ByteEnumField

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)[源代码]

基类: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    |
+-+-+-+-+-+-+-+-+

            Fig. HCI_Event_Number_Of_Completed_Packets            
HCI_Event_Number_Of_Completed_Packets fields

number

ByteField

0

class scapy.layers.bluetooth.HCI_Event_Remote_Name_Request_Complete(_pkt, /, *, status=0, bd_addr=None, remote_name=b'\x00')[源代码]

基类: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    |                    BD ADDR                    |
+-+-+-+-+-+-+-+-+                               +-+-+-+-+-+-+-+-+
|                                               |  REMOTE NAME  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                               +-+-+-+-+-+-+-+-+
|                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Fig. HCI_Event_Remote_Name_Request_Complete            
HCI_Event_Remote_Name_Request_Complete fields

status

ByteField

0

bd_addr

LEMACField

None

remote_name

StrFixedLenField

b'\x00'

class scapy.layers.bluetooth.HCI_Hdr(_pkt, /, *, type=2)[源代码]

基类: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                           
HCI_Hdr fields

type

ByteEnumField

2

mysummary()[源代码]
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)[源代码]

基类:Packet

aliastypes
extract_padding(s)[源代码]
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                
HCI_LE_Meta_Advertising_Report fields

type

ByteEnumField

0

atype

ByteEnumField

0

addr

LEMACField

None

len

FieldLenField

None

data

PacketListField

[]

rssi

SignedByteField

0

class scapy.layers.bluetooth.HCI_LE_Meta_Advertising_Reports(_pkt, /, *, len=None, reports=[])[源代码]

基类: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               
HCI_LE_Meta_Advertising_Reports fields

len

FieldLenField

None

reports

PacketListField

[]

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)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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               
HCI_LE_Meta_Connection_Complete fields

status

ByteEnumField

0

handle

LEShortField

0

role

ByteEnumField

0

patype

ByteEnumField

0

paddr

LEMACField

None

interval

LEShortField

54

latency

LEShortField

0

supervision

LEShortField

42

clock_latency

XByteField

5

class scapy.layers.bluetooth.HCI_LE_Meta_Connection_Update_Complete(_pkt, /, *, status=0, handle=0, interval=54, latency=0, timeout=42)[源代码]

基类: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            
HCI_LE_Meta_Connection_Update_Complete fields

status

ByteEnumField

0

handle

LEShortField

0

interval

LEShortField

54

latency

LEShortField

0

timeout

LEShortField

42

class scapy.layers.bluetooth.HCI_LE_Meta_Long_Term_Key_Request(_pkt, /, *, handle=0, rand=None, ediv=0)[源代码]

基类: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              
HCI_LE_Meta_Long_Term_Key_Request fields

handle

LEShortField

0

rand

StrFixedLenField

None

ediv

XLEShortField

0

class scapy.layers.bluetooth.HCI_PHDR_Hdr(_pkt, /, *, direction=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           DIRECTION                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. HCI_PHDR_Hdr                         
HCI_PHDR_Hdr fields

direction

IntField

0

payload_guess

Possible sublayers: HCI_Hdr

class scapy.layers.bluetooth.L2CAP_CmdHdr(_pkt, /, *, code=8, id=0, len=None)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                         
L2CAP_CmdHdr fields

code

ByteEnumField

8

id

ByteField

0

len

LEShortField

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

post_build(p, pay)[源代码]
class scapy.layers.bluetooth.L2CAP_CmdRej(_pkt, /, *, reason=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             REASON            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. L2CAP_CmdRej                         
L2CAP_CmdRej fields

reason

LEShortField

0

class scapy.layers.bluetooth.L2CAP_ConfReq(_pkt, /, *, dcid=0, flags=0)[源代码]

基类: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             |             FLAGS             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. L2CAP_ConfReq                        
L2CAP_ConfReq fields

dcid

LEShortField

0

flags

LEShortField

0

class scapy.layers.bluetooth.L2CAP_ConfResp(_pkt, /, *, scid=0, flags=0, result=0)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                        
L2CAP_ConfResp fields

scid

LEShortField

0

flags

LEShortField

0

result

LEShortEnumField

0

class scapy.layers.bluetooth.L2CAP_ConnReq(_pkt, /, *, psm=0, scid=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PSM              |              SCID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. L2CAP_ConnReq                        
L2CAP_ConnReq fields

psm

LEShortEnumField

0

scid

LEShortField

0

class scapy.layers.bluetooth.L2CAP_ConnResp(_pkt, /, *, dcid=0, scid=0, result=0, status=0)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                        
L2CAP_ConnResp fields

dcid

LEShortField

0

scid

LEShortField

0

result

LEShortEnumField

0

status

LEShortEnumField

0

class scapy.layers.bluetooth.L2CAP_Connection_Parameter_Update_Request(_pkt, /, *, min_interval=0, max_interval=0, slave_latency=0, timeout_mult=0)[源代码]

基类: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          
L2CAP_Connection_Parameter_Update_Request fields

min_interval

LEShortField

0

max_interval

LEShortField

0

slave_latency

LEShortField

0

timeout_mult

LEShortField

0

class scapy.layers.bluetooth.L2CAP_Connection_Parameter_Update_Response(_pkt, /, *, move_result=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MOVE RESULT          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

         Fig. L2CAP_Connection_Parameter_Update_Response          
L2CAP_Connection_Parameter_Update_Response fields

move_result

LEShortField

0

class scapy.layers.bluetooth.L2CAP_DisconnReq(_pkt, /, *, dcid=0, scid=0)[源代码]

基类: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             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. L2CAP_DisconnReq                       
L2CAP_DisconnReq fields

dcid

LEShortField

0

scid

LEShortField

0

class scapy.layers.bluetooth.L2CAP_DisconnResp(_pkt, /, *, dcid=0, scid=0)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. L2CAP_DisconnResp                      
L2CAP_DisconnResp fields

dcid

LEShortField

0

scid

LEShortField

0

class scapy.layers.bluetooth.L2CAP_Hdr(_pkt, /, *, len=None, cid=0)[源代码]

基类: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                          
L2CAP_Hdr fields

len

LEShortField

None

cid

LEShortEnumField

0

payload_guess

Possible sublayers: ATT_Hdr, L2CAP_CmdHdr, SM_Hdr

post_build(p, pay)[源代码]
class scapy.layers.bluetooth.L2CAP_InfoReq(_pkt, /, *, type=0, data=b'')[源代码]

基类: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             |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. L2CAP_InfoReq                        
L2CAP_InfoReq fields

type

LEShortEnumField

0

data

StrField

b''

class scapy.layers.bluetooth.L2CAP_InfoResp(_pkt, /, *, type=0, result=0, data=b'')[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
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                        
L2CAP_InfoResp fields

type

LEShortField

0

result

LEShortEnumField

0

data

StrField

b''

class scapy.layers.bluetooth.LowEnergyBeaconHelper[源代码]

基类: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 and scapy.contrib.ibeacon for examples.

base_eir = [<EIR_Hdr  type=flags |<EIR_Flags  flags=general_disc_mode+br_edr_not_supported |>>]
build_advertising_report()[源代码]

Builds a HCI_LE_Meta_Advertising_Report containing this frame.

返回类型:

scapy.bluetooth.HCI_LE_Meta_Advertising_Report

build_eir()[源代码]

Builds a list of EIR messages to wrap this frame.

Users of this helper must implement this method.

返回:

List of HCI_Hdr with payloads that describe this beacon type

返回类型:

list[scapy.bluetooth.HCI_Hdr]

build_set_advertising_data()[源代码]

Builds a HCI_Cmd_LE_Set_Advertising_Data containing this frame.

This includes the HCI_Hdr and HCI_Command_Hdr layers.

返回类型:

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')[源代码]

基类: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                          
SM_Confirm fields

confirm

StrFixedLenField

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')[源代码]

基类: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                        
SM_DHKey_Check fields

dhkey_check

StrFixedLenField

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')[源代码]

基类: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                  
SM_Encryption_Information fields

ltk

StrFixedLenField

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)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     REASON    |
+-+-+-+-+-+-+-+-+

                          Fig. SM_Failed                          
SM_Failed fields

reason

XByteField

0

class scapy.layers.bluetooth.SM_Hdr(_pkt, /, *, sm_command=None)[源代码]

基类: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_Hdr fields

sm_command

ByteField

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)[源代码]

基类: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               
SM_Identity_Address_Information fields

atype

ByteEnumField

0

address

LEMACField

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')[源代码]

基类: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                   
SM_Identity_Information fields

irk

StrFixedLenField

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')[源代码]

基类: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                   
SM_Master_Identification fields

ediv

XLEShortField

0

rand

StrFixedLenField

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)[源代码]

基类: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                      
SM_Pairing_Request fields

iocap

ByteEnumField

3

oob

ByteEnumField

0

authentication

BitField (8 bits)

0

max_key_size

ByteField

16

initiator_key_distribution

ByteField

0

responder_key_distribution

ByteField

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)[源代码]

基类: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                     
SM_Pairing_Response fields

iocap

ByteEnumField

3

oob

ByteEnumField

0

authentication

BitField (8 bits)

0

max_key_size

ByteField

16

initiator_key_distribution

ByteField

0

responder_key_distribution

ByteField

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')[源代码]

基类: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                        
SM_Public_Key fields

key_x

StrFixedLenField

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

StrFixedLenField

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')[源代码]

基类: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                          
SM_Random fields

random

StrFixedLenField

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')[源代码]

基类: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                    
SM_Signing_Information fields

csrk

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

class scapy.layers.bluetooth.sockaddr_hci[源代码]

基类:Structure

hci_channel

Structure/Union member

hci_dev

Structure/Union member

sin_family

Structure/Union member

scapy.layers.bluetooth.srbt(bt_address, pkts, inter=0.1, *args, **kargs)[源代码]

send and receive using a bluetooth socket

scapy.layers.bluetooth.srbt1(bt_address, pkts, *args, **kargs)[源代码]

send and receive 1 packet using a bluetooth socket