[Python-modules-commits] [python-zxcvbn] 01/08: update package to new upstream version

Sabino Par sprab-guest at moszumanska.debian.org
Sat May 6 17:48:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

sprab-guest pushed a commit to branch master
in repository python-zxcvbn.

commit 65544f21406d7449ae3738c6ec9c78a24064df32
Author: sab <sprab at onenetbeyond.org>
Date:   Wed Apr 19 21:33:11 2017 +0200

    update package to new upstream version
---
 PKG-INFO                                           |  12 +
 README                                             |  72 ---
 README.rst                                         | 138 +++++
 debian/NEWS.Debian                                 |  10 +
 debian/changelog                                   |  20 +-
 debian/compat                                      |   2 +-
 debian/control                                     |  47 +-
 debian/copyright                                   | 355 +----------
 debian/docs                                        |   2 +-
 debian/files                                       |   3 +
 debian/python-zxcvbn/DEBIAN/control                |  18 +
 debian/python-zxcvbn/DEBIAN/md5sums                |  11 +
 debian/python-zxcvbn/DEBIAN/postinst               |   9 +
 debian/python-zxcvbn/DEBIAN/prerm                  |  14 +
 .../lib/python2.7/dist-packages/zxcvbn/__init__.py |  26 +
 .../dist-packages/zxcvbn/adjacency_graphs.py       |   7 +
 .../lib/python2.7/dist-packages/zxcvbn/feedback.py | 135 +++++
 .../dist-packages/zxcvbn/frequency_lists.py        |   9 +
 .../lib/python2.7/dist-packages/zxcvbn/matching.py | 670 +++++++++++++++++++++
 .../lib/python2.7/dist-packages/zxcvbn/scoring.py  | 418 +++++++++++++
 .../dist-packages/zxcvbn/time_estimates.py         |  77 +++
 .../dist-packages/zxcvbn_python-4.4.14.egg-info    |  12 +
 .../usr/share/doc/python-zxcvbn/README.rst.gz      | Bin 0 -> 1631 bytes
 .../share/doc/python-zxcvbn/changelog.Debian.gz    | Bin 0 -> 584 bytes
 .../usr/share/doc/python-zxcvbn/copyright          |  33 +
 debian/python3-zxcvbn/DEBIAN/control               |  19 +
 debian/python3-zxcvbn/DEBIAN/md5sums               |  10 +
 debian/python3-zxcvbn/DEBIAN/postinst              |   9 +
 debian/python3-zxcvbn/DEBIAN/prerm                 |  12 +
 .../lib/python3/dist-packages/zxcvbn/__init__.py   |  26 +
 .../dist-packages/zxcvbn/adjacency_graphs.py       |   7 +
 .../lib/python3/dist-packages/zxcvbn/feedback.py   | 135 +++++
 .../dist-packages/zxcvbn/frequency_lists.py        |   9 +
 .../lib/python3/dist-packages/zxcvbn/matching.py   | 670 +++++++++++++++++++++
 .../lib/python3/dist-packages/zxcvbn/scoring.py    | 418 +++++++++++++
 .../python3/dist-packages/zxcvbn/time_estimates.py |  77 +++
 .../dist-packages/zxcvbn_python-4.4.14.egg-info    |  12 +
 .../share/doc/python3-zxcvbn/changelog.Debian.gz   | Bin 0 -> 584 bytes
 .../usr/share/doc/python3-zxcvbn/copyright         |  33 +
 debian/rules                                       |  23 +-
 debian/source/options                              |   1 +
 debian/watch                                       |   8 +-
 setup.py                                           |  22 +-
 tests.txt                                          |  34 --
 zxcvbn/__init__.py                                 |  34 +-
 zxcvbn/adjacency_graphs.py                         |   7 +
 zxcvbn/scoring.py                                  | 613 ++++++++++---------
 zxcvbn/scripts/build_frequency_lists.py            | 188 ------
 zxcvbn/scripts/build_keyboard_adjacency_graph.py   |  92 ---
 zxcvbn/time_estimates.py                           |  77 +++
 50 files changed, 3568 insertions(+), 1068 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..17f9b06
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,12 @@
+Metadata-Version: 1.1
+Name: zxcvbn-python
+Version: 4.4.14
+Summary: Python implementation of Dropbox's realistic password strength estimator, zxcvbn
+Home-page: https://github.com/dwolfhub/zxcvbn-python
+Author: Daniel Wolf
+Author-email: danielrwolf5 at gmail.com
+License: MIT
+Download-URL: https://github.com/dwolfhub/zxcvbn-python/tarball/v4.4.14
+Description: Realistic password strength estimator
+Keywords: zxcvbn,password,security
+Platform: UNKNOWN
diff --git a/README b/README
deleted file mode 100644
index 0bf744d..0000000
--- a/README
+++ /dev/null
@@ -1,72 +0,0 @@
-This is a python port of zxcvbn, which is a JavaScript password strength
-generator. zxcvbn attempts to give sound password advice through pattern
-matching and conservative entropy calculations. It finds 10k common passwords,
-common American names and surnames, common English words, and common patterns
-like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.
-
-Please refer to http://tech.dropbox.com/?p=165 for the full details and
-motivation behind zxcbvn. The source code for the original JavaScript (well,
-actually CoffeeScript) implementation can be found at:
-
-https://github.com/lowe/zxcvbn
-
-
-For full motivation, see:
-
-http://tech.dropbox.com/?p=165
-
-------------------------------------------------------------------------
-Use
-------------------------------------------------------------------------
-
-The zxcvbn module exports the password_strength() function. Import zxcvbn, and
-call password_strength(password, user_inputs=[]).  The function will return a
-result dictionary with the following keys:
-
-entropy            # bits
-
-crack_time         # estimation of actual crack time, in seconds.
-
-crack_time_display # same crack time, as a friendlier string:
-                   # "instant", "6 minutes", "centuries", etc.
-
-score              # [0,1,2,3,4] if crack time is less than
-                   # [10**2, 10**4, 10**6, 10**8, Infinity].
-                   # (useful for implementing a strength bar.)
-
-match_sequence     # the list of patterns that zxcvbn based the
-                   # entropy calculation on.
-
-calculation_time   # how long it took to calculate an answer,
-                   # in milliseconds. usually only a few ms.
-
-The optional user_inputs argument is an array of strings that zxcvbn
-will add to its internal dictionary. This can be whatever list of
-strings you like, but is meant for user inputs from other fields of the
-form, like name and email. That way a password that includes the user's
-personal info can be heavily penalized. This list is also good for
-site-specific vocabulary.
-
-Bug reports and pull requests welcome!
-
-------------------------------------------------------------------------
-Acknowledgments
-------------------------------------------------------------------------
-
-Dropbox, thank you again for supporting independent projects both inside and
-outside of hackweek.
-
-Thanks to Dan Wheeler (https://github.com/lowe) for the CoffeeScript implementation
-(see above.) To repeat his outside acknowledgements (which remain useful, as always):
-
-Many thanks to Mark Burnett for releasing his 10k top passwords list:
-http://xato.net/passwords/more-top-worst-passwords
-and for his 2006 book,
-"Perfect Passwords: Selection, Protection, Authentication"
-
-Huge thanks to Wiktionary contributors for building a frequency list
-of English as used in television and movies:
-http://en.wiktionary.org/wiki/Wiktionary:Frequency_lists
-
-Last but not least, big thanks to xkcd :)
-https://xkcd.com/936/
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..fc92a0c
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,138 @@
+|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.
+
+
+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
diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
new file mode 100644
index 0000000..1040dfe
--- /dev/null
+++ b/debian/NEWS.Debian
@@ -0,0 +1,10 @@
+python-zxcvbn (4.4.14-0.1) experimental; urgency=low
+
+  The main method of this Python module
+  has changed in version 4.4.14 from
+  password_strength(password, user_inputs=[])
+  to zxcvbn(password, user_inputs=[]), please
+  refer to upstream documentation or README.rst file
+  for more information
+
+  -- Sabino Par <sprab at onenetbeyond.org>  Sat, 25 Mar 2017 15:30:28 +0100
diff --git a/debian/changelog b/debian/changelog
index 59ec73d..ba3cafb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,23 @@
-python-zxcvbn (1.0+git20130503.bc1c2d-2) UNRELEASED; urgency=medium
+python-zxcvbn (4.4.14-0.1) experimental; urgency=low
 
-  * Fixed VCS URL (https)
+  [Sabino Par]
+  * New maintainer (Closes: #855638)
+    - Thanks Riley for your work!
+  * Fixed change upstream source to the active fork (Closes: #850910)
+    - Update to new source code fork 4.4.14 release
+    - update copyright file for new release and remove CC-BY-SA-3.0
+      and public-domain references
+  * Added new Python3 package port
+  * Update to new compat level 10
+  * Update watch file to point to new package location
+  * Switch packaging to pybuild
+  * Update standard version to 3.9.8, no changes required
 
- -- Ondřej Nový <novy at ondrej.org>  Tue, 29 Mar 2016 22:28:30 +0200
+  [Ondřej Nový]
+  * Fixed VCS URL (https)
 
+ -- Sabino Par <sprab at onenetbeyond.org>  Sat, 25 Mar 2017 15:30:28 +0100
+  
 python-zxcvbn (1.0+git20130503.bc1c2d-1) unstable; urgency=low
 
   * Initial release (Closes: #707786)
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 1a63099..f55cea2 100644
--- a/debian/control
+++ b/debian/control
@@ -1,27 +1,40 @@
 Source: python-zxcvbn
 Section: python
 Priority: optional
-Maintainer: Riley Baird <BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4XiX at bitmessage.ch>
+Maintainer: Sabino Par <sprab at onenetbeyond.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 9), dh-python, python-all
-Standards-Version: 3.9.6
-Homepage: https://github.com/dropbox/python-zxcvbn/tree/master/zxcvbn
+Build-Depends: debhelper (>= 10), dh-python, python-all, python-setuptools, python3-all, python3-setuptools
+Standards-Version: 3.9.8
+Homepage: https://github.com/dwolfhub/zxcvbn-python/tree/master
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.3
 Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/python-zxcvbn.git
-Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/python-zxcvbn.git
+Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/python-zxcvbn.git/
+#Testsuite: autopkgtest-pkg-python
 
 Package: python-zxcvbn
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, python-pkg-resources
-Description: Password strength calculator
- python-zxcvbn contains the function password_strength(), which
- when used is able to determine the estimated time it would take
- to crack a password. Using those results, a strength score can
- be calculated.
+Depends: ${python:Depends}, ${misc:Depends}
+Description: Realistic password strength estimator. Python2 module
+ This is a Python implementation of the library created by the
+ team at Dropbox. Accepts user data to be added to the dictionaries
+ that are tested against, gives a score to the password, 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
  .
- In determining these results, python-zxcvbn makes use of common
- passwords, common American names and surnames, common English
- words, and common patterns like dates, repeats (aaa), sequences
- (abcd), and QWERTY patterns.
+ This package provides the Python 2 library.
+
+Package: python3-zxcvbn
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}
+Description: Realistic password strength estimator. Python3 module
+ This is a Python implementation of the library created by the
+ team at Dropbox. Accepts user data to be added to the dictionaries
+ that are tested against, gives a score to the password, 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
  .
- python-zxcvbn is a Python 2 port of the coffeescript zxcvbn,
- which is used on the website of Dropbox.
\ No newline at end of file
+ This package provides the Python 3 library.
+
diff --git a/debian/copyright b/debian/copyright
index f3a4835..015dd1c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,351 +1,17 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: python-zxcvbn
-Source: https://github.com/dropbox/python-zxcvbn
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: zxcvbn-python
+Source: https://github.com/dwolfhub/zxcvbn-python
 
 Files: *
-Copyright: 2012, 2013 Dropbox, Inc.
+Copyright: 2012-2013 Dropbox, Inc.
+           2016 Daniel Wolf
 License: MIT
 
 Files: debian/*
-Copyright: 2015 Riley Baird <BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4XiX at bitmessage.ch>
+Copyright: 2015-2016 Riley Baird <BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4XiX at bitmessage.ch>
+           2017 Sabino Par <sprab at onenetbeyond.org>
 License: MIT
 
-Files: zxcvbn/data/common_passwords.txt
-Copyright: 2011 Mark Burnett
-License: CC-BY-SA-3.0
-Comment: https://xato.net/passwords/more-top-worst-passwords/
-
-Files: zxcvbn/data/tv_and_movie_freqlist*
-Copyright: 2006 Wiktionary Contributors
-License: CC-BY-SA-3.0
-Comment: https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists#TV_and_movie_scripts
-
-Files: zxcvbn/data/us_census*
-Copyright: 2000 U.S. Census Bureau
-License: public-domain
-
-License: CC-BY-SA-3.0
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL
- SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT
- RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS"
- BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION
- PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. 
- .
- License
- .
- THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
- COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
- COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
- AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
- .
- BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO
- BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE
- CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED
- HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
- .
- 1. Definitions
-    "Adaptation" means a work based upon the Work, or upon the Work and
-    other pre-existing works, such as a translation, adaptation, derivative
-    work, arrangement of music or other alterations of a literary or
-    artistic work, or phonogram or performance and includes cinematographic
-    adaptations or any other form in which the Work may be recast,
-    transformed, or adapted including in any form recognizably derived from
-    the original, except that a work that constitutes a Collection will not
-    be considered an Adaptation for the purpose of this License. For the
-    avoidance of doubt, where the Work is a musical work, performance or
-    phonogram, the synchronization of the Work in timed-relation with a
-    moving image ("synching") will be considered an Adaptation for the
-    purpose of this License.
-    "Collection" means a collection of literary or artistic works, such as
-    encyclopedias and anthologies, or performances, phonograms or
-    broadcasts, or other works or subject matter other than works listed in
-    Section 1(f) below, which, by reason of the selection and arrangement of
-    their contents, constitute intellectual creations, in which the Work is
-    included in its entirety in unmodified form along with one or more other
-    contributions, each constituting separate and independent works in
-    themselves, which together are assembled into a collective whole. A work
-    that constitutes a Collection will not be considered an Adaptation (as
-    defined below) for the purposes of this License.
-    "Creative Commons Compatible License" means a license that is listed at
-    http://creativecommons.org/compatiblelicenses that has been approved by
-    Creative Commons as being essentially equivalent to this License,
-    including, at a minimum, because that license: (i) contains terms that
-    have the same purpose, meaning and effect as the License Elements of
-    this License; and, (ii) explicitly permits the relicensing of
-    adaptations of works made available under that license under this
-    License or a Creative Commons jurisdiction license with the same License
-    Elements as this License.
-    "Distribute" means to make available to the public the original and
-    copies of the Work or Adaptation, as appropriate, through sale or other
-    transfer of ownership.
-    "License Elements" means the following high-level license attributes as
-    selected by Licensor and indicated in the title of this License:
-    Attribution, ShareAlike.
-    "Licensor" means the individual, individuals, entity or entities that
-    offer(s) the Work under the terms of this License.
-    "Original Author" means, in the case of a literary or artistic work, the
-    individual, individuals, entity or entities who created the Work or if
-    no individual or entity can be identified, the publisher; and in
-    addition (i) in the case of a performance the actors, singers,
-    musicians, dancers, and other persons who act, sing, deliver, declaim,
-    play in, interpret or otherwise perform literary or artistic works or
-    expressions of folklore; (ii) in the case of a phonogram the producer
-    being the person or legal entity who first fixes the sounds of a
-    performance or other sounds; and, (iii) in the case of broadcasts, the
-    organization that transmits the broadcast.
-    "Work" means the literary and/or artistic work offered under the terms
-    of this License including without limitation any production in the
-    literary, scientific and artistic domain, whatever may be the mode or
-    form of its expression including digital form, such as a book, pamphlet
-    and other writing; a lecture, address, sermon or other work of the same
-    nature; a dramatic or dramatico-musical work; a choreographic work or
-    entertainment in dumb show; a musical composition with or without words;
-    a cinematographic work to which are assimilated works expressed by a
-    process analogous to cinematography; a work of drawing, painting,
-    architecture, sculpture, engraving or lithography; a photographic work
-    to which are assimilated works expressed by a process analogous to
-    photography; a work of applied art; an illustration, map, plan, sketch
-    or three-dimensional work relative to geography, topography,
-    architecture or science; a performance; a broadcast; a phonogram; a
-    compilation of data to the extent it is protected as a copyrightable
-    work; or a work performed by a variety or circus performer to the extent
-    it is not otherwise considered a literary or artistic work.
-    "You" means an individual or entity exercising rights under this License
-    who has not previously violated the terms of this License with respect
-    to the Work, or who has received express permission from the Licensor to
-    exercise rights under this License despite a previous violation.
-    "Publicly Perform" means to perform public recitations of the Work and
-    to communicate to the public those public recitations, by any means or
-    process, including by wire or wireless means or public digital
-    performances; to make available to the public Works in such a way that
-    members of the public may access these Works from a place and at a place
-    individually chosen by them; to perform the Work to the public by any
-    means or process and the communication to the public of the performances
-    of the Work, including by public digital performance; to broadcast and
-    rebroadcast the Work by any means including signs, sounds or images.
-    "Reproduce" means to make copies of the Work by any means including
-    without limitation by sound or visual recordings and the right of
-    fixation and reproducing fixations of the Work, including storage of a
-    protected performance or phonogram in digital form or other electronic
-    medium.
- .
- 2. Fair Dealing Rights. Nothing in this License is intended to reduce,
- limit, or restrict any uses free from copyright or rights arising from
- limitations or exceptions that are provided for in connection with the
- copyright protection under copyright law or other applicable laws.
- .
- 3. License Grant. Subject to the terms and conditions of this License,
- Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
- perpetual (for the duration of the applicable copyright) license to
- exercise the rights in the Work as stated below:
- .
-    to Reproduce the Work, to incorporate the Work into one or more
-    Collections, and to Reproduce the Work as incorporated in the
-    Collections;
-    to create and Reproduce Adaptations provided that any such Adaptation,
-    including any translation in any medium, takes reasonable steps to
-    clearly label, demarcate or otherwise identify that changes were made to
-    the original Work. For example, a translation could be marked "The
-    original work was translated from English to Spanish," or a modification
-    could indicate "The original work has been modified.";
-    to Distribute and Publicly Perform the Work including as incorporated in
-    Collections; and,
-    to Distribute and Publicly Perform Adaptations.
- .
-    For the avoidance of doubt:
-	Non-waivable Compulsory License Schemes. In those jurisdictions in
-	which the right to collect royalties through any statutory or
-	compulsory licensing scheme cannot be waived, the Licensor reserves
-	the exclusive right to collect such royalties for any exercise by
-	You of the rights granted under this License;
-	Waivable Compulsory License Schemes. In those jurisdictions in which
-	the right to collect royalties through any statutory or compulsory
-	licensing scheme can be waived, the Licensor waives the exclusive
-	right to collect such royalties for any exercise by You of the
-	rights granted under this License; and,
-	Voluntary License Schemes. The Licensor waives the right to collect
-	royalties, whether individually or, in the event that the Licensor
-	is a member of a collecting society that administers voluntary
-	licensing schemes, via that society, from any exercise by You of the
-	rights granted under this License.
- .
- The above rights may be exercised in all media and formats whether now
- known or hereafter devised. The above rights include the right to make such
- modifications as are technically necessary to exercise the rights in other
- media and formats. Subject to Section 8(f), all rights not expressly
- granted by Licensor are hereby reserved.
- .
- 4. Restrictions. The license granted in Section 3 above is expressly made
- subject to and limited by the following restrictions:
- .
-    You may Distribute or Publicly Perform the Work only under the terms of
-    this License. You must include a copy of, or the Uniform Resource
-    Identifier (URI) for, this License with every copy of the Work You
-    Distribute or Publicly Perform. You may not offer or impose any terms on
-    the Work that restrict the terms of this License or the ability of the
-    recipient of the Work to exercise the rights granted to that recipient
-    under the terms of the License. You may not sublicense the Work. You
-    must keep intact all notices that refer to this License and to the
-    disclaimer of warranties with every copy of the Work You Distribute or
-    Publicly Perform. When You Distribute or Publicly Perform the Work, You
-    may not impose any effective technological measures on the Work that
-    restrict the ability of a recipient of the Work from You to exercise the
-    rights granted to that recipient under the terms of the License. This
-    Section 4(a) applies to the Work as incorporated in a Collection, but
-    this does not require the Collection apart from the Work itself to be
-    made subject to the terms of this License. If You create a Collection,
-    upon notice from any Licensor You must, to the extent practicable,
-    remove from the Collection any credit as required by Section 4(c), as
-    requested. If You create an Adaptation, upon notice from any Licensor
-    You must, to the extent practicable, remove from the Adaptation any
-    credit as required by Section 4(c), as requested.
-    You may Distribute or Publicly Perform an Adaptation only under the
-    terms of: (i) this License; (ii) a later version of this License with
-    the same License Elements as this License; (iii) a Creative Commons
-    jurisdiction license (either this or a later license version) that
-    contains the same License Elements as this License (e.g.,
-    Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible
-    License. If you license the Adaptation under one of the licenses
-    mentioned in (iv), you must comply with the terms of that license. If
-    you license the Adaptation under the terms of any of the licenses
-    mentioned in (i), (ii) or (iii) (the "Applicable License"), you must
-    comply with the terms of the Applicable License generally and the
-    following provisions: (I) You must include a copy of, or the URI for,
-    the Applicable License with every copy of each Adaptation You Distribute
-    or Publicly Perform; (II) You may not offer or impose any terms on the
-    Adaptation that restrict the terms of the Applicable License or the
-    ability of the recipient of the Adaptation to exercise the rights
-    granted to that recipient under the terms of the Applicable License;
-    (III) You must keep intact all notices that refer to the Applicable
-    License and to the disclaimer of warranties with every copy of the Work
-    as included in the Adaptation You Distribute or Publicly Perform; (IV)
-    when You Distribute or Publicly Perform the Adaptation, You may not
-    impose any effective technological measures on the Adaptation that
-    restrict the ability of a recipient of the Adaptation from You to
-    exercise the rights granted to that recipient under the terms of the
-    Applicable License. This Section 4(b) applies to the Adaptation as
-    incorporated in a Collection, but this does not require the Collection
-    apart from the Adaptation itself to be made subject to the terms of the
-    Applicable License.
-    If You Distribute, or Publicly Perform the Work or any Adaptations or
-    Collections, You must, unless a request has been made pursuant to
-    Section 4(a), keep intact all copyright notices for the Work and
-    provide, reasonable to the medium or means You are utilizing: (i) the
-    name of the Original Author (or pseudonym, if applicable) if supplied,
-    and/or if the Original Author and/or Licensor designate another party or
-    parties (e.g., a sponsor institute, publishing entity, journal) for
-    attribution ("Attribution Parties") in Licensor's copyright notice,
-    terms of service or by other reasonable means, the name of such party or
-    parties; (ii) the title of the Work if supplied; (iii) to the extent
-    reasonably practicable, the URI, if any, that Licensor specifies to be
-    associated with the Work, unless such URI does not refer to the
-    copyright notice or licensing information for the Work; and (iv) ,
-    consistent with Ssection 3(b), in the case of an Adaptation, a credit
-    identifying the use of the Work in the Adaptation (e.g., "French
-    translation of the Work by Original Author," or "Screenplay based on
-    original Work by Original Author"). The credit required by this Section
-    4(c) may be implemented in any reasonable manner; provided, however,
-    that in the case of a Adaptation or Collection, at a minimum such credit
-    will appear, if a credit for all contributing authors of the Adaptation
-    or Collection appears, then as part of these credits and in a manner at
-    least as prominent as the credits for the other contributing authors.
-    For the avoidance of doubt, You may only use the credit required by this
-    Section for the purpose of attribution in the manner set out above and,
-    by exercising Your rights under this License, You may not implicitly or
-    explicitly assert or imply any connection with, sponsorship or
-    endorsement by the Original Author, Licensor and/or Attribution Parties,
-    as appropriate, of You or Your use of the Work, without the separate,
-    express prior written permission of the Original Author, Licensor and/or
-    Attribution Parties.
-    Except as otherwise agreed in writing by the Licensor or as may be
-    otherwise permitted by applicable law, if You Reproduce, Distribute or
-    Publicly Perform the Work either by itself or as part of any Adaptations
-    or Collections, You must not distort, mutilate, modify or take other
-    derogatory action in relation to the Work which would be prejudicial to
-    the Original Author's honor or reputation. Licensor agrees that in those
-    jurisdictions (e.g. Japan), in which any exercise of the right granted
-    in Section 3(b) of this License (the right to make Adaptations) would be
-    deemed to be a distortion, mutilation, modification or other derogatory
-    action prejudicial to the Original Author's honor and reputation, the
-    Licensor will waive or not assert, as appropriate, this Section, to the
-    fullest extent permitted by the applicable national law, to enable You
-    to reasonably exercise Your right under Section 3(b) of this License
-    (right to make Adaptations) but not otherwise.
- .
- 5. Representations, Warranties and Disclaimer
- .
- UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
- OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
- KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
- INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
- FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT
- OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER
- OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF
- IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
- .
- 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
- LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY
- SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING
- OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- .
- 7. Termination
- .
-    This License and the rights granted hereunder will terminate
-    automatically upon any breach by You of the terms of this License.
-    Individuals or entities who have received Adaptations or Collections
-    from You under this License, however, will not have their licenses
-    terminated provided such individuals or entities remain in full
-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
-    survive any termination of this License.
-    Subject to the above terms and conditions, the license granted here is
-    perpetual (for the duration of the applicable copyright in the Work).
-    Notwithstanding the above, Licensor reserves the right to release the
-    Work under different license terms or to stop distributing the Work at
-    any time; provided, however that any such election will not serve to
-    withdraw this License (or any other license that has been, or is
-    required to be, granted under the terms of this License), and this
-    License will continue in full force and effect unless terminated as
-    stated above.
- .
- 8. Miscellaneous
- .
-    Each time You Distribute or Publicly Perform the Work or a Collection,
-    the Licensor offers to the recipient a license to the Work on the same
-    terms and conditions as the license granted to You under this License.
-    Each time You Distribute or Publicly Perform an Adaptation, Licensor
-    offers to the recipient a license to the original Work on the same terms
-    and conditions as the license granted to You under this License.
-    If any provision of this License is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this License, and without further action
-    by the parties to this agreement, such provision shall be reformed to
-    the minimum extent necessary to make such provision valid and
-    enforceable.
-    No term or provision of this License shall be deemed waived and no
-    breach consented to unless such waiver or consent shall be in writing
-    and signed by the party to be charged with such waiver or consent.
-    This License constitutes the entire agreement between the parties with
-    respect to the Work licensed here. There are no understandings,
-    agreements or representations with respect to the Work not specified
-    here. Licensor shall not be bound by any additional provisions that may
-    appear in any communication from You. This License may not be modified
-    without the mutual written agreement of the Licensor and You.
-    The rights granted under, and the subject matter referenced, in this
-    License were drafted utilizing the terminology of the Berne Convention
-    for the Protection of Literary and Artistic Works (as amended on
-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and
-    the Universal Copyright Convention (as revised on July 24, 1971). These
-    rights and subject matter take effect in the relevant jurisdiction in
-    which the License terms are sought to be enforced according to the
-    corresponding provisions of the implementation of those treaty
-    provisions in the applicable national law. If the standard suite of
-    rights granted under applicable copyright law includes additional rights
-    not granted under this License, such additional rights are deemed to be
-    included in the License; this License is not intended to restrict the
-    license of any rights under applicable law.
-
 License: MIT
  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
@@ -365,10 +31,3 @@ License: MIT
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-License: public-domain
- As a work of the US government, these files are in the public domain in the
- United States. The below webpage indicates that the US Census Department is
- most likely fine with similar usage worldwide:
- .
- https://ask.census.gov/faq.php?id=5000&faqId=431
diff --git a/debian/docs b/debian/docs
index e845566..a1320b1 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1 @@
-README
+README.rst
diff --git a/debian/files b/debian/files
new file mode 100644
index 0000000..40cb8ae
--- /dev/null
+++ b/debian/files
@@ -0,0 +1,3 @@
+python-zxcvbn_4.4.14-0.1_all.deb python optional
+python-zxcvbn_4.4.14-0.1_amd64.buildinfo python optional
+python3-zxcvbn_4.4.14-0.1_all.deb python optional
diff --git a/debian/python-zxcvbn/DEBIAN/control b/debian/python-zxcvbn/DEBIAN/control
new file mode 100644
index 0000000..d1f0c08
--- /dev/null
+++ b/debian/python-zxcvbn/DEBIAN/control
@@ -0,0 +1,18 @@
+Package: python-zxcvbn
+Version: 4.4.14-0.1
+Architecture: all
+Maintainer: Sabino Par <sprab at onenetbeyond.org>
+Installed-Size: 848
+Depends: python:any (<< 2.8), python:any (>= 2.7.5-5~)
+Section: python
+Priority: optional
+Homepage: https://github.com/dwolfhub/zxcvbn-python/tree/master
+Description: Realistic password strength estimator. Python2 module
+ This is a Python implementation of the library created by the
+ team at Dropbox. Accepts user data to be added to the dictionaries
+ that are tested against, gives a score to the password, 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
+ .
+ This package provides the Python 2 library.
diff --git a/debian/python-zxcvbn/DEBIAN/md5sums b/debian/python-zxcvbn/DEBIAN/md5sums
new file mode 100644
index 0000000..a1c7993
--- /dev/null
+++ b/debian/python-zxcvbn/DEBIAN/md5sums
@@ -0,0 +1,11 @@
+cae66136e395afc68ea2a80f3b7ae2c1  usr/lib/python2.7/dist-packages/zxcvbn/__init__.py
+160167e69c0949a2f040aaa406502daf  usr/lib/python2.7/dist-packages/zxcvbn/adjacency_graphs.py
+2f8d18fe93a82d43c3190e0ae28b9d4e  usr/lib/python2.7/dist-packages/zxcvbn/feedback.py
+1015e6e2065b88a53aa8f6b69e679a66  usr/lib/python2.7/dist-packages/zxcvbn/frequency_lists.py
+77ab0d7243ae199b14ba2e47fbfed6f6  usr/lib/python2.7/dist-packages/zxcvbn/matching.py
+61036279a0559143f7936c7e5df1f9ee  usr/lib/python2.7/dist-packages/zxcvbn/scoring.py
+2d5ee14d6009d60f16d86ca99e5e2492  usr/lib/python2.7/dist-packages/zxcvbn/time_estimates.py
+4a33e06bf449883ba9cf6e5577b80ab1  usr/lib/python2.7/dist-packages/zxcvbn_python-4.4.14.egg-info
+706de2b401358289cf3669aaa8be7f49  usr/share/doc/python-zxcvbn/README.rst.gz
+e26efdfbe7fefe916e682e162b7e4f30  usr/share/doc/python-zxcvbn/changelog.Debian.gz
+b482c5b03191b11e8429d269a53c2390  usr/share/doc/python-zxcvbn/copyright
diff --git a/debian/python-zxcvbn/DEBIAN/postinst b/debian/python-zxcvbn/DEBIAN/postinst
new file mode 100755
index 0000000..6bdc76f
--- /dev/null
+++ b/debian/python-zxcvbn/DEBIAN/postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+# Automatically added by dh_python2:
+if which pycompile >/dev/null 2>&1; then
+	pycompile -p python-zxcvbn 
+fi
+
+# End automatically added section
diff --git a/debian/python-zxcvbn/DEBIAN/prerm b/debian/python-zxcvbn/DEBIAN/prerm
new file mode 100755
index 0000000..8ba4d1e
--- /dev/null
+++ b/debian/python-zxcvbn/DEBIAN/prerm
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+# Automatically added by dh_python2:
+if which pyclean >/dev/null 2>&1; then
+	pyclean -p python-zxcvbn 
+else
+	dpkg -L python-zxcvbn | grep \.py$ | while read file
+	do
+		rm -f "${file}"[co] >/dev/null
+  	done
+fi
+
+# End automatically added section
diff --git a/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/__init__.py b/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/__init__.py
new file mode 100644
index 0000000..11964eb
--- /dev/null
+++ b/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/__init__.py
@@ -0,0 +1,26 @@
+from datetime import datetime
+
+from . import matching, scoring, time_estimates, feedback
+
+
+def zxcvbn(password, user_inputs=None):
+    if user_inputs is None:
+        user_inputs = []
+
+    start = datetime.now()
+
+    sanitized_inputs = [str(arg).lower() for arg in user_inputs]
+    matching.set_user_input_dictionary(sanitized_inputs)
+
+    matches = matching.omnimatch(password)
+    result = scoring.most_guessable_match_sequence(password, matches)
+    result['calc_time'] = datetime.now() - start
+
+    attack_times = time_estimates.estimate_attack_times(result['guesses'])
+    for prop, val in attack_times.items():
+        result[prop] = val
+
+    result['feedback'] = feedback.get_feedback(result['score'],
+                                               result['sequence'])
+
+    return result
diff --git a/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/adjacency_graphs.py b/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/adjacency_graphs.py
new file mode 100644
index 0000000..6fd08d2
--- /dev/null
+++ b/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/adjacency_graphs.py
@@ -0,0 +1,7 @@
+# generated by scripts/build_keyboard_adjacency_graphs.py
+ADJACENCY_GRAPHS = {
+    "qwerty": {"!": ["`~", None, None, "2@", "qQ", None], "\"": [";:", "[{", "]}", None, None, "/?"], "#": ["2@", None, None, "4$", "eE", "wW"], "$": ["3#", None, None, "5%", "rR", "eE"], "%": ["4$", None, None, "6^", "tT", "rR"], "&": ["6^", None, None, "8*", "uU", "yY"], "'": [";:", "[{", "]}", None, None, "/?"], "(": ["8*", None, None, "0)", "oO", "iI"], ")": ["9(", None, None, "-_", "pP", "oO"], "*": ["7&", None, None, "9(", "iI", "uU"], "+": ["-_", None, None, None, "]}", "[{"], "," [...]
+    "dvorak": {"!": ["`~", None, None, "2@", "'\"", None], "\"": [None, "1!", "2@", ",<", "aA", None], "#": ["2@", None, None, "4$", ".>", ",<"], "$": ["3#", None, None, "5%", "pP", ".>"], "%": ["4$", None, None, "6^", "yY", "pP"], "&": ["6^", None, None, "8*", "gG", "fF"], "'": [None, "1!", "2@", ",<", "aA", None], "(": ["8*", None, None, "0)", "rR", "cC"], ")": ["9(", None, None, "[{", "lL", "rR"], "*": ["7&", None, None, "9(", "cC", "gG"], "+": ["/?", "]}", None, "\\|", None, "-_"], " [...]
+    "keypad": {"*": ["/", None, None, None, "-", "+", "9", "8"], "+": ["9", "*", "-", None, None, None, None, "6"], "-": ["*", None, None, None, None, None, "+", "9"], ".": ["0", "2", "3", None, None, None, None, None], "/": [None, None, None, None, "*", "9", "8", "7"], "0": [None, "1", "2", "3", ".", None, None, None], "1": [None, None, "4", "5", "2", "0", None, None], "2": ["1", "4", "5", "6", "3", ".", "0", None], "3": ["2", "5", "6", None, None, None, ".", "0"], "4": [None, None, "7" [...]
+    "mac_keypad": {"*": ["/", None, None, None, None, None, "-", "9"], "+": ["6", "9", "-", None, None, None, None, "3"], "-": ["9", "/", "*", None, None, None, "+", "6"], ".": ["0", "2", "3", None, None, None, None, None], "/": ["=", None, None, None, "*", "-", "9", "8"], "0": [None, "1", "2", "3", ".", None, None, None], "1": [None, None, "4", "5", "2", "0", None, None], "2": ["1", "4", "5", "6", "3", ".", "0", None], "3": ["2", "5", "6", "+", None, None, ".", "0"], "4": [None, None, " [...]
+}
\ No newline at end of file
diff --git a/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/feedback.py b/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/feedback.py
new file mode 100644
index 0000000..f8f7549
--- /dev/null
+++ b/debian/python-zxcvbn/usr/lib/python2.7/dist-packages/zxcvbn/feedback.py
@@ -0,0 +1,135 @@
+from zxcvbn.scoring import START_UPPER, ALL_UPPER
+from gettext import gettext as _
+
+
+def get_feedback(score, sequence):
+    if len(sequence) == 0:
+        return {
+            'warning': '',
+            'suggestions': [
+                _("Use a few words, avoid common phrases."),
+                _("No need for symbols, digits, or uppercase letters.")
+            ]
+        }
+
+    if score > 2:
+        return {
+            'warning': '',
+            'suggestions': [],
+        }
+
+    longest_match = sequence[0]
+    for match in sequence[1:]:
+        if len(match['token']) > len(longest_match['token']):
+            longest_match = match
+
+    feedback = get_match_feedback(longest_match, len(sequence) == 1)
+    extra_feedback = _('Add another word or two. Uncommon words are better.')
+    if feedback:
+        feedback['suggestions'].insert(0, extra_feedback)
+        if not feedback['warning']:
+            feedback['warning'] = ''
+    else:
+        feedback = {
+            'warning': '',
+            'suggestions': [extra_feedback]
+        }
+
+    return feedback
+
+
+def get_match_feedback(match, is_sole_match):
+    if match['pattern'] == 'dictionary':
+        return get_dictionary_match_feedback(match, is_sole_match)
+    elif match['pattern'] == 'spatial':
+        if match['turns'] == 1:
+            warning = _('Straight rows of keys are easy to guess.')
+        else:
+            warning = _('Short keyboard patterns are easy to guess.')
+
+        return {
+            'warning': warning,
+            'suggestions': [
+                _('Use a longer keyboard pattern with more turns.')
+            ]
+        }
+    elif match['pattern'] == 'repeat':
+        if len(match['base_token']) == 1:
+            warning = _('Repeats like "aaa" are easy to guess.')
+        else:
+            warning = _('Repeats like "abcabcabc" are only slightly harder to ' \
+                        'guess than "abc".')
+        return {
+            'warning': warning,
+            'suggestions': [
+                _('Avoid repeated words and characters.')
+            ]
+        }
... 4100 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-zxcvbn.git



More information about the Python-modules-commits mailing list