Skip to content
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

Add ability to capture to stdout #362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add ability to capture to stdout #362

wants to merge 1 commit into from

Conversation

rgov
Copy link

@rgov rgov commented Mar 24, 2019

This patch makes ubertooth-btle -f -c - do what you would expect. Unfortunately it only works on Linux because it requires procfs; libbtbb does not let us capture to a file descriptor, so we need to be able to pass it an actual path.

Without this patch, ubertooth-btle could be forced to write to /dev/stdout, but it will interleave its status messages, corrupting the pcap.

Another (perhaps better) solution would be to track down every call to printf() and whatever else writes to stdout, and make them all conditional, but I didn't know how much work that would be.

This is mostly useful for using with the sshdump extcap tool, which lets us stream captures from another host over SSH. I'm using it successfully to capture from an Ubertooth attached to a Linux virtual machine while I use Wireshark natively in macOS. (I wrote it up for the wiki.) However, without being able to capture to stdout, it requires some contortions with temporary named pipes and such.

@mossmann mossmann self-requested a review June 28, 2021 18:01
@stryngs
Copy link

stryngs commented Sep 9, 2021

#464 was my solution for this kind of an issue. We don't have a tap interface but we can write to a pcap. Read the PCAP but ignore EOF and let a loop handle the reading to avoid starting over at the beginning of the file.

@straithe straithe added the enhancement potential new feature label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement potential new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants