Skip to content

Instantly share code, notes, and snippets.

@RVDaescu
Last active May 12, 2017 09:31
Show Gist options
  • Save RVDaescu/1d5b2fa42f31fd86c427650cb74cedba to your computer and use it in GitHub Desktop.
Save RVDaescu/1d5b2fa42f31fd86c427650cb74cedba to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import random
def mac():
i=0
r=[]
while i<6:
s="".join([random.choice('0123456789ABCDE'),random.choice('0123456789ABCDE')])
r.append(s)
i+=1
r[0]="".join([random.choice('0123456789ABCDEF'),random.choice('0123456789ABC')])
r[1]="00" #not sure who's the vendor for this MAC
r[2]="01" #not sure who's the vendor for this MAC
return ":".join(r)
a=input("How many MACs do you need? \n >")
for b in range(a):
print mac()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment