python生成WiFi密码本

coding:utf-8

import itertools as its

迭代器

words = “wl1234567890”

生成密码本的位数,五位数,repeat=5

r = its.product(words, repeat=8)

保存在文件中,追加

dic = open(“C:/Users/Administrator/Desktop/password.txt”, “a”)
#‪C:\Users\Administrator\Desktop\password.txt

i是元组

for i in r:
# jion空格链接

dic.write("".join(i))

dic.write("".join("\n"))

print(i)

dic.close()

print(“密码本已生成”)

你可能感兴趣的:(python,测试,自动化)