生成随机熵密码的命令行工具实用程序

random-password-generator-cli的Python项目详细描述


随机密码生成器

versionpython required

什么是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

建议

  1. 使用rpg生成随机熵密码
  2. 避免使用短密码,尽量只使用16个以上字符的密码。
  3. 不要与任何人共享您的密码。
  4. 不要重复使用密码。

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

推荐PyPI第三方库


热门话题
找不到足够的连续内存会导致OOM吗?   java如何计算一个矩形可以放入另一个矩形的次数?   谷歌地图api java   java Autowired批注在AuthenticationSuccessHandler中返回null   Java电话号码格式正则表达式   eclipse我希望能够同时选择多个复选框?Java SWT   java j2objc可以用于生成不适用于iOS的目标C代码吗?   使用cUrl将PHP post数组转换为java servlet   java playpac4j和Play 2.5:@requireAuthentication注释导致stacktrace   java为什么在Javamail中连接超时?   java使用SwingUtilities。main方法中的invokeLater()   如何在名为from Unity的Java插件中创建Android处理程序