pwdpy


Namepwdpy JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryPassword Tools
upload_time2023-08-17 01:45:00
maintainer
docs_urlNone
authorIsaac Araujo
requires_python
licenseMIT License
keywords python password password generator password tools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pwdpy
=======

pwdpy is a set of tools to facilitate password handling. It can be used in command line and as a python module.

Installation
============

pwdpy requires Python 3.x.

pwdpy can be installed with *pip*:

    $ pip install pwdpy

Usage (command line)
====================

pwdpy accepts several arguments configuring its outcome.
Overall synopsis is:

    $ pwdpy {generate, entropy, strengthen} [-h]
    
    $ pwdpy generate [-h] [-l LENGTH] [-q QUANTITY] [-p] [-d] [-le] [-nu] [-nl] [-cf FILE] [-o FILE]
    
    $ pwdpy entropy [-h] [-pwd PASSWORD]
    
    $ pwdpy strengthen [-h] [-pwd PASSWORD] [-shf] [-inc] [-mp MAX_PREFIX] [-ms MAX_SUFIX]

    $ pwdpy generate_wordlist [-h] [-q QUANTITY] [-l LENGTH] [-lg LANGUAGE] [-sep SEP] [-u] [-wl WORDLIST]

Commands:
    **generate**      Generates a random password based on the arguments
    
    **entropy**       Calculate the entropy of a password
    
    **strengthen**    Strengthen your password

    **generate_wordlist**    Generates a random wordlist

ALL Arguments:

-h, --help
    Display help message

-l, --length LENGTH
    The length of the password (default: 8)

-q, --quantity QUANTITY
    Generate QUANTITY passwords. (default: 1)

-sc, --special_characters
    Use special characters (default: False)

-d, --digits
    Use digits (default: False)

-le, --letters
    Use letter (default: False)

-nu, --no-upper
    Don't use upper case letters (default: False)

-nl, --no-lower
    Don't use lower case letters (default: False)

-cf, --charset-file FILE
    Charset file will be used instead of the arguments specification
    
-o FILE, --output FILE
    The output file will be created with the passwords.

ENTROPY Arguments:

-pwd, --password PASSWORD 
    password that will be tested

STRENGTHEN Arguments:

-pwd, --password PASSWORD 
    password that will be strengthened
    
-shf, --shuffle
    shuffle the password after strengthened (default: False)
    
-inc, --increase
    increase the number of characters in the password (default: False)
    
-mp, --max_prefix MAX_PREFIX
    max number of characters to add as prefix (default: 5) can only be used with --increase
    
-ms, --max_sufix MAX_SUFIX
    max number of characters to add as sufix (default: 5) can only be used with --increase

GENERATE WORDLIST Arguments:

-q QUANTITY, --quantity QUANTITY
    quantity of passwords to generate (default: 1)
                    
-l LENGTH, --length LENGTH
        the length of the password (default: 8)

-lg LANGUAGE, --language LANGUAGE
    language of the words (default: english)

-sep SEP, --separator SEP
    word separation (default: space)

-u, --upper           
    use upper case words (default: False)

-wl WORDLIST, --wordlist WORDLIST
    path to to the wordlist file (default: None)

Examples
--------

Below are some examples of pwdpy usage.

GENERATE:
-------
One password with letters and digits:

    $ pwdpy generate -le -d 
        MT06aRK1

One password with 12 digits:

    $ pwdpy generate -l 12 -d
        304751766483

One password with all characters possibility:

    $ pwdpy generate -le -d -p
        PY>8OH+y

A list containing 3 passwords with all characters possibility:

    $ pwdpy generate -q 3 -le -d -p
        ['Xw]6ua77', 'SfmCrlg)', 'I9):o8Oa']

One password with all characters possibility from the charset file:

    $ pwdpy generate -cf ./wordlist.txt
        }=W8jb4y

ENTROPY:
-------
Calculing one password entropy:

    $ pwdpy entropy -pwd "PY>8OH+y"
        52.44
    
    $ pwdpy entropy -pwd "Isaac"
        28.5
        
