开发者

checking if password contains dictionary words

开发者 https://www.devze.com 2023-04-02 06:46 出处:网络
I have to check whether a random password i generated contains any dictionary words. For this I am using grep into /usr/share/dict/words

I have to check whether a random password i generated contains any dictionary words. For this I am using grep into /usr/share/dict/words

How Can I开发者_运维技巧 use grep so as to return me all matches for not only entire expression but also any part of the expression.

example:

grep "foobar" foo

where foo contains text foo should give me a match


echo foo | grep -c --file=/usr/share/dict/words

would yield 1 when there is a match and 0 when there isn't.

0

精彩评论

暂无评论...
验证码 换一张
取 消