zxcvbn-python


Namezxcvbn-python JSON
Version 4.4.24 PyPI version JSON
download
home_pagehttps://github.com/dwolfhub/zxcvbn-python
Summary
upload_time2018-04-11 13:39:22
maintainer
docs_urlNone
authorDaniel Wolf
requires_python
licenseMIT
keywords zxcvbn password security
VCS
bugtrack_url
requirements pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            DEPRECATION WARNING
===================

This package has been moved! Please install using `pip install zxcvbn`.

https://pypi.python.org/pypi/zxcvbn


|Build Status|

zxcvbn-python
=============

A realistic password strength estimator.

This is a Python implementation of the library created by the team at Dropbox.
The original library, written for JavaScript, can be found
`here <https://github.com/dropbox/zxcvbn>`__.

While there may be other Python ports available, this one is the most up
to date and is recommended by the original developers of zxcvbn at this
time.


Features
--------
- **Tested in Python versions 2.6-2.7, 3.3-3.6**
- Accepts user data to be added to the dictionaries that are tested against (name, birthdate, etc)
- Gives a score to the password, from 0 (terrible) to 4 (great)
- Provides feedback on the password and ways to improve it
- Returns time estimates on how long it would take to guess the password in different situations

Installation
------------

Install the package using pip: ``pip install zxcvbn-python``

Usage
-----

Pass a password as the first parameter, and a list of user-provided
inputs as the ``user_inputs`` parameter (optional).

.. code:: python

    from zxcvbn import zxcvbn

    results = zxcvbn('JohnSmith123', user_inputs=['John', 'Smith'])

    print(results)

Output:

::

    {
        'password': 'JohnSmith123',
        'score': 2,
        'guesses': 2567800,
        'guesses_log10': 6.409561194521849,
        'calc_time': datetime.timedelta(0, 0, 5204)
        'feedback': {
            'warning': '',
            'suggestions': [
                'Add another word or two. Uncommon words are better.',
                "Capitalization doesn't help very much"
            ]
        },
        'crack_times_display': {
            'offline_fast_hashing_1e10_per_second': 'less than a second'
            'offline_slow_hashing_1e4_per_second': '4 minutes',
            'online_no_throttling_10_per_second': '3 days',
            'online_throttling_100_per_hour': '3 years',
        },
        'crack_times_seconds': {
            'offline_fast_hashing_1e10_per_second': 0.00025678,
            'offline_slow_hashing_1e4_per_second': 256.78
            'online_no_throttling_10_per_second': 256780.0,
            'online_throttling_100_per_hour': 92440800.0,
        },
        'sequence': [{
            'matched_word': 'john',
            'rank': 2,
            'pattern': 'dictionary',
            'reversed': False,
            'token': 'John',
            'l33t': False,
            'uppercase_variations': 2,
            'i': 0,
            'guesses': 50,
            'l33t_variations': 1,
            'dictionary_name': 'male_names',
            'base_guesses': 2,
            'guesses_log10': 1.6989700043360185,
            'j': 3
        }, {
            'matched_word': 'smith123',
            'rank': 12789,
            'pattern': 'dictionary',
            'reversed': False,
            'token': 'Smith123',
            'l33t': False,
            'uppercase_variations': 2,
            'i': 4,
            'guesses': 25578,
            'l33t_variations': 1,
            'dictionary_name': 'passwords',
            'base_guesses': 12789,
            'guesses_log10': 4.407866583030775,
            'j': 11
        }],
    }


Custom Ranked Dictionaries
--------------------------

In order to support more languages or just add password dictionaries of your own, there is a helper function you may use.

.. code:: python

    from zxcvbn.matching import add_frequency_lists

    add_frequency_lists({
        'my_list': ['foo', 'bar'],
        'another_list': ['baz']
    })

These lists will be added to the current ones, but you can also overwrite the current ones if you wish.
The lists you add should be in order of how common the word is used with the most common words appearing first.

CLI
~~~

You an also use zxcvbn from the command line::

    echo 'password' | zxcvbn --user-input <user-input> | jq

You can also execute the zxcvbn module::

    echo 'password' | python -m zxcvbn --user-input <user-input> | jq


Contribute
----------

- Report an Issue: https://github.com/dwolfhub/zxcvbn-python/issues
- Submit a Pull Request: https://github.com/dwolfhub/zxcvbn-python/pulls

License
-------

The project is licensed under the MIT license.


