-
Notifications
You must be signed in to change notification settings - Fork 195
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
ksniff graceful shutdown on Ctrl+C + Wireshark doesn't close on exit #66
base: master
Are you sure you want to change the base?
ksniff graceful shutdown on Ctrl+C + Wireshark doesn't close on exit #66
Conversation
@eldadru Bump |
Hi @aviramha - sorry for the delay, had a rough time.. I'll review your code today, thank you so much for this contribution! |
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.
See my comments
Done! Check it out :) |
Thanks, did you push the new code? I don't see new commits |
… when exiting ksniff wireshark isn't closed
a7e93a1
to
8d8d5bc
Compare
It seems the windows build is broken
|
Should I create a _linux and _windows file for the specific procedure? (not sure what's the go approach here) |
Hi @aviramha, sorry again for the late response... In this case, I believe the cleaner approach is to extract the process execution code to its own struct and hide the "specific os code" there, the struct will expose a single call to execute the Wireshark command. WDYT? |
Sounds good, from what I understand specific OS code can be seperated only by files, so I assume that we'll have windows file and unix file? |
@aviramha any news about this PR? |
I don't think I'll get to it soon. Feel free to continue where I left it :) |
Hey @aviramha, your hard work so far is very much appreciated! I just wanted to check-in and see if you think you'd be able to continue work on this PR? |
I don't think so |
I can take this over, I spend a few mins each day killing off tcpdump binaries (let alone the ones I forget) so I may as well just spend an hour up front.
@bostrt you're saying the contents of the (o *Ksniff) Run() function ought to be hidden in a struct, yea? |
Thanks for the awesome plugin Eldad!
One annoying UX I had is if I close ksniff because I had enough traffic it also closes Wireshark.
I changed the flow so that Wireshark stays open and needed to add handling of Ctrl+C so it'll be a valid exit scenario.
This seems to fix a bug (#53 ) on capturing to a file, whereas I couldn't find a way to exit in a nice manner.
It's my first Go coding so feel free to fire away.