Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Fun Password Generator

Project description

Fun Password Generator (fpw)

A portable, single file python2/3 password generator that attempts to generate random passwords in a cryptographically secure manner.

By default, fpw generates completely random passwords using all of the letters, numbers, and symbols that are easily typed on an English keyboard. To support insecure systems, you can specify required character groups. To support insecure humans, you can generate pronounceable passwords. To break things, you can generate passwords from a large unicode character set.


usage: fpw [-h] [--number NUMBER] [--pronounceable] [--lower] [--require-lower] [--upper]
           [--require-upper] [--digits] [--require-digits] [--special]
           [--require-special] [--characters CHARACTERS] [--unicode] [--active-directory]
           [--build-markov FILE]

Generate random passwords in a hopefully secure manner.

positional arguments:
  length                Length of password

optional arguments:
  -h, --help            show this help message and exit
  --number NUMBER, -n NUMBER
                        Number of passwords to generate
  --pronounceable, -p   Create human pronounceable passwords
  --lower, -l           Use lower case letters
  --require-lower, -L   Require at least one lowercase character
  --upper, -u           Use upper case letters
  --require-upper, -U   Require at least one upper character
  --digits, -d          Use digits
  --require-digits, -D  Require at least one digit character
  --special, -s         Use special characters (punctuation)
  --require-special, -S
                        Require at least one special character
  --characters CHARACTERS, -c CHARACTERS
                        Specify individual characters
  --unicode, -z         Use a large unicode character set
  --active-directory, -a
                        Output passwords that exceed the default requirements in
                        Microsoft Active Directory environments (`-LUDS`)
  --build-markov FILE, -b FILE
                        Build a markov chain using the words in FILE.


Character groups

You can specify the minimum number of lower, upper, digit, or special characters. You can also include only certain groups, or even specify a list of approved characters. If you specify --lower, --upper, --digits, --special, or --characters then passwords will only contain those characters.

Pronounceable passwords

Generate pronounceable passwords using Markov chains.

The Markov engine is trained to produce English-like gibberish using the words.txt file in the repository. However, that file is not required to operate fpw because fpw is a self-updating program, making it significantly closer to sentience than your average password generator. I am going to go out on a limb here and make the claim that fpw uses Artificial Intelligence.

To make fpw smarter, get a list of words in a file. The words should be separated by a newline. Then run:

fpw -b words.txt

It will parse them and store the resultant Markov data inside the fpw script file itself so that you don't have to copy around multiple files. You read that right. It stores its data inside the same file holding its executable code.


Generate passwords from lowercase, uppercase, digit, and special characters:

> fpw -luds

Require at least one lowercase, uppercase, digit, and special character:

> fpw -LUDS

Only digits:

> fpw -d

Only certain characters:

> fpw -c u

Make a short password:

> fpw 1

Make a long password:

> fpw 300

Require 6 digits and 3 special characters:

> fpw -D 6 -S 3

6 high unicode range passwords:

> fpw -zn 6

5 vaguely human pronounceable passwords:

> fpw -pn 5

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fpw, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size fpw-0.5.0-py3-none-any.whl (10.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size fpw-0.5.0.tar.gz (9.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page