使用python生成纯数字密码
相关代码如下:
#!-- coding=utf-8 --
import itertools as its
#引入迭代器的模块
words = "1234567890"
r = its.product(words, repeat=8)
dic = open("E:\pass.txt", "a")
for i in r:
空格空格dic.write("".join(i))
空格空格dic.write("".join("\n"))
dic.close()
#!-- coding=utf-8 -- import itertools as its #引入迭代器的模块 words = "1234567890" r = its.product(words, repeat=3) dic = open("pass.txt", "a") for i in r: 空格空格 dic.write("".join(i)) 空格空格 dic.write("".join("\n")) dic.close()
这里是使用迭代器生成纯数字8位密码,保存为txt文件,生成后应该是953mb