-
Notifications
You must be signed in to change notification settings - Fork 114
Added a PcapSnooper class #865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The class implements a bumble snooper that writes PCAP records. It can write to either a file or a named pipe. The latter is useful to bridge with wireshark extcap for live logging.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
I fixed the formatting issues that came up in the checks by running black and making minimal manual adjustments. |
|
You can use |
bumble/snoop.py
Outdated
| PCAP_MAGIC = 0xa1b2c3d4 | ||
| DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 201 | ||
|
|
||
| def __init__(self, fifo): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have annotation here
Ah perfect! I'll do that and update soon. |
…oped global were needed.
|
Somehow my local |
I built a bumble HCI logging bridge for live logging with Wireshark.
It simply plugs together bumble's snooper concept with a Wireshark extcap script via a named pipe.
You can see the result here:
https://github.com/willnix/bumble-wireshark
I thought the bumble part of it could be useful to others, hence I'm opening this PR.
The class implements a bumble snooper that writes PCAP records. It can write to either a file or a named pipe.
The latter is what I use to bridge with Wireshark but I thought logging to a PCAP file might sometimes also be handy.
I ran
invoke project.lint -d "", fixed what came up and generally tried to stick very close to the existing structure.What I'm not super happy with is the text duplication in the docstring, but I wasn't really sure what else to do.