.. |Build Status| image:: https://travis-ci.org/dwolfhub/zxcvbn-python.svg?branch=master
   :target: https://travis-ci.org/dwolfhub/zxcvbn-python
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dwolfhub/zxcvbn-python",
    "name": "zxcvbn-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "zxcvbn,password,security",
    "author": "Daniel Wolf",
    "author_email": "danielrwolf5@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/63/9c/c3f90da63d6bd0e04948386bdf426212f1f8271d544615a5c8d0d03267ef/zxcvbn-python-4.4.24.tar.gz",
    "platform": "",
    "description": "DEPRECATION WARNING\n===================\n\nThis package has been moved! Please install using `pip install zxcvbn`.\n\nhttps://pypi.python.org/pypi/zxcvbn\n\n\n|Build Status|\n\nzxcvbn-python\n=============\n\nA realistic password strength estimator.\n\nThis is a Python implementation of the library created by the team at Dropbox.\nThe original library, written for JavaScript, can be found\n`here <https://github.com/dropbox/zxcvbn>`__.\n\nWhile there may be other Python ports available, this one is the most up\nto date and is recommended by the original developers of zxcvbn at this\ntime.\n\n\nFeatures\n--------\n- **Tested in Python versions 2.6-2.7, 3.3-3.6**\n- Accepts user data to be added to the dictionaries that are tested against (name, birthdate, etc)\n- Gives a score to the password, from 0 (terrible) to 4 (great)\n- Provides feedback on the password and ways to improve it\n- Returns time estimates on how long it would take to guess the password in different situations\n\nInstallation\n------------\n\nInstall the package using pip: ``pip install zxcvbn-python``\n\nUsage\n-----\n\nPass a password as the first parameter, and a list of user-provided\ninputs as the ``user_inputs`` parameter (optional).\n\n.. code:: python\n\n    from zxcvbn import zxcvbn\n\n    results = zxcvbn('JohnSmith123', user_inputs=['John', 'Smith'])\n\n    print(results)\n\nOutput:\n\n::\n\n    {\n        'password': 'JohnSmith123',\n        'score': 2,\n        'guesses': 2567800,\n        'guesses_log10': 6.409561194521849,\n        'calc_time': datetime.timedelta(0, 0, 5204)\n        'feedback': {\n            'warning': '',\n            'suggestions': [\n                'Add another word or two. Uncommon words are better.',\n                \"Capitalization doesn't help very much\"\n            ]\n        },\n        'crack_times_display': {\n            'offline_fast_hashing_1e10_per_second': 'less than a second'\n            'offline_slow_hashing_1e4_per_second': '4 minutes',\n            'online_no_throttling_10_per_second': '3 days',\n            'online_throttling_100_per_hour': '3 years',\n        },\n        'crack_times_seconds': {\n            'offline_fast_hashing_1e10_per_second': 0.00025678,\n            'offline_slow_hashing_1e4_per_second': 256.78\n            'online_no_throttling_10_per_second': 256780.0,\n            'online_throttling_100_per_hour': 92440800.0,\n        },\n        'sequence': [{\n            'matched_word': 'john',\n            'rank': 2,\n            'pattern': 'dictionary',\n            'reversed': False,\n            'token': 'John',\n            'l33t': False,\n            'uppercase_variations': 2,\n            'i': 0,\n            'guesses': 50,\n            'l33t_variations': 1,\n            'dictionary_name': 'male_names',\n            'base_guesses': 2,\n            'guesses_log10': 1.6989700043360185,\n            'j': 3\n        }, {\n            'matched_word': 'smith123',\n            'rank': 12789,\n            'pattern': 'dictionary',\n            'reversed': False,\n            'token': 'Smith123',\n            'l33t': False,\n            'uppercase_variations': 2,\n            'i': 4,\n            'guesses': 25578,\n            'l33t_variations': 1,\n            'dictionary_name': 'passwords',\n            'base_guesses': 12789,\n            'guesses_log10': 4.407866583030775,\n            'j': 11\n        }],\n    }\n\n\nCustom Ranked Dictionaries\n--------------------------\n\nIn order to support more languages or just add password dictionaries of your own, there is a helper function you may use.\n\n.. code:: python\n\n    from zxcvbn.matching import add_frequency_lists\n\n    add_frequency_lists({\n        'my_list': ['foo', 'bar'],\n        'another_list': ['baz']\n    })\n\nThese lists will be added to the current ones, but you can also overwrite the current ones if you wish.\nThe lists you add should be in order of how common the word is used with the most common words appearing first.\n\nCLI\n~~~\n\nYou an also use zxcvbn from the command line::\n\n    echo 'password' | zxcvbn --user-input <user-input> | jq\n\nYou can also execute the zxcvbn module::\n\n    echo 'password' | python -m zxcvbn --user-input <user-input> | jq\n\n\nContribute\n----------\n\n- Report an Issue: https://github.com/dwolfhub/zxcvbn-python/issues\n- Submit a Pull Request: https://github.com/dwolfhub/zxcvbn-python/pulls\n\nLicense\n-------\n\nThe project is licensed under the MIT license.\n\n\n.. |Build Status| image:: https://travis-ci.org/dwolfhub/zxcvbn-python.svg?branch=master\n   :target: https://travis-ci.org/dwolfhub/zxcvbn-python",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "4.4.24",
    "project_urls": {
        "Download": "https://github.com/dwolfhub/zxcvbn-python/tarball/v4.4.24",
        "Homepage": "https://github.com/dwolfhub/zxcvbn-python"
    },
    "split_keywords": [
        "zxcvbn",
        "password",
        "security"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "639cc3f90da63d6bd0e04948386bdf426212f1f8271d544615a5c8d0d03267ef",
                "md5": "a056d64bcd46f21b0ac945ac29f9f325",
                "sha256": "900b28cc5e96be4091d8778f19f222832890264e338765a1c1c09fca2db64b2d"
            },
            "downloads": -1,
            "filename": "zxcvbn-python-4.4.24.tar.gz",
            "has_sig": false,
            "md5_digest": "a056d64bcd46f21b0ac945ac29f9f325",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 408001,
            "upload_time": "2018-04-11T13:39:22",
            "upload_time_iso_8601": "2018-04-11T13:39:22.820584Z",
            "url": "https://files.pythonhosted.org/packages/63/9c/c3f90da63d6bd0e04948386bdf426212f1f8271d544615a5c8d0d03267ef/zxcvbn-python-4.4.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-04-11 13:39:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dwolfhub",
    "github_project": "zxcvbn-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "3.5.0"
                ]
            ]
        }
    ],
    "lcname": "zxcvbn-python"
}
        
Elapsed time: 0.07785s