Python: Combine NetIfaces, Scapy and IPAddress to find local connected network
You got the task to generate a list of IP-Networks connected to LAN „VirtualBox Host-Only Network“. There might be more than one IP-Network. Use Scapy to crawl through all Interfaces and get the human-readable interface name [only required for windows users]. Use NetIfaces to get a list of IP-Addresses connected to this interface. Use IPAddress to calculate the IP-Network(s) directly connected. In my case, only one subnet is directly connected: 192.168.56.0/24Read More →