Skip to content

Instantly share code, notes, and snippets.

@mrhillsman
Created September 5, 2015 12:33
Show Gist options
  • Save mrhillsman/3a833e86e78d02ef68cc to your computer and use it in GitHub Desktop.
Save mrhillsman/3a833e86e78d02ef68cc to your computer and use it in GitHub Desktop.
Shell one-liner using python to generate a random MAC address.
python -c "import random; mac = [random.choice(range(256)) for i in range(6)]; mac[0] |= 0x02; mac[0] &= 0xfe; print ':'.join('%02x' % m for m in mac)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment