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

Enumerate network interfaces #3

Closed
samatt opened this issue Sep 4, 2018 · 2 comments
Closed

Enumerate network interfaces #3

samatt opened this issue Sep 4, 2018 · 2 comments
Assignees

Comments

@samatt
Copy link
Collaborator

samatt commented Sep 4, 2018

If this is going to work well we will need to be have clarity on what network interface we are sniffing on.
The names change depending on OS and sometimes hardware. Things that will helkp in the long term

  1. Being able to list all network interface
  2. Determining what the active network interface (does scapy tell you that?)
  3. Getting all the info for the active interface this could include
  • Gateway IP
  • Subnet
  • Proxy Info if any

Having this information available will help in the future

@kaganjd
Copy link
Owner

kaganjd commented Sep 9, 2018

Writing notes for myself so I don't forget!

On Mac, it looks like it uses ifconfig and netstat. To access ifconfig function: from scapy.arch.unix import _guess_iface_name (kinda useless because it requires an argument to guess against). To access netstat function: from scapy.arch.unix import read_routes

There's also a value called conf.iface which is available wherever... probably the output of _guess_iface_name and similar functions for Windows, Linux architectures.

@kaganjd
Copy link
Owner

kaganjd commented Jun 28, 2019

closing since I think this is covered by the getNetworkInfo method

@kaganjd kaganjd closed this as completed Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants