Last active
May 12, 2017 09:31
-
-
Save RVDaescu/1d5b2fa42f31fd86c427650cb74cedba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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