-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d5575ff
Showing
23 changed files
with
42,956 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dice-phrase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2024 Philip Southam | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
PYTHON := python3 | ||
PIP := pip3 | ||
TARGET_DIR := dice_phrase | ||
ZIPAPP_NAME := dice-phrase | ||
ENTRY_POINT := dice_phrase.main:app | ||
|
||
.PHONY: all install_deps build_zipapp clean | ||
|
||
all: install_deps build_zipapp | ||
|
||
install_deps: | ||
@echo "Installing dependencies..." | ||
$(PIP) install --upgrade --requirement requirements.txt --target $(TARGET_DIR) | ||
|
||
build_zipapp: | ||
@echo "Building the zipapp..." | ||
$(PYTHON) -m zipapp $(TARGET_DIR) -p "/usr/bin/env python3" -m $(ENTRY_POINT) -c -o $(ZIPAPP_NAME) | ||
|
||
clean: | ||
@echo "Cleaning up..." | ||
rm -f $(ZIPAPP_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Dice Phrase | ||
|
||
Dice Phrase is a portable and easy-to-install command-line passphrase generator emulates dice rolls to use with a word list to create secure, memorable passphrases. Inspired by the concept of Diceware, Dice Phrase is designed to produce passphrases that are both secure and easy to remember, making it an excellent tool for anyone looking to create easy to use passwords/passphrases. | ||
|
||
Frankly, I don't expect anyone but me to use this. I wanted something to use on the CLI so I built it. | ||
|
||
## Features | ||
|
||
- **Portable**: Comes as a single executable that you can run from anywhere on your system. | ||
- **Customizable**: Supports standard [EFF word lists](https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases) as well as [fandom-based lists](https://www.eff.org/deeplinks/2018/08/dragon-con-diceware) for more personalized passphrases. | ||
- **Secure**: Generates passphrases based on simulated dice rolls to ensure high entropy and security. | ||
- **Easy to Use**: Simple command-line interface that does not require any installation and very little setup. | ||
|
||
## Getting Started | ||
|
||
These instructions will get you a copy of the project up and running on your local machine for development, running, and testing purposes. | ||
|
||
### Prerequisites | ||
|
||
- Python 3.10+ | ||
- pip (Python package installer) | ||
|
||
### Installing | ||
|
||
Dice Phrase is distributed as a Python zipapp. To get started, you can build the zipapp using the provided `Makefile`. | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/philipsoutham/dice-phrase.git | ||
cd dice-phrase | ||
``` | ||
|
||
2. Build the zipapp: | ||
```bash | ||
make | ||
``` | ||
|
||
This will create a file named `dice-phrase`, which is an executable zip application. No put it in your `$PATH`, I suggest some place like `~/bin`. | ||
|
||
### Usage | ||
|
||
To generate a passphrase, simply run the executable with the desired options. To see the options: | ||
|
||
```bash | ||
$ dice-phrase --help | ||
``` | ||
|
||
#### Options | ||
|
||
- `--num-passphrases`: The number of passphrases to generate. [default: 1] | ||
- `--num-words`: The number of words to include in the passphrase. We suggest at least a six-word passphrase. [default: 6] | ||
- `--separator`: The separator to use between the words. For whitespace use ' '. [default: -] | ||
- `--include-a-number` OR `--no-include-a-number`: Include a number in the passphrase. [default: include-a-number] | ||
- `--include-a-capital` OR `--no-include-a-capital`: Capitalize one of the words in the passphrase. [default: include-a-capital] | ||
- `--word-list`: Which wordlist to use. [default: large] | ||
- `--colorize` OR `--no-colorize`: Colorize the output. [default: colorize] | ||
|
||
### Example(s) | ||
|
||
Default options | ||
|
||
```bash | ||
$ dice-phrase | ||
Caretaker-geologist56-stooge-unstitch-resonant-brought | ||
``` | ||
|
||
Using the Harry Potter fandom list | ||
|
||
```bash | ||
$ dice-phrase --num-words 7 --word-list harry-potter | ||
stolen-bludger-0kitchens-British-dancing-strikes-hufflepuff | ||
``` | ||
|
||
<!-- | ||
## Contributing | ||
|
||
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us. | ||
--> | ||
|
||
## Versioning | ||
|
||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/philipsoutham/dice-phrase/tags). | ||
|
||
## Authors | ||
|
||
- **Philip Southam** - *Initial work* - [philipsoutham](https://github.com/philipsoutham) | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. | ||
|
||
## Acknowledgments | ||
|
||
- Inspired by the [EFF Dice-Generated Passphrase](https://www.eff.org/dice) methodology. | ||
- OpenAI's ChatGPT 4 Turbo helped with the documentation, not the code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* | ||
!__main__.py | ||
!.gitignore | ||
!/dice_phrase |
Empty file.
Binary file not shown.
Oops, something went wrong.