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

ENH: Allow freezing/halting of capture, to have steady data to explore #551

Open
1 task done
corneliusroemer opened this issue Jul 4, 2024 · 5 comments
Open
1 task done
Labels
enhancement New feature, request, or improvement

Comments

@corneliusroemer
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Describe the solution you'd like

I love sniffnet, great tool!

One thing I'm missing is the ability to halt/freeze/"stop the world" to explore what's been captured in detail.

Right now, the data refreshes every second, making it hard to read/explore. I've looked for such a feature in the docs/help but couldn't find anything.

Is your feature request related to a problem?

I'm always frustrated when I try to read a table and the table rerenders the second I move to another column.

Try staying with the "same" here (semantically the same, not at the same height):
2024-07-04 13 31 43

I'm surprised no one else has had this problem yet - I must have missed something obvious, like a pause button, but couldn't find anything.

@GyulyVGC GyulyVGC added the enhancement New feature, request, or improvement label Jul 4, 2024
@GyulyVGC
Copy link
Owner

GyulyVGC commented Jul 4, 2024

Thanks for your suggestion.
Yes, you're actually the first one to have brought up this kind of concern and there is not a real solution as of now.

However, as you may have noticed, you can sort the table by packets or bytes exchanged and that will give you a much more stable view.
Let me know if this sounds as a possible acceptable workaround.

In case the table isn't sorted, the default behaviour is to show the most recent entries, so it doesn't make much sense to stop it in my opinion; freezing the capture would also be counterintuitive I think because it could introduce some misunderstandings about the status of the capture: the capture is running while the view is freezed.

@GyulyVGC
Copy link
Owner

GyulyVGC commented Jul 4, 2024

After better thinking about this one, I came to the following conclusions:

  1. the table can be sorted by ascending / descending number of packets / bytes in case you want a more steady view
  2. If you want to have steady data to explore you can always export the capture as a PCAP file; Sniffnet already supports exporting such kind of files and importing them is planned for the future (Ability to read PCAP files #283)
  3. freezing the view while the capture is running breaks things because in this case we'd have inconsistent states of what's captured vs what's displayed
  4. freezing both the view & the capture is the only reasonable solution I can think of

This being said, I think that points 1) and 2) make it clear that there are other solutions to have steady data to explore.
However, being able to stop and later resume the capture could potentially be of interest for other scenarios maybe?
Right now, to achieve this the only workaround is to stop the current analysis and later restart another analysis still from the same network adapter.
Maybe we should understand if there's some case in which users want to pause the ongoing analysis without restarting it.

@corneliusroemer
Copy link
Author

corneliusroemer commented Jul 4, 2024

Thanks for thinking this through!

My idea was to halt the entire capture. Then I can inspect whatever I've captured. So that's version 4 in your list. That's perfectly good!

While there might be workarounds, i.e. using a different program to view what was captured, isn't the whole idea of sniffnet to allow convenient viewing right there 😀

I've discovered the sorting workaround as well, but it's a bit annoying still and imperfect.

@erieflin
Copy link

erieflin commented Oct 7, 2024

To give an example of why this would be wanted.

I've just started playing around with this tool, and ran into the scenario where i wished to favorite a few connections

However, in the "live" data, this was extremely hard to do as things shifted around as you try to click the star, causing the wrong line to be marked. I would agree that pausing only makes sense with version 4 you mention.

While i figured out the same sort solution, a pause button may be more intuitive in cases like this.

In general i think your correct that a pause is basically a stop and restart from the same network adaptor.

And this means that the main benefit desired from the "pause" seems to be for the previous run data to still be displayed after the stop. As apposed to current behavior, where stopping returns to adaptor selection screen, and data needs to be viewed outside the tool

@GyulyVGC
Copy link
Owner

GyulyVGC commented Oct 7, 2024

Thank you @erieflin for your feedback, really appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, request, or improvement
Projects
None yet
Development

No branches or pull requests

3 participants