66 Commits

Author SHA1 Message Date
Florian Magin 309beede26 Move the trace tests to a separate module 2020-02-11 18:06:47 +01:00
Florian Magin 215ea7b887 Turn info_conn into proper tests 2020-02-11 17:58:23 +01:00
Davide Toldo fdddee106c Add two more traces that cover the new memory layout branch in readHeapInformation 2020-02-11 00:20:34 +01:00
Davide Toldo 5cc7895e98 Clean up structure
Add Galaxy S8 traces (new heap structure)
Delete unnecessary, failing macOS trace
2020-02-11 00:13:44 +01:00
Davide Toldo 42a2de368a Add nose test for connection information retrieval with real device connected 2020-02-10 23:03:20 +01:00
Davide Toldo 4d58dbf925 Add new info connections trace where a device is actually connected 2020-02-10 22:34:22 +01:00
Davide Toldo 9dbd925fb9 forgot to add the required testcase 2020-02-10 03:28:52 +01:00
Davide Toldo 051b019b83 Add nose test for connection information retrieval 2020-02-10 03:26:24 +01:00
Florian Magin 3f57b10240 Save all exceptions in the hooks into the core and add better error printing to the main thread (only works if some hook is active for now) 2020-02-03 16:35:22 +01:00
Florian Magin 939e03e845 Fix Hook Signatures to include the reference to the running core 2020-02-03 16:34:19 +01:00
Florian Magin 71179c5da1 Allow main thread to detect when the send thread crashed with an AssertError and reraise it for full context and so testing frameworks can detect the failure 2020-01-30 14:00:27 +01:00
Florian Magin 064c01ee81 Remove the old method that manually searched the tests. Replaced with generate_test_suite to generate a UnittestSuite 2020-01-30 13:59:08 +01:00
Florian Magin fc61a67d0c Rename the test function so it doesn't start with "test_" which confuses test frameworks and makes it clear that this function isn't a valid testcase by itself 2020-01-30 13:57:43 +01:00
Davide Toldo e2895f480a * Add ability to send ACL Data in macOS
* Clean up IOBluetoothExtended framework
2020-01-29 17:15:17 +01:00
Davide Toldo 4f706f9ecc Add second patchrom trace for ADB Core for other branch 2020-01-29 02:24:43 +01:00
Davide Toldo 02b8a72aa5 Add patchrom trace for ADB Core 2020-01-29 01:57:50 +01:00
Florian Magin 3644975110 Allow test module to be tested with unittest by dynamically generating a test suite from trace files 2020-01-22 18:06:53 +01:00
Davide Toldo 3e615858af Add connection created / completed trace 2020-01-22 17:35:05 +01:00
Florian Magin d80500bd12 More adbcore traces 2020-01-22 15:10:11 +01:00
Florian Magin cda6bfb27d Refactor replaying to centralise replay logic 2020-01-22 14:33:58 +01:00
Florian Magin 692ad2305f Mitigate race condition in replay 2020-01-22 13:36:37 +01:00
Davide Toldo fba79d3775 Update gitignore 2020-01-22 11:44:27 +01:00
Davide Toldo ce05b2fb49 Add some traces 2020-01-22 11:44:04 +01:00
Davide Toldo 0fc5f66d3b Hook ADBCore 2020-01-22 11:15:49 +01:00
Davide Toldo a16d6ece17 Make macos core less verbose (forgot to remove line) 2020-01-22 11:15:15 +01:00
Davide Toldo 7d8f84868c Add 2 ADB traces 2020-01-22 11:13:16 +01:00
Florian Magin 1ff674c9b1 Add wrappers to run trace tests via Python (to support IDE integration) 2020-01-20 17:56:25 +01:00
Florian Magin 8ef86979c6 Allow CLI arguments to be passed in via an already parsed namespace instead 2020-01-20 17:55:55 +01:00
Florian Magin 969d14359b Add command to hexdump trace 2020-01-20 17:50:21 +01:00
Florian Magin 9ec8572e5b Remove broken trace files 2020-01-20 17:39:23 +01:00
Florian Magin 0367fd69d0 Move traces to dedicate folders per core 2020-01-20 16:33:50 +01:00
Davide Toldo d899647c57 Fix getsockname hook to work with macos framework 2020-01-20 16:15:57 +01:00
Davide Toldo b26cff674c Add pyobjc as optional dependency for macoscore 2020-01-20 16:13:56 +01:00
Florian Magin bc1cb66dda Fix readafh.trace 2020-01-19 15:45:46 +01:00
Florian Magin 6f2e56db76 Only close sockets once 2020-01-19 15:27:02 +01:00
Florian Magin 0afdb6be66 Fix MacOS replay and make it work on non MacOS platforms 2020-01-19 15:17:03 +01:00
Davide Toldo 69d130e2d0 Move init of IOBE to initializer of macOS core 2020-01-19 14:29:57 +01:00
Davide Toldo 797e382f93 Add startup trace 2020-01-19 14:26:02 +01:00
Davide Toldo 9a2e3ef94a Add some traces 2020-01-15 19:08:12 +01:00
Florian Magin 3a7345736c Add generic trace test, example traces, and allow command to be specified in trace 2020-01-15 18:31:24 +01:00
Davide Toldo 56b5ef9df7 Make tracing work on macOS (sort of) 2020-01-15 18:26:18 +01:00
Florian Magin 6e9a5f1137 Implement save and replay of traces 2020-01-12 00:06:41 +01:00
Florian Magin 671c7c1ae5 Hci hooking (#13)
* Partial refactoring of hooking

* Fix logging in core.py and print exceptions in _sendThreadFunc in the log

* Refactor hci hooking
2020-01-10 13:21:35 +01:00
Florian Magin ef8ed5bd7e Add recvfrom in SocketRecvHook 2020-01-10 10:38:00 +01:00
Florian Magin c225be4f9b Add lowest level HCI tracing functionality 2020-01-07 11:42:31 +01:00
Florian Magin 90af9fbde3 Fix minor None check 2020-01-06 13:48:58 +01:00
Florian Magin 79fc673617 Allow specification of decive via CLI arg 2020-01-06 13:43:27 +01:00
Florian Magin c36b8fe93d Add type annotation to device_list 2020-01-06 13:42:47 +01:00
Florian Magin ef624644b3 Add required interface methods as NotImplemented 2020-01-06 13:40:37 +01:00
Florian Magin 9766a12ece Add hci command test 2020-01-06 12:09:59 +01:00
Florian Magin 01a7decfc9 Add first testcases 2020-01-06 12:09:59 +01:00
Florian Magin 8f136d1172 Make args to internalblue_cli explicit so it can be called with custom args from python 2020-01-06 12:09:59 +01:00
Florian Magin 21d3ff3b44 Annotate testcore device_list 2020-01-06 12:09:59 +01:00
Florian Magin 4dafd0bf8f Remove usage of logging wrapper for now 2020-01-06 12:09:59 +01:00
Florian Magin ac6f8ea630 Add --overwrite to memdump for testing 2020-01-06 12:09:59 +01:00
Florian Magin a1222c897a Add logging wrapper 2020-01-06 12:09:59 +01:00
Florian Magin ce463df61b Add init command argument for testing 2020-01-06 12:09:59 +01:00
Florian Magin 0c8bf457a3 Annotations and import fixes 2020-01-06 12:09:59 +01:00
Florian Magin 28e39d6c34 Minor fixes and annotations 2020-01-06 12:03:49 +01:00
Florian Magin 88bdc3e58e Add type annotations for cmds 2020-01-06 12:03:49 +01:00
Florian Magin d190a2537a Type annotations for core.py and general type aliases 2020-01-06 12:03:49 +01:00
Davide Toldo 9377c8d17e Add write memory functionality to testcore 2020-01-06 12:03:49 +01:00
Davide Toldo c6575d904d Fix bug 2020-01-06 12:03:49 +01:00
Davide Toldo 9a16c93191 Fix bug 2020-01-06 12:03:49 +01:00
Davide Toldo a8a9736bf1 Some cleanup 2020-01-06 12:03:49 +01:00
Davide Toldo c43c4bb580 Functional startup and memory reads 2020-01-06 12:03:49 +01:00
25 changed files with 155 additions and 1964 deletions
+1 -12
View File
@@ -54,17 +54,6 @@ was also recorded and gives a more high level overview.
Our talk [Playing with Bluetooth](https://media.ccc.de/v/2019-185-playing-with-bluetooth) focuses on new device support
within *InternalBlue* and the Patchram state of various devices.
* **36C3 Talk** (12/2019)
The rather generic talk [All wireless communication stacks are equally broken](https://media.ccc.de/v/36c3-10531-all_wireless_communication_stacks_are_equally_broken)
points out a couple of new research directions and new Bluetooth projects coming up.
* **EWSN Paper & Demo** (02/2020)
We did some work on improving blacklisting performance of BLE data connections. Currently in a separate *blacklisting* branch.
Supported Features
@@ -225,7 +214,7 @@ can replace them with anything you want.
License
-------
Copyright 2018-2020 The InternalBlue Team
Copyright 2018-2019 Dennis Mantz, Jiska Classen
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
+27
View File
@@ -33,3 +33,30 @@ try:
except:
pass
import logging
class ProgressLog():
"""
Hack to get around the dependency to the pwnlib logger
This looses functionality, but at some point this can be replaced by something like progressbar2
"""
def __init__(self, init_msg,logger):
self.logger = logger
self.logger.warning(init_msg)
def failure(self, msg):
self.logger.warning(msg)
def status(self, msg):
self.logger.info(msg)
def success(self, msg):
self.logger.info(msg)
def getLogger(name):
logger = logging.getLogger(name)
logger.progress = lambda msg: ProgressLog(msg, logger)
return logger
+21 -19
View File
@@ -37,7 +37,9 @@ import select
import json
from internalblue import getLogger
#log = getLogger(__name__)
@@ -1073,9 +1075,9 @@ class CmdSendLmp(Cmd):
connection = self.internalblue.readConnectionInformation(i+1)
if connection == None:
continue
if connection.connection_handle != 0 and connection.remote_address != b'\x00\x00\x00\x00\x00\x00':
args.conn_handle = connection.connection_handle
is_master = connection.master_of_connection
if connection["connection_handle"] != 0 and connection["remote_address"] != b'\x00\x00\x00\x00\x00\x00':
args.conn_handle = connection["connection_handle"]
is_master = connection["master_of_connection"]
break
# if still not set, typical connection handles seem to be 0x0b...0x0d
@@ -1176,20 +1178,20 @@ class CmdInfo(Cmd):
continue
log.info("### | Connection ---%02d--- ###" % i)
log.info(" - Number: %d" % connection.connection_number)
log.info(" - Remote BT address: %s" % bt_addr_to_str(connection.remote_address))
log.info(" - Remote BT name: %08X" % connection.remote_name_address)
log.info(" - Master of Conn.: %s" % str(connection.master_of_connection))
log.info(" - Conn. Handle: 0x%X" % connection.connection_handle)
log.info(" - Public RAND: %s" % connection.public_rand.encode('hex'))
#log.info(" - PIN: %s" % connection.pin.encode('hex'))
#log.info(" - BT addr for key: %s" % bt_addr_to_str(connection.bt_addr_for_key))
log.info(" - Effective Key Len: %d byte (%d bit)" % (connection.effective_key_len, 8*connection["effective_key_len"]))
log.info(" - Link Key: %s" % connection.link_key.encode('hex'))
log.info(" - LMP Features: %s" % connection.extended_lmp_feat.encode('hex'))
log.info(" - Host Supported F: %s" % connection.host_supported_feat.encode('hex'))
log.info(" - TX Power (dBm): %d" % connection.tx_pwr_lvl_dBm)
log.info(" - Array Index: %s" % connection.id.encode('hex'))
log.info(" - Number: %d" % connection["connection_number"])
log.info(" - Remote BT address: %s" % bt_addr_to_str(connection["remote_address"]))
log.info(" - Remote BT name: %08X" % connection["remote_name_address"])
log.info(" - Master of Conn.: %s" % str(connection["master_of_connection"]))
log.info(" - Conn. Handle: 0x%X" % connection["connection_handle"])
log.info(" - Public RAND: %s" % connection["public_rand"].encode('hex'))
#log.info(" - PIN: %s" % connection["pin"].encode('hex'))
#log.info(" - BT addr for key: %s" % bt_addr_to_str(connection["bt_addr_for_key"]))
log.info(" - Effective Key Len: %d byte (%d bit)" % (connection["effective_key_len"], 8*connection["effective_key_len"]))
log.info(" - Link Key: %s" % connection["link_key"].encode('hex'))
log.info(" - LMP Features: %s" % connection["extended_lmp_feat"].encode('hex'))
log.info(" - Host Supported F: %s" % connection["host_supported_feat"].encode('hex'))
log.info(" - TX Power (dBm): %d" % connection["tx_pwr_lvl_dBm"])
log.info(" - Array Index: %s" % connection["id"].encode('hex'))
print
return True
@@ -1328,7 +1330,7 @@ class CmdInfo(Cmd):
log.info("[ Idx ] @Queue-Addr Queue-Name Items/Free/Capacity Item-Size Buffer")
log.info("------------------------------------------------------------______--------------")
for queue in [vars(element) for element in queuelist]:
for queue in queuelist:
# TODO: waitlist
log.info(("QUEU[{index:2d}] @ 0x{address:06X}: {name:21s} {available_items:2d} /"
" {free_slots:2d} / {capacity:2d} {item_size:2d} Bytes 0x{queue_buf_start:06X}").format(**queue))
@@ -1606,7 +1608,7 @@ class CmdReadAfhChannelMap(Cmd):
if connection == None:
continue
else:
self.readafh(connection.connection_handle)
self.readafh(connection["connection_handle"])
return True
# if not set but connection struct unknown, typical connection handles seem to be 0x0b...0x0d
else:
+70 -49
View File
@@ -33,8 +33,6 @@ import datetime
import time
import Queue
from . import hci
from .objects.queue_element import QueueElement
from .objects.connection_information import ConnectionInformation
try:
from typing import List, Optional, Any, TYPE_CHECKING, Tuple, Union, NewType, Callable
@@ -99,7 +97,7 @@ class InternalBlue:
self.recvThread = None # The thread which is responsible for the HCI snoop socket
self.sendThread = None # The thread which is responsible for the HCI inject socket
self.tracepoints = [] # A list of currently active tracepoints
self.tracepoints = [] # A list of currently active tracepoints
# The list contains tuples:
# [0] target address
# [1] address of the hook code
@@ -195,7 +193,7 @@ class InternalBlue:
time_betw_0_and_2000_ad = int("0x00E03AB44A676000", 16)
time_since_2000_epoch = datetime.timedelta(microseconds=time) - datetime.timedelta(microseconds=time_betw_0_and_2000_ad)
return datetime.datetime(2000, 1, 1) + time_since_2000_epoch
@abstractmethod
def _recvThreadFunc(self):
# type: () -> None
@@ -334,7 +332,7 @@ class InternalBlue:
registers += "r10: 0x%08x r11: 0x%08x r12: 0x%08x\n" % \
tuple(self.tracepoint_registers[13:16])
log.info("Tracepoint 0x%x was hit and deactivated:\n" % pc + registers)
filename = self.data_directory + "/" + "internalblue_tracepoint_registers_%s.bin" % datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
log.info("Captured Registers for Tracepoint to %s" % filename)
f = open(filename, "w")
@@ -358,7 +356,7 @@ class InternalBlue:
if self.tracepoint_memdump_address == None:
self.tracepoint_memdump_address = dump_address
normalized_address = dump_address - self.tracepoint_memdump_address
normalized_address = dump_address - self.tracepoint_memdump_address
self.tracepoint_memdump_parts[normalized_address] = data
# Check if this was the last packet
@@ -539,7 +537,7 @@ class InternalBlue:
# register hci callback:
self.registerHciCallback(self.stackDumpReceiver.recvPacket)
if not self.initialize_fimware():
log.warn("connect: Failed to initialize firmware!")
return False
@@ -551,7 +549,7 @@ class InternalBlue:
@abstractmethod
def local_connect(self):
return True
def initialize_fimware(self):
# type: () -> bool
"""
@@ -561,7 +559,7 @@ class InternalBlue:
# send Read_Local_Version_Information
version = self.sendHciCommand(0x1001, '')
if not version or len(version) < 11:
log.warn("""initialize_fimware: Failed to send a HCI command to the Bluetooth driver.
adb: Check if you installed a custom bluetooth.default.so properly on your
@@ -582,12 +580,12 @@ class InternalBlue:
iOS = True
self.fw = Firmware(subversion, iOS).firmware
# Safe to turn diagnostic logging on, it just gets a timeout if the Android
# driver was recompiled with other flags but without applying a proper patch.
log.info("Try to enable debugging on H4 (warning if not supported)...")
self.enableBroadcomDiagnosticLogging(True)
return True
def shutdown(self):
@@ -774,7 +772,7 @@ class InternalBlue:
a blocking manner. Consider using the registerHciCallback()
functionality as an alternative which works asynchronously.
"""
log.debug("recvPacket: called")
if not self.check_running():
@@ -807,7 +805,7 @@ class InternalBlue:
byte_counter = 0 # tracks the number of received bytes
outbuffer = '' # buffer which stores all accumulated data read from the chip
if bytes_total == 0: # If no total bytes where given just use length
bytes_total = length
bytes_total = length
retry = 3 # Retry on failures
while read_addr < address+length: # Send HCI Read_RAM commands until all data is received
# Send hci frame
@@ -864,7 +862,7 @@ class InternalBlue:
read_addr += len(data)
byte_counter += len(data)
if(progress_log != None):
msg = "receiving data... %d / %d Bytes (%d%%)" % (bytes_done+byte_counter,
msg = "receiving data... %d / %d Bytes (%d%%)" % (bytes_done+byte_counter,
bytes_total, (bytes_done+byte_counter)*100/bytes_total)
progress_log.status(msg)
retry = 3 # this round worked, so we re-enable retries
@@ -960,7 +958,7 @@ class InternalBlue:
read_addr += len(data)
byte_counter += len(data)
if progress_log is not None:
msg = "receiving data... %d / %d Bytes (%d%%)" % (bytes_done+byte_counter,
msg = "receiving data... %d / %d Bytes (%d%%)" % (bytes_done+byte_counter,
bytes_total, (bytes_done+byte_counter)*100/bytes_total)
progress_log.status(msg)
@@ -981,7 +979,7 @@ class InternalBlue:
"""
log.debug("writeMem: writing to 0x%x" % address)
if not self.check_running():
return None
@@ -1027,12 +1025,12 @@ class InternalBlue:
if response[3] != '\x00':
log.warn("Got error code %x in command complete event." % u8(response[3]))
return False
# Nexus 6P Bugfix
if 'LAUNCH_RAM_PAUSE' in dir(self.fw) and self.fw.LAUNCH_RAM_PAUSE:
log.debug("launchRam: Bugfix, sleeping %ds" % self.fw.LAUNCH_RAM_PAUSE)
time.sleep(self.fw.LAUNCH_RAM_PAUSE)
return True
def getPatchramState(self):
@@ -1053,7 +1051,7 @@ class InternalBlue:
return False
slot_count = self.fw.PATCHRAM_NUMBER_OF_SLOTS
# On Nexus 5, ReadMemAligned is required, while Nexus 6P supports this memory area with ReadRAM
if self.fw.PATCHRAM_ALIGNED:
slot_dump = self.readMemAligned(self.fw.PATCHRAM_ENABLED_BITMAP_ADDRESS, slot_count/4)
@@ -1062,14 +1060,14 @@ class InternalBlue:
slot_dump = self.readMem(self.fw.PATCHRAM_ENABLED_BITMAP_ADDRESS, slot_count/4)
table_addr_dump = self.readMem(self.fw.PATCHRAM_TARGET_TABLE_ADDRESS, slot_count*4)
table_val_dump = self.readMem(self.fw.PATCHRAM_VALUE_TABLE_ADDRESS, slot_count*4)
table_addresses = []
table_values = []
slot_dwords = []
slot_bits = []
for dword in range(slot_count/32):
slot_dwords.append(slot_dump[dword*32:(dword+1)*32])
for dword in slot_dwords:
slot_bits.extend(bits(dword[::-1])[::-1])
for i in range(slot_count):
@@ -1107,7 +1105,7 @@ class InternalBlue:
if len(patch) != 4:
log.warn("patchRom: patch (%s) must be a 32-bit dword!" % patch)
return False
log.debug("patchRom: applying patch 0x%x to address 0x%x" % (u32(patch), address))
alignment = address % 4
@@ -1207,7 +1205,7 @@ class InternalBlue:
return True
def readConnectionInformation(self, conn_number):
# type: (ConnectionNumber) -> Optional[ConnectionInformation]
# type: (ConnectionNumber) -> Optional[ConnectionDict]
"""
Reads and parses a connection struct based on the connection number.
Note: The connection number is different from the connection index!
@@ -1218,7 +1216,7 @@ class InternalBlue:
In the Nexus 5 firmware all connection numbers are simply the connection
index increased by 1.
The return value is a ConnectionInformation object containing all information that could
The return value is a dictionary containing all information that could
be parsed from the connection structure. If the connection struct at the
specified connection number is empty, the return value is None.
"""
@@ -1229,7 +1227,7 @@ class InternalBlue:
for const in ['CONNECTION_MAX', 'CONNECTION_ARRAY_ADDRESS', 'CONNECTION_STRUCT_LENGTH']:
if const not in dir(self.fw):
is_array = False
# Do we have a list implementation?
for const in ['CONNECTION_LIST_ADDRESS']:
if const not in dir(self.fw):
@@ -1253,9 +1251,23 @@ class InternalBlue:
if connection == b'\x00'*self.fw.CONNECTION_STRUCT_LENGTH:
return None
conn_dict = ConnectionInformation.from_connection_buffer(connection)
conn_dict = {}
conn_dict["connection_number"] = u32(connection[:4])
conn_dict["remote_address"] = connection[0x28:0x2E][::-1]
conn_dict["remote_name_address"] = u32(connection[0x4C:0x50])
conn_dict["master_of_connection"] = u32(connection[0x1C:0x20]) & 1<<15 == 0
conn_dict["connection_handle"] = u16(connection[0x64:0x66])
conn_dict["public_rand"] = connection[0x78:0x88]
#conn_dict["pin"] = connection[0x8C:0x92]
#conn_dict["bt_addr_for_key"] = connection[0x92:0x98][::-1]
effective_key_len = u8(connection[0xa7:0xa8])
conn_dict["effective_key_len"] = effective_key_len
conn_dict["link_key"] = connection[0x68:0x68+effective_key_len]
#new fields - TODO verify
conn_dict["tx_pwr_lvl_dBm"] = u8(connection[0x9c:0x9d]) - 127
conn_dict["extended_lmp_feat"] = connection[0x30:0x38] #standard p. 527
conn_dict["host_supported_feat"] = connection[0x38:0x40]
conn_dict["id"] = connection[0x0c:0x0d] #not sure if this is an id?
return conn_dict
def sendLmpPacket(self, opcode, payload='', is_master=True, conn_handle=0x0c, extended_op=False):
@@ -1280,47 +1292,47 @@ class InternalBlue:
Returns True on success and False on failure.
"""
# Check the connection handle
# Range: 0x0000-0x0EFF (all other values reserved for future use)
if conn_handle < 0 or conn_handle > 0x0EFF:
log.warn("sendLmpPacket: connection handle out of bounds: %d" % conn_handle)
return False
# must be string...
if payload == None:
payload = ''
if ((not extended_op) and opcode > (0xff>>1)) or (extended_op and opcode > 0xff):
log.warn("sendLmpPacket: opcode out of range!")
return False
# Build the LMP packet
opcode_data = p8(opcode<<1 | (not is_master)) if not extended_op else p8(0x7F<<1 | (not is_master)) + p8(opcode)
# Nexus 5 (2012) simply takes any length as argument, but later withdraws bytes if too many were passed.
# Nexus 6P, Raspi 3+ and evaulation board (2014-2018) require a fixed 20 byte length parameter to be passed!
# -> 2 bytes connection handle, 1 byte length, which means 17 bytes for opcode and payload remaining
# sendlmp --data 11223344556677889900112233445566 01 -> actually works
# always pad to 17 data bytes...
data = opcode_data + payload + '\x00'*(17 - len(opcode_data) - len(payload))
if len(data) > 17:
log.warn("sendLmpPacket: Vendor specific HCI command only allows for 17 bytes LMP content.")
#log.info("packet: " + p16(conn_handle) + p8(len(data)) + data)
result = self.sendHciCommand(0xfc58, p16(conn_handle) + p8(len(payload + opcode_data)) + data)
if result == None:
log.warn("sendLmpPacket: did not get a result from firmware, maybe crashed internally?")
return False
result = u8(result[3])
if result != 0:
log.warn("sendLmpPacket: got error status 0x%02x" % result)
return False
return True
def fuzzLmp(self):
@@ -1390,7 +1402,7 @@ class InternalBlue:
# Prepare the assembler snippet by injecting the connection number
# and appending the LMP packet data.
asm_code = self.fw.SENDLMP_ASM_CODE % (conn_nr) # type: str
asm_code_with_data = asm_code + ''.join([".byte 0x%02x\n" % ord(x)
asm_code_with_data = asm_code + ''.join([".byte 0x%02x\n" % ord(x)
for x in data.ljust(20, "\x00")])
# Assemble the snippet and write it to SENDLMP_CODE_BASE_ADDRESS
@@ -1639,7 +1651,7 @@ class InternalBlue:
def readQueueInformation(self):
# type: () -> Optional[List[QueueElement]]
# type: () -> Optional[Union[bool, QueueInformation]]
"""
Traverses the double-linked list of QUEUE structs and returns them as a
list of dictionaries. The dicts have the following fields:
@@ -1665,7 +1677,7 @@ class InternalBlue:
for const in ['QUEUE_HEAD']:
if const not in dir(self.fw):
log.warn("readQueueInformation: '%s' not in fw.py. FEATURE NOT SUPPORTED!" % const)
return None
return False
# Read address of first queue struct:
first_queue_struct_address = u32(self.readMem(self.fw.QUEUE_HEAD, 4))
@@ -1679,13 +1691,22 @@ class InternalBlue:
if queue_fields[0] != u32("UEUQ"):
log.warn("readQueueInformation: QUEUE double-linked list contains non-QUEU element. abort.")
return None
current_element = QueueElement(index, current_queue_struct_address, queue_fields[2] * 4,
queue_fields[3], queue_fields[4], queue_fields[5], queue_fields[6],
queue_fields[7], queue_fields[8], queue_fields[9], queue_fields[10],
queue_fields[11], queue_fields[12], queue_fields[13],
self.fw.QUEUE_NAMES[index])
current_element = {}
current_element["index"] = index
current_element["address"] = current_queue_struct_address
current_element["item_size"] = queue_fields[2] * 4 # Item size is measured in dwords (4 Byte)
current_element["capacity"] = queue_fields[3]
current_element["available_items"] = queue_fields[4]
current_element["free_slots"] = queue_fields[5]
current_element["queue_buf_start"] = queue_fields[6]
current_element["queue_buf_end"] = queue_fields[7]
current_element["next_item"] = queue_fields[8]
current_element["next_free_slot"] = queue_fields[9]
current_element["thread_waitlist"] = queue_fields[10]
current_element["waitlist_length"] = queue_fields[11]
current_element["next"] = queue_fields[12]
current_element["prev"] = queue_fields[13]
current_element["name"] = self.fw.QUEUE_NAMES[index]
queuelist.append(current_element)
current_queue_struct_address = current_element["next"]
+1 -5
View File
@@ -50,7 +50,7 @@ SECTIONS = [ MemorySection(0x0, 0x90000, True , False),
MemorySection(0xd0000, 0xd8000, False, True ),
#MemorySection(0xe0000, 0x1f0000, True , False),
MemorySection(0x200000, 0x21ffff, False, True ),
#MemorySection(0x260000, 0x268000, True , False), # might crash? issue 14
MemorySection(0x260000, 0x268000, True , False),
#MemorySection(0x280000, 0x2a0000, True , False),
MemorySection(0x318000, 0x320000, False, False),
MemorySection(0x324000, 0x360000, False, False),
@@ -74,10 +74,6 @@ PATCHRAM_VALUE_TABLE_ADDRESS = 0xd0000
PATCHRAM_NUMBER_OF_SLOTS = 128
PATCHRAM_ALIGNED = False
# Heap
BLOC_HEAD = 0x200588 # g_dynamic_memory_GeneralUsePools
BLOC_NG = True # Next Generation Bloc Buffer
# Snippet for sendLcpPacket()
SENDLCP_CODE_BASE_ADDRESS = 0x21a000
SENDLCP_ASM_CODE = """
+2 -2
View File
@@ -23,8 +23,8 @@
from .fw import MemorySection
# Firmware Infos
# Evaluation Kit CYW920719
FW_NAME = "CYW20739B1 (NOT iPhone X/XR!)"
# Evaluation Kit CYW927019
FW_NAME = "CYW27039B1 (NOT iPhone X/XR!)"
# TODO this is not the iPhone firmware, we need to add a switch in fw.py
# Device Infos
-4
View File
@@ -73,10 +73,6 @@ PATCHRAM_VALUE_TABLE_ADDRESS = 0xd0000
PATCHRAM_NUMBER_OF_SLOTS = 128
PATCHRAM_ALIGNED = False
# Heap
BLOC_HEAD = 0x200490 # g_dynamic_memory_GeneralUsePools
BLOC_NG = True # Next Generation Bloc Buffer
# Snippet for sendLcpPacket()
SENDLCP_CODE_BASE_ADDRESS = 0x21f000
SENDLCP_ASM_CODE = """
-11
View File
@@ -958,7 +958,6 @@ class StackDumpReceiver:
if self.memdump_addr == None:
self.memdump_addr = addr
self.memdumps[addr-self.memdump_addr] = data[4:]
log.debug("Stack dump handling addr %08x", addr-self.memdump_addr)
def finishStackDump(self):
dump = fit(self.memdumps)
@@ -1093,16 +1092,6 @@ class StackDumpReceiver:
self.finishStackDump()
return True
# On a Raspberry Pi 3, the last packet of a stack dump is '1b0340df0338'.... so it's 0x40
elif packet_type == 0xe8:
# FIXME Raspi memdump is divided in two parts!
# address change from 0001fe38 to packet type e8 and then it's computing addr -0130000
# negative addr does not work with finishStackDump()
# so even though the last packet is 0x40, let's just finish on 0xe8
log.info("End of first stackdump block, writing to file and skipping second...")
self.finishStackDump()
return True
return False
View File
@@ -1,67 +0,0 @@
from pwnlib.util.packing import u32, u16, u8
class ConnectionInformation:
connection_handle = 0
connection_number = 0
master_of_connection = False
remote_name_address = 0
remote_address = None
id = None
public_rand = None
extended_lmp_feat = None
link_key = None
tx_pwr_lvl_dBm = 0
effective_key_len = 0
host_supported_feat = None
def __init__(self, connection_number, remote_address, remote_name_address, master_of_connection, connection_handle,
public_rand, effective_key_len, link_key, tx_pwr_lvl_dBm, extended_lmp_feat, host_supported_feat, id):
self.connection_number = connection_number
self.remote_address = remote_address
self.remote_name_address = remote_name_address
self.master_of_connection = master_of_connection
self.connection_handle = connection_handle
self.public_rand = public_rand
self.effective_key_len = effective_key_len
self.link_key = link_key
self.tx_pwr_lvl_dBm = tx_pwr_lvl_dBm
self.extended_lmp_feat = extended_lmp_feat
self.host_supported_feat = host_supported_feat
self.id = id
@staticmethod
def from_connection_buffer(connection):
# Possible TODO: Convert this to a Katai Struct parser with a proper .ksy grammar.
return ConnectionInformation(u32(connection[:4]), connection[0x28:0x2E][::-1],
u32(connection[0x4C:0x50]),
u32(connection[0x1C:0x20]) & 1 << 15 == 0,
u16(connection[0x64:0x66]),
connection[0x78:0x88],
u8(connection[0xa7:0xa8]),
connection[0x68:0x68 + u8(connection[0xa7:0xa8])],
u8(connection[0x9c:0x9d]) - 127,
connection[0x30:0x38], connection[0x38:0x40],
connection[0x0c:0x0d])
# For some reason the following doesn't work because some attributes like link_key end up as one element tuples
# connection_number = u32(connection[:4])
# remote_address = connection[0x28:0x2E][::-1],
# remote_name_address = u32(connection[0x4C:0x50])
# master_of_connection = u32(connection[0x1C:0x20]) & 1 << 15 == 0
# connection_handle = u16(connection[0x64:0x66])
# public_rand = connection[0x78:0x88]
# effective_key_len = u8(connection[0xa7:0xa8])
# link_key = connection[0x68:0x68 + effective_key_len],
# tx_pwr_lvl_dBm = u8(connection[0x9c:0x9d]) - 127,
# extended_lmp_feat = connection[0x30:0x38]
# host_supported_feat = connection[0x38:0x40]
# id = connection[0x0c:0x0d]
# return ConnectionInformation(connection_number, remote_address, remote_name_address, master_of_connection,
# connection_handle,
# public_rand, effective_key_len, link_key, tx_pwr_lvl_dBm, extended_lmp_feat,
# host_supported_feat, id)
def __getitem__(self, item):
# type: (str) -> Any
return vars(self)[item]
-38
View File
@@ -1,38 +0,0 @@
class QueueElement:
index = 0
next_item = 0
prev = 0
capacity = 0
name = ''
queue_buf_start = 0
available_items = 0
item_size = 0
next_free_slot = 0
free_slots = 0
address = 0
waitlist_length = 0
next = 0
queue_buf_end = 0
thread_waitlist = 0
def __init__(self, index, address, item_size, capacity, available_items, free_slots, queue_buf_start, queue_buf_end,
next_item, next_free_slot, thread_waitlist, waitlist_length, next, prev, name):
self.index = index
self.next_item = next_item
self.prev = prev
self.capacity = capacity
self.name = name
self.queue_buf_start = queue_buf_start
self.available_items = available_items
self.item_size = item_size
self.next_free_slot = next_free_slot
self.free_slots = free_slots
self.address = address
self.waitlist_length = waitlist_length
self.next = next
self.queue_buf_end = queue_buf_end
self.thread_waitlist = thread_waitlist
def __getitem__(self, item):
# type: (str) -> Any
return vars(self)[item]
+2 -23
View File
@@ -186,36 +186,15 @@ class PrintTrace(SocketDuplexHook):
print("Exception: {}".format(e))
class ReplaySocket(SocketDuplexHook):
def __init__(self, snoop_socket, inject_socket, core, filename='/tmp/bt_hci.log', debug=False):
class ReplaySocket(PrintTrace):
def __init__(self, snoop_socket, inject_socket, core, filename='/tmp/bt_hci.log'):
SocketDuplexHook.__init__(self, snoop_socket, inject_socket, core)
self.replace = True
self.log = open(filename).readlines()
self.index = 0
self.debug = debug
if self.log[0].startswith("#"):
self.index = 1
def send_hook(self, data, **kwargs):
if self.debug:
print("Sent: {}".format(binascii.hexlify(data)))
def recv_hook(self, data, **kwargs):
if self.debug:
print("Recv: {}".format(binascii.hexlify(data)))
def recvfrom_hook(self, data, addr, **kwargs):
if self.debug:
print("Recv: {}".format(binascii.hexlify(data)))
def sendto_hook(self, data, socket, **kwargs):
if self.debug:
print("Sent: {}".format(binascii.hexlify(data)))
def send_exception(self, e):
if self.debug:
print("Exception: {}".format(e))
def send_replace(self, data, **kwargs):
encoded_data = "" # type: str
hex_data = binascii.hexlify(data)
-281
View File
@@ -1,281 +0,0 @@
from internalblue.cli import _parse_argv
from internalblue.hcicore import HCICore
import os
import nose
try:
from typing import List, Optional, Any, TYPE_CHECKING, Tuple
except ImportError:
pass
def test_info_heap_new():
dummy = [
{
"index": 0,
"capacity": 32,
"address": 2100380,
"next": 2100412,
"memory_size": 1152,
"buffer_list": 2190960,
"memory": 2190864,
"buffer_size": 32,
"buffer_headers": {
2191872: 2134443254,
2191620: 2037880954,
2191368: 375085499,
2191116: 3147300663,
2190864: 0,
2191764: 264196083,
2191512: 2509895076,
2191260: 2520551584,
2191008: 0,
2191908: 1846542368,
2191656: 1757769142,
2191404: 3932721686,
2191152: 2191184,
2190900: 28735,
2191800: 2840650003,
2191548: 1443923039,
2191296: 1489683938,
2191044: 4066066958,
2191944: 1913651233,
2191692: 152195353,
2191440: 2191472,
2191188: 1557416373,
2190936: 302056974,
2191836: 649087106,
2191584: 3228135896,
2191332: 3061215438,
2191080: 720823376,
2191980: 2196903397,
2191728: 2191760,
2191476: 2016717863,
2191224: 733933656,
2190972: 101581052
},
"list_length": 28
},
{
"index": 1,
"capacity": 50,
"address": 2100412,
"next": 2100444,
"memory_size": 5000,
"buffer_list": 2191888,
"memory": 2191888,
"buffer_size": 96,
"buffer_headers": {
2194688: 2418054699,
2196288: 1950181917,
2192388: 998902997,
2193288: 1237870693,
2196588: 3682344019,
2194188: 3476501705,
2191888: 2191984,
2195288: 1169168150,
2192788: 733035576,
2193688: 212170382,
2195588: 4256985711,
2194588: 2553343043,
2196688: 2197224,
2192288: 1364917638,
2195888: 19938058,
2193188: 1183181508,
2194088: 2389621397,
2196188: 1101316817,
2194988: 4119138959,
2192688: 3404258821,
2196488: 2957618219,
2193588: 1015303433,
2194488: 1542989588,
2195188: 334177442,
2192188: 3048389179,
2193088: 4249806944,
2195488: 1476670297,
2193988: 4205996809,
2196788: 0,
2194888: 1063521161,
2195788: 1587397832,
2192588: 3951930416,
2193488: 3182543110,
2196088: 1404536822,
2194388: 3962928810,
2192088: 1508747568,
2196388: 2481150443,
2192988: 3794218756,
2193888: 2230011074,
2195088: 2388733849,
2194788: 319481313,
2192488: 1066099460,
2195388: 2397324227,
2193388: 3268540448,
2194288: 2194384,
2195688: 443293108,
2191988: 3365837461,
2192888: 2725717105,
2195988: 954670552,
2193788: 2274473962
},
"list_length": 50
},
{
"index": 2,
"capacity": 12,
"address": 2100444,
"next": 2169260,
"memory_size": 3264,
"buffer_list": 2196688,
"memory": 2196688,
"buffer_size": 268,
"buffer_headers": {
2196960: 1868719728,
2198048: 2301952667,
2197504: 2764580300,
2198592: 4031749240,
2199408: 3141828370,
2199680: 2673196138,
2197776: 655413012,
2196688: 2197224,
2198864: 483218198,
2199136: 2070409995,
2197232: 4269595008,
2198320: 2960663615
},
"list_length": 11
},
{
"index": 3,
"capacity": 4,
"address": 2169260,
"next": 2169292,
"memory_size": 4288,
"buffer_list": 2199904,
"memory": 2199904,
"buffer_size": 1068,
"buffer_headers": {
2199904: 2200972,
2200976: 3538041113,
2202048: 1981831315,
2203120: 2664647264
},
"list_length": 4
},
{
"index": 4,
"capacity": 16,
"address": 2169292,
"next": 2169324,
"memory_size": 17536,
"buffer_list": 2204176,
"memory": 2204176,
"buffer_size": 1092,
"buffer_headers": {
2206368: 3081486871,
2208560: 2201211482,
2218424: 1142812043,
2210752: 1735894938,
2219520: 1997110991,
2207464: 3467810309,
2220616: 3465059190,
2217328: 3406578824,
2215136: 2543784863,
2204176: 2205268,
2209656: 3726451979,
2214040: 3051833507,
2211848: 3382482014,
2205272: 2465189202,
2212944: 2900433384,
2216232: 619500542
},
"list_length": 16
},
{
"index": 5,
"capacity": 15,
"address": 2169324,
"next": 2169356,
"memory_size": 4020,
"buffer_list": 2221648,
"memory": 2221648,
"buffer_size": 264,
"buffer_headers": {
2222720: 4187811300,
2223792: 71320053,
2223524: 2131726092,
2222184: 983003111,
2224060: 1514897371,
2222988: 2920869383,
2225132: 670722248,
2225400: 4011899155,
2221648: 2221912,
2224328: 1327684221,
2222452: 1691084254,
2223256: 2278527172,
2224596: 3213868993,
2221916: 2666878639,
2224864: 4293236507
},
"list_length": 15
},
{
"index": 6,
"capacity": 15,
"address": 2169356,
"next": 0,
"memory_size": 4020,
"buffer_list": 2225608,
"memory": 2225608,
"buffer_size": 264,
"buffer_headers": {
2226144: 2468503925,
2228288: 3769100033,
2226948: 3003019165,
2225608: 2225872,
2228556: 1848533574,
2226412: 19831529,
2229360: 3069868169,
2227216: 2022414238,
2227752: 2727841579,
2228824: 1909490602,
2225876: 2300688060,
2226680: 210906155,
2228020: 3166977216,
2227484: 2262736138,
2229092: 1991768492
},
"list_length": 15
}
]
trace = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'traces/hcicore/dictionary_tests/info_heap_new.trace')
args = _parse_argv('')
args.device = 'adb_replay'
args.replay = trace
data_directory = os.path.expanduser('~') + '/.internalblue'
if not os.path.exists(data_directory):
os.mkdir(data_directory)
from internalblue.socket_hooks import hook, ReplaySocket
hook(HCICore, ReplaySocket, filename=args.replay)
connection_methods = [HCICore(log_level='info', data_directory=data_directory, replay=True)]
devices = [] # type: List[DeviceTuple]
devices = connection_methods[0].device_list()
device = devices[0]
reference = device[0]
reference.interface = device[1]
reference.connect()
information = reference.readHeapInformation()
print(information)
nose.tools.assert_equal(information, dummy)
reference.shutdown()
-233
View File
@@ -1,233 +0,0 @@
from internalblue.cli import _parse_argv
from internalblue.adbcore import ADBCore
import os
import nose
try:
from typing import List, Optional, Any, TYPE_CHECKING, Tuple
except ImportError:
pass
def test_info_heap_old():
dummy = [
{
'index':0,
'buffer_headers': {
2194080: 0,
2193828: 2121160,
2193864: 2194008,
2193900: 2194044,
2193936: 2193864,
2193972: 2121160,
2194008: 2193900,
2194044: 2194080
},
'capacity': 8,
'address': 2121160,
'next': 2121208,
'memory_size': 288,
'waitlist_length': 0,
'buffer_list': 2193828,
'memory': 2193828,
'buffer_size': 32,
'prev': 2157672,
'list_length': 7,
'thread_waitlist': 0
},
{
'index': 1,
'buffer_headers': {
2194592: 0,
2194116: 2194184,
2194184: 2194252,
2194252: 2194320,
2194320: 2194388,
2194388: 2194456,
2194456: 2194524,
2194524: 2194592
},
'capacity': 8,
'address': 2121208,
'next': 2121256,
'memory_size': 544,
'waitlist_length': 0,
'buffer_list': 2194184,
'memory': 2194116,
'buffer_size': 64,
'prev': 2121160,
'list_length': 7,
'thread_waitlist': 0
},
{
'index': 2,
'buffer_headers': {
2196000: 2196268,
2197072: 0,
2194660: 2194928,
2195464: 2195732,
2196268: 2196536,
2194928: 2195196,
2195732: 2196000,
2196536: 2196804,
2196804: 2197072,
2195196: 2195464
},
'capacity': 10,
'address': 2121256,
'next': 2121352,
'memory_size': 2680,
'waitlist_length': 0,
'buffer_list': 2194660,
'memory': 2194660,
'buffer_size': 264,
'prev': 2121208,
'list_length': 10,
'thread_waitlist': 0
},
{
'index': 3,
'buffer_headers': {
2214480: 2215548,
2215548: 2216616,
2216616: 0,
2213412: 2214480
},
'capacity': 4,
'address': 2121352,
'next': 2121304,
'memory_size': 4272,
'waitlist_length': 0,
'buffer_list': 2213412,
'memory': 2213412,
'buffer_size': 1064,
'prev': 2121256,
'list_length': 4,
'thread_waitlist': 0
},
{
'index': 4,
'buffer_headers': {
2234124: 0,
2231932: 2233028,
2224260: 2225356,
2219876: 2220972,
2226452: 2227548,
2223164: 2224260,
2228644: 2229740,
2220972: 2222068,
2225356: 2226452,
2230836: 2231932,
2233028: 2234124,
2222068: 2223164,
2227548: 2228644,
2217684: 2218780,
2218780: 2219876,
2229740: 2230836
},
'capacity': 16,
'address': 2121304,
'next': 2157624,
'memory_size': 17536,
'waitlist_length': 0,
'buffer_list': 2217684,
'memory': 2217684,
'buffer_size': 1092,
'prev': 2121352,
'list_length': 16,
'thread_waitlist': 0
},
{
'index': 5,
'buffer_headers': {
2235264: 2235308,
2235616: 2235660,
2235396: 2235440,
2235528: 2235572,
2235660: 2235704,
2235308: 2235352,
2235440: 2235484,
2235704: 2235748,
2235792: 2235836,
2235220: 2235264,
2235748: 2235792,
2235352: 2235396,
2235572: 2235616,
2235836: 0,
2235484: 2235528
},
'capacity': 15,
'address': 2157624,
'next': 2157672,
'memory_size': 660,
'waitlist_length': 0,
'buffer_list': 2235220,
'memory': 2235220,
'buffer_size': 40,
'prev': 2121304,
'list_length': 15,
'thread_waitlist': 0
},
{
'index': 6,
'buffer_headers': {
2236096: 2236132,
2236240: 2236276,
2236132: 2236168,
2236384: 0,
2235880: 2235916,
2236204: 2236240,
2236348: 2236384,
2235916: 2235952,
2235952: 2235988,
2236168: 2236204,
2236312: 2236348,
2235988: 2236024,
2236024: 2236060,
2236276: 2236312,
2236060: 2236096
},
'capacity': 15,
'address': 2157672,
'next': 2121160,
'memory_size': 540,
'waitlist_length': 0,
'buffer_list': 2235880,
'memory': 2235880,
'buffer_size': 32,
'prev': 2157624,
'list_length': 15,
'thread_waitlist': 0
}]
trace = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'traces/adbcore/dictionary_tests/info_heap_old.trace')
args = _parse_argv('')
args.device = 'adb_replay'
args.replay = trace
data_directory = os.path.expanduser('~') + '/.internalblue'
if not os.path.exists(data_directory):
os.mkdir(data_directory)
from internalblue.socket_hooks import hook, ReplaySocket
hook(ADBCore, ReplaySocket, filename=args.replay)
connection_methods = [ADBCore(log_level='info', data_directory=data_directory, replay=True)]
devices = [] # type: List[DeviceTuple]
devices = connection_methods[0].device_list()
device = devices[0]
reference = device[0]
reference.interface = device[1]
reference.connect()
information = reference.readHeapInformation()
print(information)
nose.tools.assert_equal(information, dummy)
reference.shutdown()
+15 -8
View File
@@ -1,23 +1,30 @@
from internalblue.cli import _parse_argv
from internalblue.adbcore import ADBCore
from internalblue.objects.connection_information import ConnectionInformation
import os
import nose
try:
from typing import List, Optional, Any, TYPE_CHECKING, Tuple
from internalblue import DeviceTuple
except ImportError:
pass
def test_info_conn_7():
dummy = ConnectionInformation(7, '0023023a1a2e'.decode('hex'), 0, True, 0xc,
'e98a5eaaff39ecb5ce4447590dfb73a4'.decode('hex'), 16,
'dbea2d9c47bc1aa6afe664ff31591aa6'.decode('hex'), -87,
'0a00c821ffff8ffa'.decode('hex'), '9bff598701000000'.decode('hex'),
'00'.decode('hex'))
dummy = {
'connection_handle': 0xc,
'connection_number': 7,
'master_of_connection': True,
'remote_name_address': 0,
'remote_address': '0023023a1a2e'.decode('hex'),
'id': '00'.decode('hex'),
'public_rand': 'e98a5eaaff39ecb5ce4447590dfb73a4'.decode('hex'),
'extended_lmp_feat': '0a00c821ffff8ffa'.decode('hex'),
'link_key': 'dbea2d9c47bc1aa6afe664ff31591aa6'.decode('hex'),
'tx_pwr_lvl_dBm': -87,
'effective_key_len': 16,
'host_supported_feat': '9bff598701000000'.decode('hex')
}
trace = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'traces/adbcore/dictionary_tests/info_conn_7.trace')
@@ -46,6 +53,6 @@ def test_info_conn_7():
information = reference.readConnectionInformation(7)
print(information)
nose.tools.assert_dict_equal(vars(information), vars(dummy))
nose.tools.assert_dict_equal(information, dummy)
reference.shutdown()
+15 -6
View File
@@ -1,6 +1,5 @@
from internalblue.cli import _parse_argv
from internalblue.adbcore import ADBCore
from internalblue.objects.connection_information import ConnectionInformation
import os
import nose
@@ -12,10 +11,20 @@ except ImportError:
def test_info_conn_9():
dummy = ConnectionInformation(9, '000000000000'.decode('hex'), 0, False, 12,
'00000000000000000000000000000000'.decode('hex'), 0, '', -87,
'0000000000000000'.decode('hex'),
'0000000000000000'.decode('hex'), '00'.decode('hex'))
dummy = {
'connection_handle': 12,
'connection_number': 9,
'master_of_connection': False,
'remote_name_address': 0,
'remote_address': '000000000000'.decode('hex'),
'id': '00'.decode('hex'),
'public_rand': '00000000000000000000000000000000'.decode('hex'),
'extended_lmp_feat': '0000000000000000'.decode('hex'),
'link_key': '',
'tx_pwr_lvl_dBm': -87,
'effective_key_len': 0,
'host_supported_feat': '0000000000000000'.decode('hex')
}
trace = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'traces/adbcore/dictionary_tests/info_conn_9.trace')
@@ -44,6 +53,6 @@ def test_info_conn_9():
information = reference.readConnectionInformation(9)
print(information)
nose.tools.assert_dict_equal(vars(information), vars(dummy))
nose.tools.assert_dict_equal(information, dummy)
reference.shutdown()
-62
View File
@@ -1,62 +0,0 @@
from internalblue.cli import _parse_argv
from internalblue.adbcore import ADBCore
from internalblue.objects.queue_element import QueueElement
import os
import nose
try:
from typing import List, Optional, Any, TYPE_CHECKING, Tuple
except ImportError:
pass
def test_info_queue():
dummy = [
QueueElement(0, 2123152, 4, 16, 0, 16, 2123208, 2123272, 2123268, 2123268, 0, 0, 2123332, 2141676, 'tran_HCIEvent'),
QueueElement(1, 2123332, 8, 31, 0, 31, 2123388, 2123636, 2123436, 2123436, 0, 0, 2123636, 2123152, 'tran_ACLData'),
QueueElement(2, 2123636, 4, 3, 0, 3, 2123692, 2123704, 2123692, 2123692, 0, 0, 2123704, 2123332, 'tran_SCOData'),
QueueElement(3, 2123704, 4, 31, 0, 31, 2123760, 2123884, 2123760, 2123760, 0, 0, 2123884, 2123636, 'tran_UartBridgeNonHCIEvent'),
QueueElement(4, 2123884, 4, 20, 0, 20, 2123940, 2124020, 2124000, 2124000, 0, 0, 2124020, 2123704, 'tran_DiagData'),
QueueElement(5, 2124020, 8, 8, 0, 8, 2124076, 2124140, 2124076, 2124076, 0, 0, 2124140, 2123884, 'tran_HIDUsbKBEvt'),
QueueElement(6, 2124140, 8, 6, 0, 6, 2124196, 2124244, 2124196, 2124196, 0, 0, 2124244, 2124020, 'tran_HIDUsbMSEvt'),
QueueElement(7, 2124244, 8, 1, 0, 1, 2100496, 2100504, 2100496, 2100496, 0, 0, 2124300, 2124140, 'tran_HIDUsbMSCtrl'),
QueueElement(8, 2124300, 8, 1, 0, 1, 2100504, 2100512, 2100504, 2100504, 0, 0, 2124356, 2124244, 'tran_HIDUsbKBCtrl'),
QueueElement(9, 2124356, 8, 32, 0, 32, 2124412, 2124668, 2124412, 2124412, 0, 0, 2110352, 2124300, 'tran_HidAuxData'),
QueueElement(10, 2110352, 8, 12, 0, 12, 2192284, 2192380, 2192300, 2192300, 0, 0, 2120560, 2124356, 'lm_Cmd'),
QueueElement(11, 2120560, 4, 8, 0, 8, 2192380, 2192412, 2192400, 2192400, 0, 0, 2110408, 2110352, 'hci_HciCommand'),
QueueElement(12, 2110408, 8, 19, 0, 19, 2192412, 2192564, 2192412, 2192412, 0, 0, 2118068, 2120560, 'lm_deferredAction'),
QueueElement(13, 2118068, 8, 6, 0, 6, 2192564, 2192612, 2192564, 2192564, 0, 0, 2141588, 2110408, 'lrmmsm_cmd'),
QueueElement(14, 2141588, 4, 8, 0, 8, 2141644, 2141676, 2141644, 2141644, 0, 0, 2141676, 2118068, 'liteHostEvent'),
QueueElement(15, 2141676, 4, 16, 0, 16, 2141732, 2141796, 2141732, 2141732, 0, 0, 2123152, 2141588, 'litehostRcvdL2capData')
]
trace = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'traces/adbcore/dictionary_tests/info_queue.trace')
args = _parse_argv('')
args.device = 'adb_replay'
args.replay = trace
data_directory = os.path.expanduser('~') + '/.internalblue'
if not os.path.exists(data_directory):
os.mkdir(data_directory)
from internalblue.socket_hooks import hook, ReplaySocket
hook(ADBCore, ReplaySocket, filename=args.replay)
connection_methods = [ADBCore(log_level='info', data_directory=data_directory, replay=True)]
devices = [] # type: List[DeviceTuple]
devices = connection_methods[0].device_list()
device = devices[0]
reference = device[0]
reference.interface = device[1]
reference.connect()
information = reference.readQueueInformation()
print(information)
nose.tools.assert_equal([vars(element) for element in information], [vars(element) for element in dummy])
reference.shutdown()
+1 -1
View File
@@ -34,7 +34,7 @@ def generate_test_suite_from_traces():
if os.path.isdir(os.path.join(tracedir,core)):
core_suite = unittest.TestSuite()
for tracefile in os.listdir(os.path.join(tracedir, core)):
if tracefile.endswith(".trace"):
if tracefile != '.gitkeep' and tracefile != 'dictionary_tests':
core_suite.addTest(
unittest.FunctionTestCase(generate_test_from_file(core, tracefile), description=tracefile))
suite.addTest(core_suite)
@@ -1,685 +0,0 @@
# info heap
TX 010300011000
RX 0000000400000004000000020000000000e269c200a6dc56
RX 01011000
RX 0000000f0000000f000000030000000000e269c2
RX 00a717ec
RX 04
RX 0e0c01011000075301070f000961
TX 070200f001
TX 0108004dfc059430200004
RX 000000030000000300000003
RX 0000000000e269c200a87965
RX 07f001
RX 00000009000000090000000200000000
RX 00e269c200a8e193
RX 01
RX 4dfc059430200004
RX 0000000b0000000b
RX 000000030000000000e269c2
RX 00a918e2
RX 040e08014dfc00c85d2000
TX 0108004dfc05c85d200030
RX 000000090000000900000002
RX 0000000000e269c200aab793
RX 014dfc05c85d200030
RX 00000037
RX 000000370000000300000000
RX 00e269c200aaf0ec
RX 04
RX 0e34014dfc00434f4c42000000000700000008000000a4792100a479210020010000200000000000000000000000f85d200068ec2000
TX 0108004dfc05a479210004
RX 000000090000000900000002
RX 0000000000e269c200acb1ba
RX 014dfc05a479210004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c200ace5c2
RX 04
RX 0e08014dfc00c85d2000
TX 0108004dfc05c879210004
RX 000000090000000900000002
RX 0000000000e269c200ae2501
RX 014dfc05c879210004
RX 0000000b0000000b0000000300000000
RX 00e269c200ae5915
RX 04
RX 0e08014dfc00587a2100
TX 0108004dfc05ec79210004
RX 0000000900000009000000020000000000e269c200b01eae
RX 01
RX 4dfc05ec79210004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c200b04d6c
RX 04
RX 0e08014dfc007c7a2100
TX 0108004dfc05107a210004
RX 0000000900000009000000020000000000e269c200b19061
RX 014dfc05107a210004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c200b1c4f3
RX 04
RX 0e08014dfc00c8792100
TX 0108004dfc05347a210004
RX 0000000900000009000000020000000000e269c200b38d00
RX 01
RX 4dfc05347a210004
RX 0000000b0000000b
RX 000000030000000000e269c200b3bbaa
RX 040e08014dfc00c85d2000
TX 0108004dfc05587a210004
RX 0000000900000009000000020000000000e269c200b58252
RX 014dfc05587a210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00b5b18b
RX 040e08014dfc00ec792100
TX 0108004dfc057c7a210004
RX 0000000900000009000000020000000000e269c200b6f455
RX 014dfc057c7a210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00b728c4
RX 040e08014dfc00a07a2100
TX 0108004dfc05a07a210004
RX 000000090000000900000002
RX 0000000000e269c200b8f1d6
RX 014dfc05a07a210004
RX 0000000b0000000b000000030000000000e269c2
RX 00b92612
RX 040e08014dfc0000000000
TX 0108004dfc05f85d200030
RX 0000000900000009
RX 000000020000000000e269c2
RX 00ba65be
RX 014dfc05f85d200030
RX 00000037000000370000000300000000
RX 00e269c200ba9b76
RX 04
RX 0e34014dfc00434f4c42000000000700000008000000087b2100c47a210020020000400000000000000000000000285e2000c85d2000
TX 0108004dfc05c47a210004
RX 000000090000000900000002
RX 0000000000e269c200bc6390
RX 014dfc05c47a210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00bc987e
RX 04
RX 0e08014dfc00087b2100
TX 0108004dfc05087b210004
RX 0000000900000009000000020000000000e269c2
RX 00bdd708
RX 014dfc05087b210004
RX 0000000b0000000b0000000300000000
RX 00e269c200be075f
RX 04
RX 0e08014dfc004c7b2100
TX 0108004dfc054c7b210004
RX 0000000900000009000000020000000000e269c200bfd07f
RX 014dfc054c7b210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00bfffe2
RX 040e08014dfc00907b2100
TX 0108004dfc05907b210004
RX 000000090000000900000002
RX 0000000000e269c200c1c264
RX 014dfc05907b210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00c1fba1
RX 040e08014dfc00d47b2100
TX 0108004dfc05d47b210004
RX 000000090000000900000002
RX 0000000000e269c200c339f3
RX 014dfc05d47b210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00c36f64
RX 040e08014dfc00187c2100
TX 0108004dfc05187c210004
RX 0000000900000009000000020000000000e269c200c53386
RX 014dfc05187c210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00c56249
RX 040e08014dfc005c7c2100
TX 0108004dfc055c7c210004
RX 0000000900000009000000020000000000e269c2
RX 00c6a64c
RX 014dfc055c7c210004
RX 0000000b0000000b0000000300000000
RX 00e269c200c6d51e
RX 04
RX 0e08014dfc00a07c2100
TX 0108004dfc05a07c210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00c8a176
RX 014dfc05a07c210004
RX 0000000b0000000b0000000300000000
RX 00e269c200c8daef
RX 04
RX 0e08014dfc0000000000
TX 0108004dfc05285e200030
RX 0000000900000009
RX 000000020000000000e269c2
RX 00ca1661
RX 014dfc05285e200030
RX 000000370000003700000003
RX 0000000000e269c200ca4c0b
RX 040e34014dfc00434f4c42000000000a0000000a000000e47c2100e47c2100780a0000080100000000000000000000885e2000f85d2000
TX 0108004dfc05e47c210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00cc13aa
RX 014dfc05e47c210004
RX 0000000b0000000b0000000300000000
RX 00e269c200cc49c8
RX 04
RX 0e08014dfc00f07d2100
TX 0108004dfc05f07d210004
RX 00000009000000090000000200000000
RX 00e269c200ce084a
RX 014dfc05f07d210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00ce3d02
RX 040e08014dfc00fc7e2100
TX 0108004dfc05fc7e210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00cf7abc
RX 014dfc05fc7e210004
RX 0000000b0000000b0000000300000000
RX 00e269c200cfafff
RX 04
RX 0e08014dfc0008802100
TX 0108004dfc050880210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00d1718e
RX 014dfc050880210004
RX 0000000b0000000b0000000300000000
RX 00e269c200d1ad02
RX 040e08014dfc0014812100
TX 0108004dfc051481210004
RX 0000000900000009000000020000000000e269c200d2e49d
RX 01
RX 4dfc051481210004
RX 0000000b0000000b
RX 000000030000000000e269c200d313fc
RX 040e08014dfc0020822100
TX 0108004dfc052082210004
RX 0000000900000009000000020000000000e269c2
RX 00d4dfc6
RX 014dfc052082210004
RX 0000000b0000000b00000003
RX 0000000000e269c200d50e59
RX 040e08014dfc002c832100
TX 0108004dfc052c83210004
RX 00000009000000090000000200000000
RX 00e269c200d65308
RX 01
RX 4dfc052c83210004
RX 0000000b0000000b
RX 000000030000000000e269c2
RX 00d68806
RX 040e08014dfc0038842100
TX 0108004dfc053884210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00d84aba
RX 014dfc053884210004
RX 0000000b0000000b00000003
RX 0000000000e269c200d88584
RX 040e08014dfc0044852100
TX 0108004dfc054485210004
RX 0000000900000009000000020000000000e269c2
RX 00da42d6
RX 014dfc054485210004
RX 0000000b0000000b00000003
RX 0000000000e269c200da7651
RX 040e08014dfc0050862100
TX 0108004dfc055086210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00dbba9e
RX 014dfc055086210004
RX 0000000b0000000b00000003
RX 0000000000e269c200dbf538
RX 04
RX 0e08014dfc0000000000
TX 0108004dfc05885e200030
RX 00000009000000090000000200000000
RX 00e269c200ddb037
RX 01
RX 4dfc05885e200030
RX 000000370000003700000003
RX 0000000000e269c200dde9b6
RX 040e34014dfc00434f4c4200000000040000000400000024c6210024c62100b0100000280400000000000000000000585e2000285e2000
TX 0108004dfc0524c6210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00df268a
RX 014dfc0524c6210004
RX 0000000b0000000b0000000300000000
RX 00e269c200df5cd7
RX 040e08014dfc0050ca2100
TX 0108004dfc0550ca210004
RX 0000000900000009000000020000000000e269c2
RX 00e11eb6
RX 01
RX 4dfc0550ca210004
RX 0000000b0000000b00000003
RX 0000000000e269c200e15819
RX 040e08014dfc007cce2100
TX 0108004dfc057cce210004
RX 00000009000000090000000200000000
RX 00e269c200e29334
RX 01
RX 4dfc057cce210004
RX 0000000b0000000b
RX 000000030000000000e269c2
RX 00e2c73e
RX 040e08014dfc00a8d22100
TX 0108004dfc05a8d2210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00e4925e
RX 014dfc05a8d2210004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c200e4c673
RX 040e08014dfc0000000000
TX 0108004dfc05585e200030
RX 0000000900000009
RX 000000020000000000e269c2
RX 00e5ff65
RX 014dfc05585e200030
RX 000000370000003700000003
RX 0000000000e269c200e63326
RX 040e34014dfc00434f4c42000000001000000010000000d4d62100d4d621008044000044040000000000000000000038ec2000885e2000
TX 0108004dfc05d4d6210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00e7fcce
RX 014dfc05d4d6210004
RX 0000000b0000000b0000000300000000
RX 00e269c200e8313f
RX 040e08014dfc001cdb2100
TX 0108004dfc051cdb210004
RX 0000000900000009000000020000000000e269c200e9f3c0
RX 014dfc051cdb210004
RX 0000000b0000000b
RX 000000030000000000e269c2
RX 00ea223f
RX 040e08014dfc0064df2100
TX 0108004dfc0564df210004
RX 00000009000000090000000200000000
RX 00e269c200eb6947
RX 01
RX 4dfc0564df210004
RX 0000000b0000000b00000003
RX 0000000000e269c200eb9dc8
RX 04
RX 0e08014dfc00ace32100
TX 0108004dfc05ace3210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00ed6025
RX 014dfc05ace3210004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00edb820
RX 040e08014dfc00f4e72100
TX 0108004dfc05f4e7210004
RX 00000009000000090000000200000000
RX 00e269c200eeaa84
RX 014dfc05f4e7210004
RX 0000000b0000000b000000030000000000e269c200eeb23c
RX 04
RX 0e08014dfc003cec2100
TX 0108004dfc053cec210004
RX 0000000900000009
RX 000000020000000000e269c200ef25f0
RX 01
RX 4dfc053cec210004
RX 0000000b
RX 0000000b000000030000000000e269c200ef2e26
RX 04
RX 0e08014dfc0084f02100
TX 0108004dfc0584f0210004
RX 0000000900000009000000020000000000e269c200efa285
RX 014dfc0584f0210004
RX 0000000b
RX 0000000b000000030000000000e269c200efa979
RX 040e08014dfc00ccf42100
TX 0108004dfc05ccf4210004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00f0207c
RX 014dfc05ccf4210004
RX 0000000b0000000b0000000300000000
RX 00e269c200f028c8
RX 04
RX 0e08014dfc0014f92100
TX 0108004dfc0514f9210004
RX 0000000900000009000000020000000000e269c200f0b8fd
RX 014dfc0514f9210004
RX 0000000b0000000b0000000300000000
RX 00e269c200f0bf4a
RX 040e08014dfc005cfd2100
TX 0108004dfc055cfd210004
RX 00000009000000090000000200000000
RX 00e269c200f11c7d
RX 01
RX 4dfc055cfd210004
RX 0000000b0000000b00000003
RX 0000000000e269c200f12aa4
RX 040e08014dfc00a4012200
TX 0108004dfc05a401220004
RX 0000000900000009000000020000000000e269c200f1946c
RX 014dfc05a401220004
RX 0000000b0000000b00000003
RX 0000000000e269c200f19f40
RX 040e08014dfc00ec052200
TX 0108004dfc05ec05220004
RX 0000000900000009000000020000000000e269c200f20f44
RX 01
RX 4dfc05ec05220004
RX 0000000b0000000b00000003
RX 0000000000e269c200f21b6a
RX 04
RX 0e08014dfc00340a2200
TX 0108004dfc05340a220004
RX 0000000900000009000000020000000000e269c200f29be7
RX 014dfc05340a220004
RX 0000000b
RX 0000000b000000030000000000e269c2
RX 00f2b3bd
RX 040e08014dfc007c0e2200
TX 0108004dfc057c0e220004
RX 00000009
RX 00000009
RX 0000000200000000
RX 00e269c200f3a7c6
RX 01
RX 4dfc057c0e220004
RX 0000000b0000000b000000030000000000e269c2
RX 00f4951f
RX 040e08014dfc00c4122200
TX 0108004dfc05c412220004
RX 0000000900000009
RX 000000020000000000e269c200f637e5
RX 014dfc05c412220004
RX 0000000b0000000b000000030000000000e269c200f63f91
RX 040e08014dfc000c172200
TX 0108004dfc050c17220004
RX 00000009
RX 000000090000000200000000
RX 00e269c200f6f156
RX 014dfc050c17220004
RX 0000000b0000000b0000000300000000
RX 00e269c200f6f966
RX 04
RX 0e08014dfc0000000000
TX 0108004dfc0538ec200030
RX 00000009000000090000000200000000
RX 00e269c200f76de0
RX 014dfc0538ec200030
RX 0000003700000037000000030000000000e269c200f7757d
RX 040e34014dfc00434f4c42000000000f0000000f000000541b2200541b22009402000028000000000000000000000068ec2000585e2000
TX 0108004dfc05541b220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00f8133d
RX 014dfc05541b220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c200f83a20
RX 04
RX 0e08014dfc00801b2200
TX 0108004dfc05801b220004
RX 0000000900000009000000020000000000e269c200f909ee
RX 014dfc05801b220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c200f935e2
RX 04
RX 0e08014dfc00ac1b2200
TX 0108004dfc05ac1b220004
RX 0000000900000009000000020000000000e269c2
RX 00fb146c
RX 014dfc05ac1b220004
RX 0000000b
RX 0000000b00000003
RX 0000000000e269c200fb4327
RX 040e08014dfc00d81b2200
TX 0108004dfc05d81b220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 00fd0682
RX 014dfc05d81b220004
RX 0000000b0000000b0000000300000000
RX 00e269c200fd3fca
RX 04
RX 0e08014dfc00041c2200
TX 0108004dfc05041c220004
RX 00000009000000090000000200000000
RX 00e269c200fe7d8e
RX 01
RX 4dfc05041c220004
RX 0000000b0000000b00000003
RX 0000000000e269c200feb0d4
RX 040e08014dfc00301c2200
TX 0108004dfc05301c220004
RX 0000000900000009000000020000000000e269c2
RX 010074cc
RX 014dfc05301c220004
RX 0000000b0000000b0000000300000000
RX 00e269c20100a76b
RX 04
RX 0e08014dfc005c1c2200
TX 0108004dfc055c1c220004
RX 0000000900000009000000020000000000e269c20101eacb
RX 014dfc055c1c220004
RX 0000000b0000000b0000000300000000
RX 00e269c201021779
RX 04
RX 0e08014dfc00881c2200
TX 0108004dfc05881c220004
RX 0000000900000009000000020000000000e269c20103e6c3
RX 014dfc05881c220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c201041515
RX 04
RX 0e08014dfc00b41c2200
TX 0108004dfc05b41c220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 01055aa2
RX 014dfc05b41c220004
RX 0000000b0000000b0000000300000000
RX 00e269c201058f0e
RX 040e08014dfc00e01c2200
TX 0108004dfc05e01c220004
RX 000000090000000900000002
RX 0000000000e269c201075199
RX 014dfc05e01c220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c201078a8c
RX 04
RX 0e08014dfc000c1d2200
TX 0108004dfc050c1d220004
RX 0000000900000009000000020000000000e269c2
RX 010948a2
RX 014dfc050c1d220004
RX 0000000b0000000b0000000300000000
RX 00e269c201097c0d
RX 04
RX 0e08014dfc00381d2200
TX 0108004dfc05381d220004
RX 0000000900000009
RX 000000020000000000e269c2010ac2b3
RX 014dfc05381d220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c2010afeef
RX 04
RX 0e08014dfc00641d2200
TX 0108004dfc05641d220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 010cbc41
RX 014dfc05641d220004
RX 0000000b0000000b00000003
RX 0000000000e269c2010cefe5
RX 040e08014dfc00901d2200
TX 0108004dfc05901d220004
RX 00000009000000090000000200000000
RX 00e269c2010e2df1
RX 01
RX 4dfc05901d220004
RX 0000000b0000000b00000003
RX 0000000000e269c2010e61ea
RX 040e08014dfc00bc1d2200
TX 0108004dfc05bc1d220004
RX 000000090000000900000002
RX 0000000000e269c20110231e
RX 014dfc05bc1d220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c201105c92
RX 04
RX 0e08014dfc0000000000
TX 0108004dfc0568ec200030
RX 0000000900000009000000020000000000e269c2
RX 01119816
RX 014dfc0568ec200030
RX 00000037000000370000000300000000
RX 00e269c20111c667
RX 04
RX 0e34014dfc00434f4c42000000000f0000000f000000e81d2200e81d22001c020000200000000000000000000000c85d200038ec2000
TX 0108004dfc05e81d220004
RX 00000009000000090000000200000000
RX 00e269c201138f25
RX 01
RX 4dfc05e81d220004
RX 0000000b0000000b
RX 000000030000000000e269c20113c768
RX 040e08014dfc000c1e2200
TX 0108004dfc050c1e220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 011507e7
RX 014dfc050c1e220004
RX 0000000b0000000b0000000300000000
RX 00e269c201153d26
RX 04
RX 0e08014dfc00301e2200
TX 0108004dfc05301e220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 0116fe0e
RX 014dfc05301e220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c201173734
RX 04
RX 0e08014dfc00541e2200
TX 0108004dfc05541e220004
RX 0000000900000009000000020000000000e269c20118f296
RX 014dfc05541e220004
RX 0000000b0000000b
RX 000000030000000000e269c2011926ef
RX 040e08014dfc00781e2200
TX 0108004dfc05781e220004
RX 0000000900000009000000020000000000e269c2011a6bbe
RX 014dfc05781e220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c2011a9958
RX 04
RX 0e08014dfc009c1e2200
TX 0108004dfc059c1e220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 011c676b
RX 014dfc059c1e220004
RX 0000000b0000000b00000003
RX 0000000000e269c2011c9b6e
RX 040e08014dfc00c01e2200
TX 0108004dfc05c01e220004
RX 0000000900000009000000020000000000e269c2
RX 011dda94
RX 014dfc05c01e220004
RX 0000000b0000000b0000000300000000
RX 00e269c2011e0829
RX 04
RX 0e08014dfc00e41e2200
TX 0108004dfc05e41e220004
RX 0000000900000009000000020000000000e269c2011fd393
RX 014dfc05e41e220004
RX 0000000b0000000b
RX 0000000300000000
RX 00e269c201200234
RX 040e08014dfc00081f2200
TX 0108004dfc05081f220004
RX 0000000900000009000000020000000000e269c2
RX 012145f7
RX 014dfc05081f220004
RX 0000000b0000000b0000000300000000
RX 00e269c20121a431
RX 04
RX 0e08014dfc002c1f2200
TX 0108004dfc052c1f220004
RX 000000090000000900000002
RX 0000000000e269c201230eec
RX 014dfc052c1f220004
RX 0000000b0000000b0000000300000000
RX 00e269c201231658
RX 040e08014dfc00501f2200
TX 0108004dfc05501f220004
RX 0000000900000009
RX 000000020000000000e269c20124484f
RX 014dfc05501f220004
RX 0000000b0000000b0000000300000000
RX 00e269c201244f7a
RX 040e08014dfc00741f2200
TX 0108004dfc05741f220004
RX 00000009
RX 00000009000000020000000000e269c201250543
RX 01
RX 4dfc05741f220004
RX 0000000b0000000b000000030000000000e269c2
RX 01250d7b
RX 040e08014dfc00981f2200
TX 0108004dfc05981f220004
RX 0000000900000009
RX 000000020000000000e269c2
RX 0125e492
RX 014dfc05981f220004
RX 0000000b0000000b00000003
RX 0000000000e269c201260ab3
RX 040e08014dfc00bc1f2200
TX 0108004dfc05bc1f220004
RX 0000000900000009000000020000000000e269c2
RX 01276da0
RX 014dfc05bc1f220004
RX 0000000b
RX 0000000b0000000300000000
RX 00e269c201279c46
RX 040e08014dfc00e01f2200
TX 0108004dfc05e01f220004
RX 0000000900000009000000020000000000e269c2
RX 0128e461
RX 014dfc05e01f220004
RX 0000000b0000000b00000003
RX 0000000000e269c2012914b3
RX 040e08014dfc0000000000
Socket closed
@@ -1,148 +0,0 @@
# info queue
TX 010300011000
RX 0000000400000004000000020000000000e269c2663770fc
RX 01011000
RX 0000000f0000000f000000030000000000e269c26637a4a7
RX 040e0c01011000075301070f000961
TX 070200f001
TX 0108004dfc057c30200004
RX 00000003000000030000000300000000
RX 00e269c266390c8a
RX 07f001
RX 00000009
RX 000000090000000200000000
RX 00e269c2663974da
RX 01
RX 4dfc057c30200004
RX 0000000b0000000b
RX 000000030000000000e269c26639ac63
RX 040e08014dfc0090652000
TX 0108004dfc059065200038
RX 000000090000000900000002
RX 0000000000e269c2
RX 663b4f1a
RX 014dfc059065200038
RX 0000003f0000003f0000000300000000
RX 00e269c2663b83d8
RX 040e3c014dfc00554555510000000001000000100000000000000010000000c8652000086620000466200004662000000000000000000044662000ecad2000
TX 0108004dfc054466200038
RX 000000090000000900000002
RX 0000000000e269c2663d419c
RX 014dfc054466200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 663d7aab
RX 040e3c014dfc005545555100000000020000001f000000000000001f0000007c66200074672000ac662000ac66200000000000000000007467200090652000
TX 0108004dfc057467200038
RX 0000000900000009000000020000000000e269c2
RX 663ebb9e
RX 014dfc057467200038
RX 0000003f0000003f00000003
RX 0000000000e269c2663eeac6
RX 040e3c014dfc00554555510000000001000000030000000000000003000000ac672000b8672000ac672000ac6720000000000000000000b867200044662000
TX 0108004dfc05b867200038
RX 0000000900000009000000020000000000e269c26640af70
RX 01
RX 4dfc05b867200038
RX 0000003f0000003f
RX 000000030000000000e269c2
RX 6640e3ed
RX 040e3c014dfc005545555100000000010000001f000000000000001f000000f06720006c682000f0672000f067200000000000000000006c68200074672000
TX 0108004dfc056c68200038
RX 0000000900000009000000020000000000e269c26642a534
RX 014dfc056c68200038
RX 0000003f
RX 0000003f0000000300000000
RX 00e269c26642d8cd
RX 04
RX 0e3c014dfc00554555510000000001000000140000000000000014000000a4682000f4682000e0682000e06820000000000000000000f4682000b8672000
TX 0108004dfc05f468200038
RX 0000000900000009000000020000000000e269c266441bec
RX 014dfc05f468200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 6644504f
RX 040e3c014dfc005545555100000000020000000800000000000000080000002c6920006c6920002c6920002c69200000000000000000006c6920006c682000
TX 0108004dfc056c69200038
RX 000000090000000900000002
RX 0000000000e269c2
RX 664611cc
RX 014dfc056c69200038
RX 0000003f
RX 0000003f0000000300000000
RX 00e269c266464b12
RX 04
RX 0e3c014dfc00554555510000000002000000060000000000000006000000a4692000d4692000a4692000a46920000000000000000000d4692000f4682000
TX 0108004dfc05d469200038
RX 00000009000000090000000200000000
RX 00e269c266478916
RX 01
RX 4dfc05d469200038
RX 0000003f0000003f00000003
RX 0000000000e269c26647be39
RX 040e3c014dfc00554555510000000002000000010000000000000001000000100d2000180d2000100d2000100d200000000000000000000c6a20006c692000
TX 0108004dfc050c6a200038
RX 000000090000000900000002
RX 0000000000e269c2664987ae
RX 014dfc050c6a200038
RX 0000003f0000003f
RX 000000030000000000e269c2
RX 6649bc49
RX 040e3c014dfc00554555510000000002000000010000000000000001000000180d2000200d2000180d2000180d20000000000000000000446a2000d4692000
TX 0108004dfc05446a200038
RX 000000090000000900000002
RX 0000000000e269c2664af918
RX 014dfc05446a200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 664b2d9b
RX 040e3c014dfc005545555100000000020000002000000000000000200000007c6a20007c6b20007c6a20007c6a20000000000000000000903320000c6a2000
TX 0108004dfc059033200038
RX 0000000900000009000000020000000000e269c2664cf025
RX 014dfc059033200038
RX 0000003f0000003f
RX 000000030000000000e269c2
RX 664d236e
RX 040e3c014dfc005545555100000000020000000c000000000000000c0000009c732100fc732100ac732100ac7321000000000000000000705b2000446a2000
TX 0108004dfc05705b200038
RX 0000000900000009000000020000000000e269c2
RX 664ee493
RX 014dfc05705b200038
RX 0000003f0000003f0000000300000000
RX 00e269c2664f184e
RX 04
RX 0e3c014dfc00554555510000000001000000080000000000000008000000fc7321001c74210010742100107421000000000000000000c833200090332000
TX 0108004dfc05c833200038
RX 000000090000000900000002
RX 0000000000e269c2665059ac
RX 014dfc05c833200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 6650912f
RX 040e3c014dfc005545555100000000020000001300000000000000130000001c742100b47421001c7421001c7421000000000000000000b4512000705b2000
TX 0108004dfc05b451200038
RX 0000000900000009
RX 000000020000000000e269c266525485
RX 014dfc05b451200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 6652883b
RX 040e3c014dfc00554555510000000002000000060000000000000006000000b4742100e4742100b4742100b4742100000000000000000094ad2000c8332000
TX 0108004dfc0594ad200038
RX 000000090000000900000002
RX 0000000000e269c26653c77b
RX 014dfc0594ad200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 6653fcfb
RX 040e3c014dfc00554555510000000001000000080000000000000008000000ccad2000ecad2000ccad2000ccad20000000000000000000ecad2000b4512000
TX 0108004dfc05ecad200038
RX 0000000900000009
RX 000000020000000000e269c2
RX 6655bd0f
RX 014dfc05ecad200038
RX 0000003f
RX 0000003f000000030000000000e269c2
RX 6655f6b7
RX 040e3c014dfc0055455551000000000100000010000000000000001000000024ae200064ae200024ae200024ae200000000000000000009065200094ad2000
Socket closed
@@ -1,310 +0,0 @@
# info heap
TX 01011000
RX 040e0c010110000900100931010e42
TX 07f001
EX '[Errno 22] Invalid argument'
TX 014dfc057c0c200004
RX 040e08014dfc009c0c2000
TX 014dfc059c0c200030
RX 040e34014dfc00bc0c200020002000106e2100706e21001c02dff600000000000000001800ac67dc0c2000600032001072210010722100
TX 014dfc05106e210004
RX 040e08014dfc0000000000
TX 014dfc05346e210004
RX 040e08014dfc003f700000
TX 014dfc05586e210004
RX 040e08014dfc000e060112
TX 014dfc057c6e210004
RX 040e08014dfc00fc000e06
TX 014dfc05a06e210004
RX 040e08014dfc0000000000
TX 014dfc05c46e210004
RX 040e08014dfc000e425bf2
TX 014dfc05e86e210004
RX 040e08014dfc0050e4f62a
TX 014dfc050c6f210004
RX 040e08014dfc0037ff97bb
TX 014dfc05306f210004
RX 040e08014dfc00506f2100
TX 014dfc05546f210004
RX 040e08014dfc00b549d45c
TX 014dfc05786f210004
RX 040e08014dfc0058f0be2b
TX 014dfc059c6f210004
RX 040e08014dfc00a0903c96
TX 014dfc05c06f210004
RX 040e08014dfc00e2c5ca58
TX 014dfc05e46f210004
RX 040e08014dfc00ce7076b6
TX 014dfc050870210004
RX 040e08014dfc00bb595b16
TX 014dfc052c70210004
RX 040e08014dfc00169268ea
TX 014dfc055070210004
RX 040e08014dfc0070702100
TX 014dfc057470210004
RX 040e08014dfc0027ac3478
TX 014dfc059870210004
RX 040e08014dfc00a4f59995
TX 014dfc05bc70210004
RX 040e08014dfc005f841056
TX 014dfc05e070210004
RX 040e08014dfc00d87169c0
TX 014dfc050471210004
RX 040e08014dfc007a987779
TX 014dfc052871210004
RX 040e08014dfc00b66dc568
TX 014dfc054c71210004
RX 040e08014dfc0019511209
TX 014dfc057071210004
RX 040e08014dfc0090712100
TX 014dfc059471210004
RX 040e08014dfc00f34fbf0f
TX 014dfc05b871210004
RX 040e08014dfc0013e150a9
TX 014dfc05dc71210004
RX 040e08014dfc008248b026
TX 014dfc050072210004
RX 040e08014dfc00f604397f
TX 014dfc052472210004
RX 040e08014dfc002000106e
TX 014dfc054872210004
RX 040e08014dfc0021001072
TX 014dfc056c72210004
RX 040e08014dfc00e515f282
TX 014dfc05bc0c200030
RX 040e34014dfc00dc0c20006000320010722100107221003202924d000000000000000031000dc5ac1921000c010c00d0842100d0842100
TX 014dfc051072210004
RX 040e08014dfc0070722100
TX 014dfc057472210004
RX 040e08014dfc00959a9ec8
TX 014dfc05d872210004
RX 040e08014dfc0030a9ed59
TX 014dfc053c73210004
RX 040e08014dfc003bbab2b5
TX 014dfc05a073210004
RX 040e08014dfc0086fd5a51
TX 014dfc050474210004
RX 040e08014dfc00d50c8a3b
TX 014dfc056874210004
RX 040e08014dfc0004638b3f
TX 014dfc05cc74210004
RX 040e08014dfc0030ac8deb
TX 014dfc053075210004
RX 040e08014dfc0005dee8ca
TX 014dfc059475210004
RX 040e08014dfc00383cb12b
TX 014dfc05f875210004
RX 040e08014dfc00712477a2
TX 014dfc055c76210004
RX 040e08014dfc00042f27e2
TX 014dfc05c076210004
RX 040e08014dfc0060e84efd
TX 014dfc052477210004
RX 040e08014dfc00c4ea8546
TX 014dfc058877210004
RX 040e08014dfc006568c849
TX 014dfc05ec77210004
RX 040e08014dfc0020f8d1c2
TX 014dfc055078210004
RX 040e08014dfc0006c1b1bd
TX 014dfc05b478210004
RX 040e08014dfc00094d843c
TX 014dfc051879210004
RX 040e08014dfc008e76a50c
TX 014dfc057c79210004
RX 040e08014dfc00eab79187
TX 014dfc05e079210004
RX 040e08014dfc00c244eb84
TX 014dfc05447a210004
RX 040e08014dfc00096bb2fa
TX 014dfc05a87a210004
RX 040e08014dfc0095ba6e8e
TX 014dfc050c7b210004
RX 040e08014dfc00c93437cf
TX 014dfc05707b210004
RX 040e08014dfc00d07b2100
TX 014dfc05d47b210004
RX 040e08014dfc00aa7e35ec
TX 014dfc05387c210004
RX 040e08014dfc001427f85b
TX 014dfc059c7c210004
RX 040e08014dfc0043ec3098
TX 014dfc05007d210004
RX 040e08014dfc002b962090
TX 014dfc05647d210004
RX 040e08014dfc00e1e50a13
TX 014dfc05c87d210004
RX 040e08014dfc00890b643f
TX 014dfc052c7e210004
RX 040e08014dfc008f1285f5
TX 014dfc05907e210004
RX 040e08014dfc00992f618e
TX 014dfc05f47e210004
RX 040e08014dfc00a224eb13
TX 014dfc05587f210004
RX 040e08014dfc001617b045
TX 014dfc05bc7f210004
RX 040e08014dfc00c343e48e
TX 014dfc052080210004
RX 040e08014dfc0059330458
TX 014dfc058480210004
RX 040e08014dfc006f72bcfd
TX 014dfc05e880210004
RX 040e08014dfc00b41d6c1a
TX 014dfc054c81210004
RX 040e08014dfc00c8c49d5e
TX 014dfc05b081210004
RX 040e08014dfc000a3b3001
TX 014dfc051482210004
RX 040e08014dfc00d81de738
TX 014dfc057882210004
RX 040e08014dfc00f687b753
TX 014dfc05dc82210004
RX 040e08014dfc00d1c2a441
TX 014dfc054083210004
RX 040e08014dfc001d6a3d74
TX 014dfc05a483210004
RX 040e08014dfc00eb59e393
TX 014dfc050884210004
RX 040e08014dfc002bac49b0
TX 014dfc056c84210004
RX 040e08014dfc00531c7cdb
TX 014dfc05d084210004
RX 040e08014dfc00e8862100
TX 014dfc053485210004
RX 040e08014dfc0000000000
TX 014dfc05dc0c200030
RX 040e34014dfc00ac1921000c010c00d0842100d08421000b01c7f400000000000000000a009ddee562af6e7340e80466ef0ffb070ae8b4
TX 014dfc05d084210004
RX 040e08014dfc00e8862100
TX 014dfc05e085210004
RX 040e08014dfc007066626f
TX 014dfc05f086210004
RX 040e08014dfc0080d97cfe
TX 014dfc050088210004
RX 040e08014dfc00cc25c8a4
TX 014dfc051089210004
RX 040e08014dfc0014cf1027
TX 014dfc05208a210004
RX 040e08014dfc009b023589
TX 014dfc05308b210004
RX 040e08014dfc003f2478b0
TX 014dfc05408c210004
RX 040e08014dfc00789c4ff0
TX 014dfc05508d210004
RX 040e08014dfc001653cd1c
TX 014dfc05608e210004
RX 040e08014dfc000bf3677b
TX 014dfc05708f210004
RX 040e08014dfc00127f44bb
TX 014dfc058090210004
RX 040e08014dfc006abc559f
TX 014dfc05ac19210030
RX 040e34014dfc00cc1921002c040400609121006091210004000000000000000000000004000000ec1921004404100010a2210010a22100
TX 014dfc056091210004
RX 040e08014dfc008c952100
TX 014dfc059095210004
RX 040e08014dfc001939e2d2
TX 014dfc05c099210004
RX 040e08014dfc0093582076
TX 014dfc05f09d210004
RX 040e08014dfc00604ad39e
TX 014dfc05cc19210030
RX 040e34014dfc00ec1921004404100010a2210010a22100100000000000000000000000100000000c1a210008010f0050e6210050e62100
TX 014dfc0510a2210004
RX 040e08014dfc0054a62100
TX 014dfc0558a6210004
RX 040e08014dfc0052cdef92
TX 014dfc05a0aa210004
RX 040e08014dfc0017c2abb7
TX 014dfc05e8ae210004
RX 040e08014dfc000596b2ce
TX 014dfc0530b3210004
RX 040e08014dfc005ad23383
TX 014dfc0578b7210004
RX 040e08014dfc000b251dde
TX 014dfc05c0bb210004
RX 040e08014dfc009aa77767
TX 014dfc0508c0210004
RX 040e08014dfc005e949cc9
TX 014dfc0550c4210004
RX 040e08014dfc00e819e1ac
TX 014dfc0598c8210004
RX 040e08014dfc00a348e7b5
TX 014dfc05e0cc210004
RX 040e08014dfc009f139f97
TX 014dfc0528d1210004
RX 040e08014dfc00fed3ec24
TX 014dfc0570d5210004
RX 040e08014dfc0088440ccb
TX 014dfc05b8d9210004
RX 040e08014dfc008bed1d44
TX 014dfc0500de210004
RX 040e08014dfc00cf7e0977
TX 014dfc0548e2210004
RX 040e08014dfc00769b88ce
TX 014dfc05ec19210030
RX 040e34014dfc000c1a210008010f0050e6210050e621000f00000000000000000000000f0000000000000008010f00c8f52100c8f52100
TX 014dfc0550e6210004
RX 040e08014dfc0058e72100
TX 014dfc055ce7210004
RX 040e08014dfc00af56f59e
TX 014dfc0568e8210004
RX 040e08014dfc00e76f973a
TX 014dfc0574e9210004
RX 040e08014dfc00dee5cb64
TX 014dfc0580ea210004
RX 040e08014dfc00e4ed9cf9
TX 014dfc058ceb210004
RX 040e08014dfc0007ee18ae
TX 014dfc0598ec210004
RX 040e08014dfc00c490cf87
TX 014dfc05a4ed210004
RX 040e08014dfc000c8f0f7f
TX 014dfc05b0ee210004
RX 040e08014dfc00f5414004
TX 014dfc05bcef210004
RX 040e08014dfc00db7f4b5a
TX 014dfc05c8f0210004
RX 040e08014dfc007dda224f
TX 014dfc05d4f1210004
RX 040e08014dfc00c1bf8fbf
TX 014dfc05e0f2210004
RX 040e08014dfc001b97e5ff
TX 014dfc05ecf3210004
RX 040e08014dfc00c868fa27
TX 014dfc05f8f4210004
RX 040e08014dfc0013b920ef
TX 014dfc050c1a210030
RX 040e34014dfc000000000008010f00c8f52100c8f521000f00000000000000000000000f00000000000000000000000000000000000000
TX 014dfc05c8f5210004
RX 040e08014dfc00d0f62100
TX 014dfc05d4f6210004
RX 040e08014dfc00bcb62189
TX 014dfc05e0f7210004
RX 040e08014dfc0075612293
TX 014dfc05ecf8210004
RX 040e08014dfc00e99a2e01
TX 014dfc05f8f9210004
RX 040e08014dfc002b2c920c
TX 014dfc0504fb210004
RX 040e08014dfc009d6ffeb2
TX 014dfc0510fc210004
RX 040e08014dfc009e978b78
TX 014dfc051cfd210004
RX 040e08014dfc000a9dde86
TX 014dfc0528fe210004
RX 040e08014dfc002b8f97a2
TX 014dfc0534ff210004
RX 040e08014dfc00c03cc4bc
TX 014dfc054000220004
RX 040e08014dfc0001e7a7e0
TX 014dfc054c01220004
RX 040e08014dfc0046622e6e
TX 014dfc055802220004
RX 040e08014dfc00aa83d071
TX 014dfc056403220004
RX 040e08014dfc00acf9b776
TX 014dfc057004220004
RX 040e08014dfc008978fab6
Socket closed