STRENGTHEN:
-------
Strengthen one password:

    $ pwdpy strengthen -pwd "Isaac"
        15Á4C
    
    $ pwdpy strengthen -pwd "Isaac" -inc
        <uQ0@îsá4c~
        
Strengthened and using shuffle

    $ pwdpy strengthen -pwd "Python" -shf
        ý%IÕqN

GENERATE WORDLIST:
-------
Generate one wordlist with 13 words:

    $ pwdpy generate_wordlist -l 13
        dollhood obligatum weirded triangularly meanness uncrediting ologies pomological refixture accessible clapperclaws winzeman montesinos

Generate one wordlist with portuguese upper words:

    $ generate_wordlist -lg portuguese -u
        ANDRÔMEDA CUCURBITÁCEO ISOAMÍLICO APLACÁVEL ARQUEÔMETRO GERVAIS CRUSTACÍTICO EUGLIPTO
        
Python module
=============

pwdpy Python module provides one function that is called generate.

| ``generate(quantity=1, length=12, special_characters=True, digits=True, letters=True, l_upper=True, l_lower=True, charset=[], charset_file="",output_file="", **kwargs) -> str or list``

    It returns a string with *length* characters. *special_characters*, *digits*
    and *letters* arguments specify whether special characters, digits and letters
    should be used. *l_upper* and *l_lower* specifies letter wich case the letter can be.
    
    A list of charsets can be passed, instead of using the default it will uses the parameter.
    
    You can configure an output using *charset_file*, that file will be
    created or replaced with the generated passwords
    
    
| ``entropy(password: str) -> float``

    It returns a float of bits that was the result of applying the Shannon formula.


| ``strengthen(password: str, shuffle=False, increase=True, max_prefix=5, max_sufix=5) -> str``

    It returns a string the strengthen password,
    can be added a prefix and/or sufix by using *max_prefix* and *max_sufix*
    and the password can be shuffle using *shuffle*.

| ``generate_wordlist(quantity=1, length=8, language="english", sep=" ", case="lower", wordlist: str = None) -> str orlist``
    
    It returns a string with *length* of words.
    The words are select by *language* and separeted by *sep*.
    Define case of the words using *case*.
    Or you can pass your own wordlist using *wordlist*.

License
--------
MIT License

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pwdpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,password,password generator,password tools",
    "author": "Isaac Araujo",
    "author_email": "<zac.araujo2001@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ea/99/c7a7ab60474851570ebffda9114a6e48ad8e85fb9e7eab1634f5a2089263/pwdpy-1.0.1.tar.gz",
    "platform": null,
    "description": "pwdpy\r\n=======\r\n\r\npwdpy is a set of tools to facilitate password handling. It can be used in command line and as a python module.\r\n\r\nInstallation\r\n============\r\n\r\npwdpy requires Python 3.x.\r\n\r\npwdpy can be installed with *pip*:\r\n\r\n    $ pip install pwdpy\r\n\r\nUsage (command line)\r\n====================\r\n\r\npwdpy accepts several arguments configuring its outcome.\r\nOverall synopsis is:\r\n\r\n    $ pwdpy {generate, entropy, strengthen} [-h]\r\n    \r\n    $ pwdpy generate [-h] [-l LENGTH] [-q QUANTITY] [-p] [-d] [-le] [-nu] [-nl] [-cf FILE] [-o FILE]\r\n    \r\n    $ pwdpy entropy [-h] [-pwd PASSWORD]\r\n    \r\n    $ pwdpy strengthen [-h] [-pwd PASSWORD] [-shf] [-inc] [-mp MAX_PREFIX] [-ms MAX_SUFIX]\r\n\r\n    $ pwdpy generate_wordlist [-h] [-q QUANTITY] [-l LENGTH] [-lg LANGUAGE] [-sep SEP] [-u] [-wl WORDLIST]\r\n\r\nCommands:\r\n    **generate**      Generates a random password based on the arguments\r\n    \r\n    **entropy**       Calculate the entropy of a password\r\n    \r\n    **strengthen**    Strengthen your password\r\n\r\n    **generate_wordlist**    Generates a random wordlist\r\n\r\nALL Arguments:\r\n\r\n-h, --help\r\n    Display help message\r\n\r\n-l, --length LENGTH\r\n    The length of the password (default: 8)\r\n\r\n-q, --quantity QUANTITY\r\n    Generate QUANTITY passwords. (default: 1)\r\n\r\n-sc, --special_characters\r\n    Use special characters (default: False)\r\n\r\n-d, --digits\r\n    Use digits (default: False)\r\n\r\n-le, --letters\r\n    Use letter (default: False)\r\n\r\n-nu, --no-upper\r\n    Don't use upper case letters (default: False)\r\n\r\n-nl, --no-lower\r\n    Don't use lower case letters (default: False)\r\n\r\n-cf, --charset-file FILE\r\n    Charset file will be used instead of the arguments specification\r\n    \r\n-o FILE, --output FILE\r\n    The output file will be created with the passwords.\r\n\r\nENTROPY Arguments:\r\n\r\n-pwd, --password PASSWORD \r\n    password that will be tested\r\n\r\nSTRENGTHEN Arguments:\r\n\r\n-pwd, --password PASSWORD \r\n    password that will be strengthened\r\n    \r\n-shf, --shuffle\r\n    shuffle the password after strengthened (default: False)\r\n    \r\n-inc, --increase\r\n    increase the number of characters in the password (default: False)\r\n    \r\n-mp, --max_prefix MAX_PREFIX\r\n    max number of characters to add as prefix (default: 5) can only be used with --increase\r\n    \r\n-ms, --max_sufix MAX_SUFIX\r\n    max number of characters to add as sufix (default: 5) can only be used with --increase\r\n\r\nGENERATE WORDLIST Arguments:\r\n\r\n-q QUANTITY, --quantity QUANTITY\r\n    quantity of passwords to generate (default: 1)\r\n                    \r\n-l LENGTH, --length LENGTH\r\n        the length of the password (default: 8)\r\n\r\n-lg LANGUAGE, --language LANGUAGE\r\n    language of the words (default: english)\r\n\r\n-sep SEP, --separator SEP\r\n    word separation (default: space)\r\n\r\n-u, --upper           \r\n    use upper case words (default: False)\r\n\r\n-wl WORDLIST, --wordlist WORDLIST\r\n    path to to the wordlist file (default: None)\r\n\r\nExamples\r\n--------\r\n\r\nBelow are some examples of pwdpy usage.\r\n\r\nGENERATE:\r\n-------\r\nOne password with letters and digits:\r\n\r\n    $ pwdpy generate -le -d \r\n        MT06aRK1\r\n\r\nOne password with 12 digits:\r\n\r\n    $ pwdpy generate -l 12 -d\r\n        304751766483\r\n\r\nOne password with all characters possibility:\r\n\r\n    $ pwdpy generate -le -d -p\r\n        PY>8OH+y\r\n\r\nA list containing 3 passwords with all characters possibility:\r\n\r\n    $ pwdpy generate -q 3 -le -d -p\r\n        ['Xw]6ua77', 'SfmCrlg)', 'I9):o8Oa']\r\n\r\nOne password with all characters possibility from the charset file:\r\n\r\n    $ pwdpy generate -cf ./wordlist.txt\r\n        }=W8jb4y\r\n\r\nENTROPY:\r\n-------\r\nCalculing one password entropy:\r\n\r\n    $ pwdpy entropy -pwd \"PY>8OH+y\"\r\n        52.44\r\n    \r\n    $ pwdpy entropy -pwd \"Isaac\"\r\n        28.5\r\n        \r\nSTRENGTHEN:\r\n-------\r\nStrengthen one password:\r\n\r\n    $ pwdpy strengthen -pwd \"Isaac\"\r\n        15\u00c14C\r\n    \r\n    $ pwdpy strengthen -pwd \"Isaac\" -inc\r\n        <uQ0@\u00ees\u00e14c~\r\n        \r\nStrengthened and using shuffle\r\n\r\n    $ pwdpy strengthen -pwd \"Python\" -shf\r\n        \u00fd%I\u00d5qN\r\n\r\nGENERATE WORDLIST:\r\n-------\r\nGenerate one wordlist with 13 words:\r\n\r\n    $ pwdpy generate_wordlist -l 13\r\n        dollhood obligatum weirded triangularly meanness uncrediting ologies pomological refixture accessible clapperclaws winzeman montesinos\r\n\r\nGenerate one wordlist with portuguese upper words:\r\n\r\n    $ generate_wordlist -lg portuguese -u\r\n        ANDR\u00d4MEDA CUCURBIT\u00c1CEO ISOAM\u00cdLICO APLAC\u00c1VEL ARQUE\u00d4METRO GERVAIS CRUSTAC\u00cdTICO EUGLIPTO\r\n        \r\nPython module\r\n=============\r\n\r\npwdpy Python module provides one function that is called generate.\r\n\r\n| ``generate(quantity=1, length=12, special_characters=True, digits=True, letters=True, l_upper=True, l_lower=True, charset=[], charset_file=\"\",output_file=\"\", **kwargs) -> str or list``\r\n\r\n    It returns a string with *length* characters. *special_characters*, *digits*\r\n    and *letters* arguments specify whether special characters, digits and letters\r\n    should be used. *l_upper* and *l_lower* specifies letter wich case the letter can be.\r\n    \r\n    A list of charsets can be passed, instead of using the default it will uses the parameter.\r\n    \r\n    You can configure an output using *charset_file*, that file will be\r\n    created or replaced with the generated passwords\r\n    \r\n    \r\n| ``entropy(password: str) -> float``\r\n\r\n    It returns a float of bits that was the result of applying the Shannon formula.\r\n\r\n\r\n| ``strengthen(password: str, shuffle=False, increase=True, max_prefix=5, max_sufix=5) -> str``\r\n\r\n    It returns a string the strengthen password,\r\n    can be added a prefix and/or sufix by using *max_prefix* and *max_sufix*\r\n    and the password can be shuffle using *shuffle*.\r\n\r\n| ``generate_wordlist(quantity=1, length=8, language=\"english\", sep=\" \", case=\"lower\", wordlist: str = None) -> str orlist``\r\n    \r\n    It returns a string with *length* of words.\r\n    The words are select by *language* and separeted by *sep*.\r\n    Define case of the words using *case*.\r\n    Or you can pass your own wordlist using *wordlist*.\r\n\r\nLicense\r\n--------\r\nMIT License\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Password Tools",
    "version": "1.0.1",
    "project_urls": {
        "Source": "https://github.com/isaac-araujo/pwdpy"
    },
    "split_keywords": [
        "python",
        "password",
        "password generator",
        "password tools"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aae5b5eccd0f504bc706ec71f6566ae28b0941e35b7de619b55d0ecf8d365128",
                "md5": "8a460fa9e5d7f7829290ee60d18ce49f",
                "sha256": "78fe6e115d79d223a3d77da57535ab03c2e377066632634f74fdca4299162132"
            },
            "downloads": -1,
            "filename": "pwdpy-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a460fa9e5d7f7829290ee60d18ce49f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11539,
            "upload_time": "2023-08-17T01:44:59",
            "upload_time_iso_8601": "2023-08-17T01:44:59.063589Z",
            "url": "https://files.pythonhosted.org/packages/aa/e5/b5eccd0f504bc706ec71f6566ae28b0941e35b7de619b55d0ecf8d365128/pwdpy-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea99c7a7ab60474851570ebffda9114a6e48ad8e85fb9e7eab1634f5a2089263",
                "md5": "6cdd7c907ff790a2d0b8ed087deb6bd0",
                "sha256": "e15405774b5bb7c47f7327f6e12c3d0a9dac64b1aa531a7470e8ed47df9e471f"
            },
            "downloads": -1,
            "filename": "pwdpy-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6cdd7c907ff790a2d0b8ed087deb6bd0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12272,
            "upload_time": "2023-08-17T01:45:00",
            "upload_time_iso_8601": "2023-08-17T01:45:00.701878Z",
            "url": "https://files.pythonhosted.org/packages/ea/99/c7a7ab60474851570ebffda9114a6e48ad8e85fb9e7eab1634f5a2089263/pwdpy-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-17 01:45:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "isaac-araujo",
    "github_project": "pwdpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pwdpy"
}
        
Elapsed time: 0.10536s