Skip to content

Instantly share code, notes, and snippets.

@salexkidd
Created May 11, 2013 04:23
Show Gist options
  • Save salexkidd/5558885 to your computer and use it in GitHub Desktop.
Save salexkidd/5558885 to your computer and use it in GitHub Desktop.
Random MAC ADDR Generator
def make_mac_addr():
def random_hexer_gen():
""" random hex num """
while True:
yield "{:02x}".format(randint(0x00, 0xFF)).upper()
g = random_hexer_gen()
return ":".join([g.next() for i in range(0, 6)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment