Created
March 4, 2019 19:29
-
-
Save kecs/dfa4cc30e90161906aa7a12df96298a2 to your computer and use it in GitHub Desktop.
Password policy says eg. pass must contain 3 chr set from 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
rules = ( | |
re.compile('[a-z]'), | |
re.compile('[A-Z]'), | |
re.compile('[1-9]'), | |
re.compile('[\!\+\-\@\.]'), | |
) | |
with open('wordlists/rockyou.txt', 'r') as f: | |
for l in f: | |
pw = l[:-1] | |
if sum([r.search(pw) and 1 or 0 for r in rules]) > 2: | |
print pw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment