Code Monkey home page Code Monkey logo

passphrase-gen's Introduction

passphrase-gen

Build Status

Simple passphrase and password generators for the terminal.

License

Passphrase-gen is released under the terms of the MIT license.

Requirements

These scripts should work on linux in python 2.7+ or 3.X.

passphrase.py

A word list with one word per line is required. By default, /usr/share/dict is used as the word list. You can specify a different location with '-s'.

randstr.py

No specific requirements.

Usage

passphrase.py

usage: passphrase.py [-h] [-m MINWORDLEN] [-M MAXWORDLEN] [-n NUMPHRASES]
                     [-w WORDLIST] [-s SEPARATOR] [-l | -u | -c]
                     [length]

Basic dictionary word passphrase generator

positional arguments:
  length                Number of words

optional arguments:
  -h, --help            show this help message and exit
  -m MINWORDLEN, --minwordlen MINWORDLEN
                        Minimum word length
  -M MAXWORDLEN, --maxwordlen MAXWORDLEN
                        Maximum word length
  -n NUMPHRASES, --numphrases NUMPHRASES
                        Number of phrases to display
  -w WORDLIST, --wordlist WORDLIST
                        Path to wordlist
  -s SEPARATOR, --separator SEPARATOR
                        Word separator
  -l, --lower           Lowercase
  -u, --upper           Uppercase
  -c, --capitalize      Capitalize

randstr.py

usage: randstr.py [-h] [-d] [-a] [-x] [-s] [-l | -u] [length]

Simple command-line note taking app

positional arguments:
  length         Number of characters

optional arguments:
  -h, --help     show this help message and exit
  -d, --digit    Digits
  -a, --alpha    Alphas
  -x, --hexa     Hexadecimal
  -s, --special  Special
  -l, --lower    Lowercase
  -u, --upper    Uppercase

Examples

Generate a six-word passphrase
$ ./passphrase.py 6
Using word list at: /usr/share/dict/words
Total available words: 86382
'directories encampment cellphone tinkers obtuseness inhibition'
Generate a four-word capitalized passphrase with periods as separators
$ ./passphrase.py -c -s '.' 4
Using word list at: /usr/share/dict/words
Total available words: 86382
'Collar.Mandrel.Uncleaner.Sambaing'
Generate 10 passphrases with the default parameters
$ ./passphrase.py -n 10
Using word list at: /usr/share/dict/words
Supplied min/max word length parameters may reduce the sample space.
Final dictionary contains 86187 words
'windlasses atoll acuity disseminate'
'brett blintz wantonness eastward'
'eaters controversial cashmere gamuts'
'khmer rebidding denudes stephen'
'afghanistan helpless anacin vivian'
'authoritarianism ransoming gnostic spinal'
'contd protest wallboard whittles'
'biographer blowhard sheepishly nonalignment'
'powerboats personage subtraction banning'
'maintained proprietresses srinagar freeloading'
Specify a different wordlist
$ ./passphrase.py -w "/usr/share/dict/cracklib-small"
Using word list at: /usr/share/dict/cracklib-small
Total available words: 48221
'hopkins craters caches anthropology'
Generate a 15 digit password
$ ./randstr.py 15
=3IAgW7:Tb!ZXG?
Generate a password using only letters
$ ./randstr.py -a
IdsaBsyDlJ
Generate a 64 character hexadecimal password
$ ./randstr.py -x 64
2774ab418d2d1f9d39ca7310364e12d333b7c579b587c86a18cfdae0baf154d6

Testing

Tests require nose. Execution is simply nosetests.

passphrase-gen's People

Contributors

carterandrew avatar

Watchers

 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.