From 4c75c2bc7e499f0d0d3583227db1b5a02758b9c2 Mon Sep 17 00:00:00 2001 From: Kyle Husmann Date: Tue, 24 Dec 2024 13:47:23 -0800 Subject: [PATCH] add new data capture --- btsnoop/fix_log.py | 5 +++-- btsnoop/input/uv-pro/0.7.10-3/send_data.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 btsnoop/input/uv-pro/0.7.10-3/send_data.txt diff --git a/btsnoop/fix_log.py b/btsnoop/fix_log.py index 42e1b42..2c42123 100755 --- a/btsnoop/fix_log.py +++ b/btsnoop/fix_log.py @@ -41,7 +41,7 @@ def to_text(cmd: bytes): reader = csv.DictReader(sys.stdin) output_header = [ - "id", "dir", "is_known", "group", "is_reply", "command", "message" + "id", "dir", "is_known", "group", "is_reply", "command", "message", "original" ] writer = csv.DictWriter(sys.stdout, fieldnames=output_header) @@ -75,5 +75,6 @@ def to_text(cmd: bytes): "group": frame.data.command_group.name, "is_reply": frame.data.is_reply, "command": frame.data.command.name, - "message": str(frame.data.body) + "message": str(frame.data.body), + "original": frame.data.to_bytes() }) diff --git a/btsnoop/input/uv-pro/0.7.10-3/send_data.txt b/btsnoop/input/uv-pro/0.7.10-3/send_data.txt new file mode 100644 index 0000000..b0d0075 --- /dev/null +++ b/btsnoop/input/uv-pro/0.7.10-3/send_data.txt @@ -0,0 +1 @@ +# Send "test 123" and "test 321" \ No newline at end of file