Created
September 6, 2018 11:11
-
-
Save kecs/f998e2058914511f0a381faf19e27924 to your computer and use it in GitHub Desktop.
You have a password policy with special chars, you have rate limit, you want to know the most common special chars in passwords.
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 | |
from collections import defaultdict | |
d = defaultdict(int) | |
with open('/usr/share/wordlists/rockyou.txt', 'r') as f: | |
for l in f: | |
for c in re.findall('\W', l[:-1]): | |
d[c] += 1 | |
print sorted(d.items(), key=lambda t: t[1], reverse=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment