Skip to content

Commit

Permalink
Change default wordlist to short1, and default separator to -
Browse files Browse the repository at this point in the history
  • Loading branch information
micahflee committed Mar 27, 2022
1 parent cebb21b commit 33baf46
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ venv.bak/
.mypy_cache/
.dmypy.json
dmypy.json

# Other
.vscode
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,64 @@ pip3 install passphraseme

## Usage

Run `passphraseme` with a number to generate secure passphrases using EFF's
large wordlist, like this:
Run `passphraseme` with a number to generate secure passphrases using EFF's short wordlist, like this:

```
$ passphraseme 7
banana stopwatch appealing germinate survival retired comma
plug-scan-skate-shown-ritzy-self-bud
$ passphraseme 5
borrower harvest stature entity blimp
drank-amino-spoil-badge-copy
```

You can also optionally choose a different wordlist. Here are all of the command
line arguments:
You can also optionally choose a different wordlist. Here are all of the command line arguments:

| Short | Long | Description |
|-------------------|-----------------------------|-----------------------------------------------------------------------|
| `-h` | `--help` | show help message |
| | `--sep` | Separator (default " ") |
| `-s1` | `--short1` | Use EFF's general short wordlist |
| | `--sep` | Separator (default "-") |
| `-l` | `--large` | Use EFF's general large wordlist |
| `-s1` | `--short1` | Use EFF's general short wordlist (default) |
| `-s2` | `--short2` | Use EFF's short wordlist with unique prefixes |
| `-got` | `--game-of-thrones` | Use EFF's Game of Thrones wordlist (Passwords of Westeros) |
| `-hp` | `--harry-potter` | Use EFF's Harry Potter wordlist (Accio Passphrase!) |
| `-st` | `--star-trek` | Use EFF's Star Trek wordlist (Live Long and Passphrase) |
| `-sw` | `--star-wars` | Use EFF's Star Wars wordlist (The Passphrase Is Strong With This One) |
| `-d [dictionary]` | `--dictionary [dictionary]` | Custom wordlist filename |

For example, you can choose to use one of EFF's short wordlists, like this:
For example, you can choose to EFF's short wordlist with unique prefixes like this:

```
$ passphraseme -s1 5
glide canal flag sage those
$ passphraseme -s2 5
optical anonymous nirvana agitate feudalist
leftover-human-podiatrist-clergyman-elk
```

Or you can embrace your inner nerd and use a fandom wordlist:

```
$ passphraseme --game-of-thrones 5
crow betrayed severely gloating asked
skull-putting-twenty-aid-bluntly
$ passphraseme --harry-potter 5
mirror relief date future mysterious
summoning-jealous-loads-somehow-unregistered
$ passphraseme --star-trek 5
children refused captain cornwell vulcan
destroying-maximum-radiation-yells-causes
$ passphraseme --star-wars 5
unkar struggle names ally cantina
duels-zett-rock-silenced-blockade
```

You can also choose to use a custom wordlist, like this:

```
$ passphraseme -d /usr/share/dict/words 7
leading's Oz's caesareans lactate eloped interposed wowed
Sphinx's-congas-adjudge-revalue-scotched-decapitations-scampered
```

And if you prefer, you can use a custom separator, like `-` instead of ` `:
And if you prefer, you can use a custom separator, like ` ` or `.` instead of `-`:

```
$ passphraseme --sep - 5
ungreased-tried-broadcast-deduce-yield
$ passphraseme --sep " " 5
drown elder drown sport hula
$ passphraseme --sep . 5
parmesan.unkempt.budget.premiere.puritan
stage.stash.speak.shack.pound
```

## Strength of passphrases
Expand Down
9 changes: 7 additions & 2 deletions passphraseme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ def main():
metavar="sep",
nargs="?",
const=1,
default=" ",
default="-",
type=str,
help="Separator",
)
group = parser.add_mutually_exclusive_group()
group.add_argument(
"-l", "--large", action="store_true", help="Use EFF's general large wordlist"
)
group.add_argument(
"-s1", "--short1", action="store_true", help="Use EFF's general short wordlist"
)
Expand Down Expand Up @@ -92,6 +95,8 @@ def main():
"wordlists",
)

if args.large:
filename = os.path.join(wordlists_path, "eff_large_wordlist.txt")
if args.short1:
filename = os.path.join(wordlists_path, "eff_short_wordlist_1.txt")
elif args.short2:
Expand All @@ -105,7 +110,7 @@ def main():
elif args.star_wars:
filename = os.path.join(wordlists_path, "starwars-2018.txt")
else:
filename = os.path.join(wordlists_path, "eff_large_wordlist.txt")
filename = os.path.join(wordlists_path, "eff_short_wordlist_1.txt")

passphrase = generate(filename, args.word_count, args.sep)
print(passphrase)
Expand Down

0 comments on commit 33baf46

Please sign in to comment.