Skip to content

Instantly share code, notes, and snippets.

View deferraz's full-sized avatar
:octocat:

Andre Ferraz deferraz

:octocat:
View GitHub Profile
# Use those functions to enumerate all interfaces available on the system using Python.
# found on <http://code.activestate.com/recipes/439093/#c1>
import socket
import fcntl
import struct
import array
def all_interfaces():
max_possible = 128 # arbitrary. raise if needed.