-
Notifications
You must be signed in to change notification settings - Fork 13
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
filter network interfaces for arp scan #109
Conversation
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.
The PR looks good to me. Just a few thoughts:
- Should we sort the interfaces before filtering them to get predictable results? Or how is the order of
netifaces.interfaces()
defined? netifaces
not being maintained since 2021 could sooner or later become a problem. @rodja Do you know why RoSys has this dependency even though it isn't used other than in this PR? And is there an alternative to switch to? Or do we need to callnetifaces
on the command line and parse the result. I'd very much prefer a Python library...- Regarding your suggestion of an interface parameter, I'm not sure about the costs and benefits. If we don't need it at the moment, let's not add it. If we do need it, let's create a new branch/PR to find and discuss a possible implementation.
I think netifaces is just a relict. NiceGUI already uses ifaddr: https://github.com/zauberzeug/nicegui/blob/cf61dcb2191d55fbf38fb8d38fc7867a4801c07c/nicegui/welcome.py#L11 |
@falkoschindler regarding the sorting of the interfaces, ifaddr uses the order the operating system provides. I would keep it that way to have to same order as commands like |
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.
Nice! ifaddr seems to work very similar to netifaces. Great to have this dependency removed.
I think we can merge into main. 🙂
If no network interface is provided, arp-scan will use the first one that is up.
I had the problem where arp-scan tried to use a can-bus interface, so I wrote this function to filter out unwanted interfaces.
Which are loopback, docker interfaces, virtual interfaces and can.
Two possible issues here: