Very different results from javascript.
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, python
- 领域
- security
调研方向
在 Python 和 JavaScript 实现中重现 FooBar2016 和 ZagDag2016 的报告结果,然后比较它们的 match_sequence 分类,尤其关注数字后缀的处理方式。跟踪两个实现在哪些地方出现分歧,并使 Python 结果与 JavaScript 的行为保持一致;当报告中的密码产生匹配的分数和熵时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
The python code produces very different (and worrisome) results when compared to the javascript version. I use the python code in my change app to verify the password passes muster prior to changing it, so if anything I'd want it to be more strict that the client side JS version.
Password: FooBar2016
JS: score: 0, entropy: 18.541
Python: score: 2, entropy: 30.089
Password: ZagDag2016
JS: score: 2, entropy: 32.783
Python: score: 4, entropy: 44.264
If I had to choose I'd pick the JS version, the python one looks way too lenient.
(full result for FooBar2016 below.
JS:
Calling zxcvbn
{ password: 'FooBar2016',
entropy: 18.541,
match_sequence:
[ { pattern: 'dictionary',
i: 0,
j: 5,
token: 'FooBar',
matched_word: 'foobar',
rank: 908,
dictionary_name: 'passwords',
reversed: false,
base_entropy: 9.826548487290916,
uppercase_entropy: 4.392317422778761,
reversed_entropy: 0,
l33t_entropy: 0,
entropy: 14.218865910069677 },
{ pattern: 'regex',
token: '2016',
i: 6,
j: 9,
regex_name: 'recent_year',
regex_match: [Object],
entropy: 4.321928094887363 } ],
crack_time: 19.068,
crack_time_display: '19.068000000000023 seconds',
score: 0,
calc_time: 8 }
Python:
python -c 'import zxcvbn; print zxcvbn.password_strength("FooBar2016")'
{'crack_time_display': '17.0 hours', 'crack_time': 57103.66, 'score': 2, 'entropy': 30.089, 'password': 'FooBar2016', 'calc_time': 0.0005788803100585938, 'match_sequence': [{'l33t_entropy': 0, 'dictionary_name': 'passwords', 'matched_word': 'foobar', 'bas
e_entropy': 9.826548487290916, 'i': 0, 'pattern': 'dictionary', 'j': 5, 'rank': 908, 'token': 'FooBar', 'entropy': 14.285980105928214, 'uppercase_entropy': 4.459431618637297}, {'i': 6, 'pattern': 'spatial', 'j': 8, 'shifted_count': 0, 'token': '201', 'ent
ropy': 9.848831558033764, 'graph': 'keypad', 'turns': 2}, {'i': 9, 'pattern': 'bruteforce', 'j': 9, 'token': '6', 'entropy': 5.954196310386876, 'cardinality': 62}]}
- 主要语言
- HTML
- 星标
- 259
- 派生
- 56
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dropbox/python-zxcvbn 的其他 Issue
-
CLAassistant未关闭
难度 4/5 3-5 天 新手友好度 20/100
dropbox/python-zxcvbn#22 ·
-
难度 2/5 1-3 小时 新手友好度 38/100
dropbox/python-zxcvbn#17 · 2 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 35/100
dropbox/python-zxcvbn#16 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
dropbox/python-zxcvbn#13 ·
-
难度 5/5 一周以上 新手友好度 20/100
dropbox/python-zxcvbn#6 · 4 条评论 ·
查看 dropbox/python-zxcvbn 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
from-review-extraction priority: low python security severity:nit
难度 1/5 1 小时以内 新手友好度 85/100
LearningCircuit/local-deep-research#6943 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
sgl-project/sglang#41482 ·
维护者通常 1 天内回复
-
blocklist addition
难度 2/5 1-3 小时 新手友好度 68/100
MetaMask/eth-phishing-detect#297745 ·
维护者通常 1 天内回复