Skip to content

Instantly share code, notes, and snippets.

@risha700
Last active August 1, 2019 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save risha700/adbc3935975f815bcb2d89177ef685e4 to your computer and use it in GitHub Desktop.
Save risha700/adbc3935975f815bcb2d89177ef685e4 to your computer and use it in GitHub Desktop.

get machine address python

pip install netifaces

netifaces.ifaddresses(netifaces.gateways()['default'][netifaces.AF_INET][1])[netifaces.AF_LINK][0]['addr']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment