生成随机熵密码的命令行工具实用程序
random-password-generator-cli的Python项目详细描述
随机密码生成器
什么是RPG?
r p g代表r和ompasswordg生成器,它是一个实用命令行工具,允许您生成随机的熵和安全密码。 默认情况下,rpg检查生成到Have I Been Pwned Passwords泄漏数据库的每个密码。
安装
pip3 install random-password-genrator-cli
用法
rpg [OPTIONS] <pass-length>
<pass-length>
这是您想要的密码长度,请注意它必须在12到90个字符之间
我们这样做是为了确保提供强密码。
在我们看来,你不应该使用低于16个字符的密码。
[OPTIONS]
是:
-n, --number <pass-number>
:生成<pass-number>
密码-o, --output <out-file>
:将生成的密码写入<out-file>
--exclude-charsets [l,u,d,p]
:删除l小写,u大写,digits或p非虚构字符集*--no-safe
:不要在Have I Been Pwned Passwords* 中检查密码的有效性
-v, --verbose
:打印详细输出-V, --version
:打印rpg版本-h, --help
:打印帮助文本
*:使用此选项将打印警告消息。然后将按照用户定义的方式执行。
示例
生成20个字符的密码:
$ rpg 20
Passwords:
y2-1Uf/XAR5K<2[2x~gb
The entropy of generated password is: 131.09177703355275
生成五个20个字符的密码
$ rpg -n 5 20
Generating passwords [####################################] 5/5
Passwords:
87VuRR4{O1?5=ngBzm(-
$.G9D-t7~8Y2M0mk>uZw
AL74H2tM-8a|0(D'z{gf
4[+WfS9\6u3FeP"Gzf%6
"Blox37j8`\^T3h2ALH)
The entropy of generated password is: 131.09177703355275
生成不带小写字符集的20个字符的密码:
$ rpg --exclude-charsets l 20
You are going to generate passwords without one or more of default charsets!
RPG cares a lot for your security, it's recommended to avoid this practice if possible!
Passwords:
>C1#8A`7D7V|]]95RB\7
The entropy of generated password is: 121.7492568250068
您可以在这里看到警告消息
生成五个20个字符的密码并将其保存到pw-out.txt中
$ rpg -n 5 -o pw_out.txt 20
Generating passwords [####################################] 5/5
pw-out.txt
$ cat pw_out.txt
Passwords:
8YvW(8m5Gy'\i1G_U!2e
l64@%`V27kOE^rCyG2o]
El_0@19$#reG2ncLK^O4
WAAP;7`8=f{3gy4He8x&
4Y<zl2-4Xi*e*X11(VTz
Entropy: 131.09177703355275
Password strength is determined with this chart:
< 28 bits = Very Weak; might keep out family members
28 - 35 bits = Weak; should keep out most people, often good for desktop login passwords
36 - 59 bits = Reasonable; fairly secure passwords for network and company passwords
60 - 127 bits = Strong; can be good for guarding financial information
128+ bits = Very Strong; often overkill
建议
- 使用rpg生成随机熵密码
- 避免使用短密码,尽量只使用16个以上字符的密码。
- 不要与任何人共享您的密码。
- 不要重复使用密码。