示例#1
0
 def ConnectionRequestCapture():
     return Capture(
         HciMatchers.EventWithCode(
             hci_packets.EventCode.CONNECTION_REQUEST),
         lambda packet: hci_packets.ConnectionRequestView(
             HciMatchers.ExtractEventWithCode(
                 packet.event, hci_packets.EventCode.CONNECTION_REQUEST)))
示例#2
0
 def ReadBdAddrCompleteCapture():
     return Capture(lambda packet: b'\x0e\x0a\x01\x09\x10' in packet.event,
       lambda packet: hci_packets.ReadBdAddrCompleteView(
                   hci_packets.CommandCompleteView(
                             hci_packets.EventPacketView(
                                 bt_packets.PacketViewLittleEndian(
                                     list(packet.event))))))
示例#3
0
 def ConnectionCompleteCapture():
     return Capture(
         HciMatchers.EventWithCode(
             hci_packets.EventCode.CONNECTION_COMPLETE),
         lambda packet: hci_packets.ConnectionCompleteView(
             HciMatchers.ExtractEventWithCode(
                 packet.event, hci_packets.EventCode.CONNECTION_COMPLETE)))
示例#4
0
 def ReadBdAddrCompleteCapture():
     return Capture(
         lambda packet: packet.payload[0:5] == b'\x0e\x0a\x01\x09\x10',
         lambda packet: hci_packets.ReadBdAddrCompleteView(
             hci_packets.CommandCompleteView(
                 hci_packets.EventPacketView(
                     bt_packets.PacketViewLittleEndian(list(packet.payload))
                 ))))
示例#5
0
 def LeConnectionCompleteCapture():
     return Capture(lambda packet: packet.event[0] == 0x3e
                    and (packet.event[2] == 0x01 or packet.event[2] == 0x0a),
         lambda packet: hci_packets.LeConnectionCompleteView(
             hci_packets.LeMetaEventView(
                             hci_packets.EventPacketView(
                                 bt_packets.PacketViewLittleEndian(
                                     list(packet.event))))))
示例#6
0
 def ReadLocalOobExtendedDataCompleteCapture():
     return Capture(
         HciMatchers.CommandComplete(hci_packets.OpCode.READ_LOCAL_OOB_EXTENDED_DATA),
         lambda packet: HciMatchers.ExtractMatchingCommandComplete(packet.payload, hci_packets.OpCode.READ_LOCAL_OOB_EXTENDED_DATA)
     )
示例#7
0
 def DisplayPasskey():
     return Capture(SecurityMatchers.UiMsg(UiMsgType.DISPLAY_PASSKEY),
                    SecurityCaptures._extract_passkey)
示例#8
0
 def CreditBasedConnectionResponse():
     return Capture(L2capMatchers.CreditBasedConnectionResponse(),
                    L2capCaptures._extract_credit_based_connection_response)
示例#9
0
 def CreditBasedConnectionRequest(psm):
     return Capture(L2capMatchers.CreditBasedConnectionRequest(psm),
                    L2capCaptures._extract_credit_based_connection_request)
示例#10
0
 def ConfigurationRequest(cid=None):
     return Capture(L2capMatchers.ConfigurationRequest(cid),
                    L2capCaptures._extract_configuration_request)
示例#11
0
 def IsoCigEstablished(type):
     return Capture(
         lambda event: True if event.message_type == type else False,
         PyLeIso._extract_cis_handles)
示例#12
0
 def ConnectionRequestCapture():
     return Capture(lambda packet: b'\x04\x0a' in packet.event,
       lambda packet: hci_packets.ConnectionRequestView(
                             hci_packets.EventPacketView(
                                 bt_packets.PacketViewLittleEndian(
                                     list(packet.event)))))
示例#13
0
 def DisconnectionCompleteCapture():
     return Capture(
         lambda packet: packet.payload[0:2] == b'\x05\x04',
         lambda packet: hci_packets.DisconnectionCompleteView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(list(packet.payload)))))
示例#14
0
 def ConnectionRequestCapture():
     return Capture(
         lambda packet: packet.payload[0:2] == b'\x04\x0a',
         lambda packet: hci_packets.ConnectionRequestView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(list(packet.payload)))))
示例#15
0
 def LinkSecurityInterfaceCallbackEvent(type):
     return Capture(L2capMatchers.LinkSecurityInterfaceCallbackEvent(type), L2capCaptures._extract_address)
示例#16
0
 def SimplePairingCompleteCapture():
     return Capture(HciMatchers.EventWithCode(hci_packets.EventCode.SIMPLE_PAIRING_COMPLETE),
         lambda packet: hci_packets.SimplePairingCompleteView(
             HciMatchers.ExtractEventWithCode(packet.payload, hci_packets.EventCode.SIMPLE_PAIRING_COMPLETE)))
示例#17
0
 def DisconnectionCompleteCapture():
     return Capture(
         HciMatchers.EventWithCode(hci_packets.EventCode.DISCONNECTION_COMPLETE),
         lambda packet: hci_packets.DisconnectionCompleteView(
             HciMatchers.ExtractEventWithCode(packet.payload, hci_packets.EventCode.DISCONNECTION_COMPLETE)))
示例#18
0
 def ConnectionCompleteCapture():
     return Capture(lambda packet: b'\x03\x0b\x00' in packet.event,
       lambda packet: hci_packets.ConnectionCompleteView(
                             hci_packets.EventPacketView(
                                 bt_packets.PacketViewLittleEndian(
                                     list(packet.event)))))
示例#19
0
 def ConnectionCompleteCapture():
     return Capture(
         lambda packet: packet.payload[0:3] == b'\x03\x0b\x00',
         lambda packet: hci_packets.ConnectionCompleteView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(list(packet.payload)))))
示例#20
0
 def LeConnectionCompleteCapture():
     return Capture(
         HciMatchers.LeConnectionComplete(), lambda packet: HciMatchers.
         ExtractLeConnectionComplete(packet.event))
示例#21
0
 def ReadBdAddrCompleteCapture():
     return Capture(
         HciMatchers.CommandComplete(hci_packets.OpCode.READ_BD_ADDR),
         lambda packet: hci_packets.ReadBdAddrCompleteView(
             HciMatchers.ExtractMatchingCommandComplete(
                 packet.event, hci_packets.OpCode.READ_BD_ADDR)))
示例#22
0
 def ConnectionRequest(psm):
     return Capture(L2capMatchers.ConnectionRequest(psm),
                    L2capCaptures._extract_connection_request)
示例#23
0
 def ConnectionResponse(scid):
     return Capture(L2capMatchers.ConnectionResponse(scid),
                    L2capCaptures._extract_connection_response)
示例#24
0
 def IsoCigComplete(type=None):
     return Capture(
         lambda event: True if event.message_type == type else False,
         PyLeIso._extract_cis_handles)