LandGrey / pydictor

A powerful and useful hacker dictionary builder for a brute-force attack
https://github.com/LandGrey/pydictor
GNU General Public License v3.0
3.22k stars 630 forks source link

args.regex类型错误 #21

Closed Ovi3 closed 3 years ago

Ovi3 commented 3 years ago

执行 python3 pydictor.py -tool handler raw.txt --regex .*?\d+ 命令时得不到正确的结果,就pr一个: https://github.com/LandGrey/pydictor/pull/20。因为开发环境问题,.gitignore要做修改,还是直接提issue

这里https://github.com/LandGrey/pydictor/blob/master/lib/parse/command.py#L122解析regex参数,因为带有nargs=1,所以args.regex是list类型,它被赋值给了pyoptions.filter_regex。 pyoptions.filter_regex传给了regex_filter函数:https://github.com/LandGrey/pydictor/blob/master/lib/fun/filter.py#L245。该函数的regex参数需要str类型,不是list类型

LandGrey commented 3 years ago

确认是在某次 [较早的更新] (https://github.com/LandGrey/pydictor/commit/0c068abbada07d80d7ee1f743857206788e8b87c#diff-b35e0d845c4ccb8f58bac52a3b5fc7e6) 中写错又没有测试出该问题,已修复此 bug ,再次感谢。