File: __init__.py

package info (click to toggle)
python-zxcvbn 1.0%2Bgit20130503.bc1c2d-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,524 kB
  • ctags: 100
  • sloc: python: 935; makefile: 16
file content (18 lines) | stat: -rw-r--r-- 452 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from zxcvbn import main

__all__ = ['password_strength']

password_strength = main.password_strength


if __name__ == '__main__':
    import fileinput
    ignored = ('match_sequence', 'password')

    for line in fileinput.input():
        pw = line.strip()
        print "Password: " + pw
        out = password_strength(pw)
        for key, value in out.iteritems():
            if key not in ignored:
                print "\t%s: %s" % (key, value)