基于安全字表的密码短语生成器

pwgen-passphrase的Python项目详细描述


基于安全字表的密码短语生成器

说明

使用pwgen-passphrase从wordlist生成安全(但容易记住)的随机密码短语。 有关更多详细信息,请参见传奇xkcd: Password Strength连环画;-)

包含的单词列表是:

要求

  • Python 3
  • 可选:PyQt (用于将生成的密码短语复制到剪贴板)
  • 可选:regex (为了更好地过滤regex,例如^[\p{Ll}]+仅用于unicode小写字母)

用法

运行pwgen-passphrase--help查看所有可用选项。

示例:

[randall@xkcd.com ~] pwgen-passphrase -w cracklib-small -l 4 -t
correct horse battery staple

Statistics:
===========
Number of words in passphrase: 4
Wordlist length: 52875 words
Passphrase strength (entropy): 62.8 bits

Passphrase length: 28 chars
Length of equivalent case sensitive alphanumeric password: 11 chars
Length of equivalent all ASCII printable characters password: 10 chars

帮助

usage: pwgen-passphrase [-h] [-t] [-c] [-s SEPARATOR] [-n COUNT]
                        [-w {aspell-cs,aspell-en,bip0039,cracklib-small,diceware,eff-long,eff-short,eff-short2,skey} | -f WORDLIST_FILE]
                        [-l LENGTH | -b BITS] [-L | -U | -C] [--min MIN]
                        [--max MAX] [-r] [-e REGEX] [--version]

generate secure random passphrase from wordlist

optional arguments:
  -h, --help            show this help message and exit
  -t, --stats           show statistics about generated passphrase
  -c, --clipboard       copy generated passphrase to clipboard (needs PyQt)
  -s SEPARATOR, --separator SEPARATOR
                        words separator (default is space)
  -n COUNT, --count COUNT
                        generate multiple passphrases (default is 1)
  -w {aspell-cs,aspell-en,bip0039,cracklib-small,diceware,eff-long,eff-short,eff-short2,skey}, --wordlist {aspell-cs,aspell-en,bip0039,cracklib-small,diceware,eff-long,eff-short,eff-short2,skey}
                        select wordlist (default is eff-long)
  -f WORDLIST_FILE, --wordlist-file WORDLIST_FILE
                        path to external wordlist file
  -l LENGTH, --length LENGTH
                        length of generated passphrase (number of words,
                        default is 6)
  -b BITS, --bits BITS  minimal passphrase strength (bits of entropy)
  -L, --lower           make words lowercase
  -U, --upper           make words uppercase
  -C, --capitalize      make words capitalized
  --min MIN             limit minimum length of word (default is unlimited)
  --max MAX             limit maximum length of word (default is unlimited)
  -r, --transliterate   transliterate Unicode characters to ASCII and remove
                        duplicates
  -e REGEX, --regex REGEX
                        remove words that do not match regular expression
  --version             show program's version number and exit

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从ImageIO中排除特定的TIFF读取器?   JavaJMockit和passbyreference。我们中一定有一个人错了(可能是我!)   java Android camera2放弃了牛轧糖的表面,但在棉花糖上工作   java按字符串中出现的顺序对字符数组进行排序   如何获取Groovy生成的java源代码   java无法使用AutoIT和Selenium Webdriver在所需位置/文件夹保存图像   java为什么我的冒泡排序代码会打印出这些奇怪的东西?   java JAXB:typesafeEnumMemberName=“generateName”是否可自定义?   Java编程输入:今天是星期天输出:星期天是今天   java不理解首个OOAD书的吉他示例   java如何从JformattedTextfield检索货币格式值   java可以从相同的源代码生成功能不同的可执行文件吗?