This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
from scapy.utils import rdpcap | |
from scapy.packet import Raw | |
from scapy.layers.bluetooth import L2CAP_Hdr | |
from statistics import mean, stdev | |
def get_hid_pkt_intervals(packets): | |
prev = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x05, 0x01, // Usage Page (Generic Desktop Ctrls) | |
0x09, 0x05, // Usage (Game Pad) | |
0xA1, 0x01, // Collection (Application) | |
0x85, 0x01, // Report ID (1) | |
0x09, 0x01, // Usage (Pointer) | |
0xA1, 0x00, // Collection (Physical) | |
0x09, 0x30, // Usage (X) | |
0x09, 0x31, // Usage (Y) | |
0x15, 0x00, // Logical Minimum (0) | |
0x27, 0xFF, 0xFF, 0x00, 0x00, // Logical Maximum (65534) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bt_hci_cmd_reset | |
O 000000 01 03 0C 00 | |
I 000000 04 0E 04 05 03 0C 00 | |
# BT_HCI_EVT_CMD_COMPLETE | |
# bt_hci_cmd_read_local_features | |
O 000000 01 03 10 00 | |
I 000000 04 0E 0C 05 03 10 00 BF EE CD FE DB FF 7B 87 | |
# BT_HCI_EVT_CMD_COMPLETE | |
# bt_hci_cmd_read_local_version_info | |
O 000000 01 01 10 00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
with open(sys.argv[1], "rb") as f: | |
byte = f.read(1) | |
while byte: | |
if int(byte[0]) == 0x01: | |
byte += f.read(3) | |
byte += f.read(int(byte[3])) |