-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
No traffic shown on some macs #51
Comments
I get the same. macOS: 10.14.5 |
Also get the same. MacOS: 10.14.6 Additional info. Using Macbook with wifi. Sudo does not help. Tried en0 and awdl0 and both did not work. |
Same here. great tool and eager to use it. thanks. |
Same here. Happy New Years??🙀 |
I am having the same issue. |
Same, 10.15.2 |
Same, 10.13.6 |
The way I see it, this issue is likely caused by either:
I somehow suspect it's the second... but I'm not certain. For those experiencing this issue, while the tool is running, if in another terminal you run I might ask for some more help debugging afterwards so we can get to the bottom of this issue :) Thanks! |
|
Same issue here. Without
With sudo prefix While bandwhich is running, in another terminal tab I get many results when running Mac 10.14.6 |
Output of Is it possible that bandwhich is parsing the output of
Which seems to be related to a Time Machine Backup. Are others seeing the same warning as the first line in the |
No. |
@imsnif Why not use syscall? |
@briantully you can add |
I don’t see any warnings on my side. Using Mojave 10.14.6 with currentest bandwhich.
Sincerely,
Thomas J. Munn
Consulting Security Engineer
LexisNexis
On 12/31/19, 14:38, "Sergey" <notifications@github.com<mailto:notifications@github.com>> wrote:
*** External email: use caution ***
@briantully<https://github.com/briantully> you can add -w to lsof for disable warnings
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#51?email_source=notifications&email_token=ALVIUB4EGBKACMEJEBYAXUTQ3ONSHA5CNFSM4KBUKC72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH4TKKI#issuecomment-569980201>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALVIUB5HL7VR2M7RG2TTHZLQ3ONSHANCNFSM4KBUKC7Q>.
|
I looked at how it looks on syscalls. Not very nice and maintained... |
Could you explain the logic? Lines 197 to 226 in 9d93d34
It feels like this code stops working after the first ui update. In fact, for an instant, something is drawn and immediately erased. |
Hey, @grishy - great work! Looks like you're on to something. The The above code is where we iterate over segment size information from the network card and record it in the If you're up to continue debugging this, I'd be very interested in finding out what happens here: https://github.com/imsnif/bandwhich/blob/master/src/network/sniffer.rs#L57 |
I added some print statements like this:
After running the program, "Got packet!" was never printed. Which means the pnet datalink receiver did not receive any packets. |
@zhangxp1998 - do you think "Got packet!" will also not be printed if you put it directly after |
Tried, wasn't printed. |
Maybe it has something to do with Mac's SIP ? I cannot restart my Mac at this moment, but if someone can run the bandwich program with SIP disabled that would be great. |
@zhangxp1998 - I more than suspect SIP is at least partly the issue here and would love it if someone could try. Otherwise, this is just a guess: can you try commenting out this line and seeing if it helps? https://github.com/imsnif/bandwhich/blob/master/src/os/shared.rs#L37 (fair warning, you might have to If it doesn't (and disabling SIP doesn't solve this), I'll check back with other options a little later. Thanks for the help! |
Magically, removing the read timeout in shared.rs solved this issue. I suspect this is PNET's implementation quirk? |
confirmed seeing this issue on Mojave 10.14.6 |
There's a fix for this issue, as well as the "getting an error without -i" issue in master right now. Could you please:
Thanks very much! I'll release a version when I can confirm this works. EDIT: the testing is mostly because I want to make sure the two fixes don't interfere with each other :) |
It seems to work. The display changes quite quickly though so its kind of hard to see whats going on. But I definitely see stuff now without specifiying the interface. It doesn’t want to quit though, had to kill -9 the process as root.
|
It seems to work. The display changes quite quickly though so its kind of hard to see whats going on. But I definitely see stuff now without specifiying the interface. It doesn’t want to quit though, had to kill -9 the process as root. ctrl c didn't stop it. |
Thanks @munntjlx - I'm trying another option, just pushed to master. How about now? |
It exits now. Any way I can update the polling cycle? It erases every second? |
or perhaps an 'average' of the last 60 seconds, then print for a minute? |
Works though! YeA! |
I also confirm the issue is gone on master. |
Master no longer works for me, shows no traffic. But I can quit the program through |
@zhangxp1998 - thanks for keeping tabs on this. I think we're going to go with 1s for this coming release as it seems to be working for more people. I really want to understand what's going on here and find a better solution. Would you be interested in investigating this deeper? |
@imsnif Yes of course :) |
Root cause found! @imsnif See bpf.rs, libpnet did not set the bit mask Why no read timeout fixes the issue? The solution is to add
Before their I fixed this issue locally, and rebuild UPDATE: |
@zhangxp1998 - great work!! Very quick, too. |
@imsnif I looked at pnet GitHub page. They might be seeking new maintainers and experiencing delays in PR. Some PRs are open since Mar 5th 2019. I don't think we will get a response promptly. |
Let's give them a short while - at least a few days. I see most of the PRs there are being at least commented on. |
There is a somewhat hacky workaround that should solve the problem in some cases (as indicated in this thread) released in |
Hey, just jumping in here to let you know that I merged the PR and bumped the version to |
Thanks very much @JuxhinDB !! |
This is 9d93d34 on macOS 10.14.6
bandwhich starts but shows no traffic.
sudo /Users/diver/.cargo/bin/bandwhich
sudo /Users/diver/.cargo/bin/bandwhich -i en0
shows the same.List of interfaces:
The text was updated successfully, but these errors were encountered: