建立和搜索密码哈希数据库
passhashdb的Python项目详细描述
密码数据库
密码哈希数据库是一种有效的密码检查方法 根据密码(哈希)列表。在
这是专门为处理来自 Have I been Pwned: Pwned Passwords列表。在
设置
使用pip
安装此包:
$ sudo pip3 install passhashdb-x.x.x.tar.gz
下载latest password file, 并提取文本文件。在
将文本格式转换为二进制“passhashdb”格式。这需要一段时间!在
^{pr2}$我建议将文件“安装”到/usr/share
。在
与桑巴一起使用
这可以与Samba的^{
我建议您编写一个小的包装脚本:
/etc/samba/check_password.sh
#!/bin/shPASSDB="/usr/share/pwned-passwords-sha1-ordered-by-hash-v5.bin"LOGFILE="/var/log/samba/check-passhashdb.log"exec /usr/local/bin/samba-check-passhashdb $PASSDB2>> $LOGFILE
然后将其添加到/etc/samba/smb.conf
:
check password script = /etc/samba/check_password.sh
- 项目
标签: