内容来自: 10 Ways to Generate a Random Password from the Linux Command Line Linux 好玩的事儿是达成一件事情可以用上百种方式. 即使如生成随机密码这么简单的需求都可以用一打的命令来实现. 这些命令从 Command-Line Fu 搜集而来, 而且都在 Linux 上验证了这些命令没有问题. 生成密码 对于这些生成随机数的命令, 可以调整以输出不同长度的密码. 当然, 你可以使用第一个 x 符号来生成密码, 如果你不需要这么
import itertools as its words = 'abcdefghijklmnopqrstuvwxyz1234567890' r = its.product(words, repeat=4) # repeat 要生成多少位的字典 dic = open("pass.txt", "a") for i in r: dic.write("".join(i)) dic.write("".join("\r&quo
import java.util.Date; import java.util.Random; public class PasswordUtil { public final static String[] word = { "a", "b", "c", "d", "e", "f", "g", "h", "j", "