Coder Social home page Coder Social logo

pwgen's Introduction

pwgen

Another of those passphrase generators

The functionality is heavily inspired by HSXKPasswd, but it didn't quite have the functionality I wanted (random capitalization) and I wanted a python module for a possible future uwsgi webapp...

Why

Because Randall Munroe says so.

![alt text][xkcd] [xkcd]: http://imgs.xkcd.com/comics/password_strength.png

Requirements

Python 2 or 3 as well as myspell-dictionaries for the language(s) you want to use.

What

A password/passphrase generator. See below for some example usage.

$ sudo python3 setup.py install

...

$ pwgen --help
usage: pwgen [-h] [--generate-config] [--config-file CONFIG_FILE]
             [--myspell-dir MYSPELL_DIR] [--lang LANG]
             [--word-min-char WORD_MIN_CHAR] [--word-max-char WORD_MAX_CHAR]
             [--words WORDS] [--capitalize {true,false,random}]
             [--separators SEPARATORS] [--trailing-digits TRAILING_DIGITS]
             [--leading-digits LEADING_DIGITS] [--special-chars SPECIAL_CHARS]
             [--trailing-chars TRAILING_CHARS] [--leading-chars LEADING_CHARS]
             [--passwords PASSWORDS] [--max-length MAX_LENGTH]

Generate passwords

optional arguments:
  -h, --help            show this help message and exit
  --generate-config, -g
                        Generate configuration file and then exit
  --config-file CONFIG_FILE, -c CONFIG_FILE
                        Configuration file to use
  --myspell-dir MYSPELL_DIR, -i MYSPELL_DIR
                        Directory containing myspell dictionaries
  --lang LANG, -l LANG  Dictionary language to use
  --word-min-char WORD_MIN_CHAR, -m WORD_MIN_CHAR
                        Minimum number of characters in a word
  --word-max-char WORD_MAX_CHAR, -M WORD_MAX_CHAR
                        Maximum number of characters in a word
  --words WORDS, -w WORDS
                        Number of words to use in the passphrase
  --capitalize {true,false,random}, -C {true,false,random}
                        Capitalize the words
  --separators SEPARATORS, -s SEPARATORS
                        Possible characters to use as separators
  --trailing-digits TRAILING_DIGITS, -d TRAILING_DIGITS
                        Number of digits at the end of the passphrase
  --leading-digits LEADING_DIGITS, -D LEADING_DIGITS
                        Number of digits at the start of the passphrase
  --special-chars SPECIAL_CHARS, -S SPECIAL_CHARS
                        Possible characters to use as extra special characters
  --trailing-chars TRAILING_CHARS, -p TRAILING_CHARS
                        Number of special characters to add at the end of the
                        passphrase
  --leading-chars LEADING_CHARS, -P LEADING_CHARS
                        Number of special characters to add at the start of
                        the passphrase
  --passwords PASSWORDS, -n PASSWORDS
                        Number of passwords to generate
  --max-length MAX_LENGTH, -L MAX_LENGTH
                        Maximum length of the generated passwords. Full-
                        knowledge entropy calculation doesn't work when this
                        is set.

$ pwgen -g --myspell-dir /usr/share/hunspell --lang sv_SE
Missing configuration file; generating a new at /home/user/.pwgen.cfg
Updating configuration file at /home/user/.pwgen.cfg

$ pwgen
Generated 5 passwords
Full-knowledge entropy is 82
Blind entropy	Password
========================
171.3           Lämpligen=empirisk=Musikal=Degklump?21
206.32		    Eldgaffel-Stigbygel-Vattenkoppor-ledstång-01
236.84		    Studieform leksaksbil punkinfluenser luftvärdig_09
181.52		    hemnummer:Fyrahundrade:Baku:segertippad!77
227.55		    bärvåg,Workout,Distriktsstyrelse,Förvarstid,89
========================

TODO

  • documentation
  • webservice

pwgen's People

Contributors

fredrik-eriksson avatar fsoderblom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.