生成随机MAC地址
import random
Maclist = []
for i in range(1,7):
RANDSTR = "".join(random.sample("0123456789abcdef",2))
Maclist.append(RANDSTR)
RANDMAC = ":".join(Maclist)
print RANDMAC
--------------------------------运行结果-----------------------------------
e4:13:0e:1a:73:f5
Maclist = []
for i in range(1,7):
RANDSTR = "".join(random.sample("0123456789abcdef",2))
Maclist.append(RANDSTR)
RANDMAC = ":".join(Maclist)
print RANDMAC
--------------------------------运行结果-----------------------------------
e4:13:0e:1a:73:f5
没有找到相关结果
已邀请:
0 个回复