Skip to content

Instantly share code, notes, and snippets.

View sdeibel's full-sized avatar

Stephan Deibel sdeibel

View GitHub Profile
#!/usr/bin/python
# Based on https://gist.github.com/provegard/1536682, which was
# Based on getifaddrs.py from pydlnadms [http://code.google.com/p/pydlnadms/].
# Only tested on Linux and OS X!
import sys
from socket import AF_INET, AF_INET6, inet_ntop
from ctypes import (
Structure, Union, POINTER,