python生成随机mac地址
#!/usr/bin/python import random def randomMAC(): mac = [ 0x52, 0x54, 0x00, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff) ] return ':'.join(map(lambda x: "%02x" % x, mac)) print randomMAC()
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/8389.html