import random
#
global mac1
def randomMAC():
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
return ':'.join(map(lambda x: "%02x" % x, mac))
#
print randomMAC()
for x in range(1,11):
mac1 = randomMAC()
print mac1
I got the following random mac generator script from the net (simple
google search)
i want to use random mac in one of mine script.What i need is
mac1=randomMAC() should give mac value to mac1 that i use in a
function and this runs in a loop.
--
https://mail.python.org/mailman/listinfo/python-list