--通过python脚本生成随机密码并存储到文件中。
--随机生成16位密码
import random
user=input("请输入用户名称(回车确认):")
pool = "1234567890abcdefghijklmnopqrstuvwxyzQWERTYUIOPASDFGHJKLZXCVBNM!@#¥%&*()"
length = len(pool)
passwd = ""
for i in range(16):
c = random.randint(0,length)
passwd=passwd+pool[c:c+1]
print(passwd)
result="{} // {}".format(user,passwd)
file = open("D:\PASSWD.txt", "a")
file.write(result)
file.write('\r\n')
file.close