mirror of
https://github.com/dmuth/diceware.git
synced 2025-04-22 12:19:04 +00:00
Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
|
f75b2afb32 | ||
|
8bb1d7c11e | ||
|
1dc0547ee0 | ||
|
0a93c9e8c4 | ||
|
965e503aec | ||
|
ab554dde7b | ||
|
dbb15f17ba | ||
|
dda4262bce |
10 changed files with 733 additions and 550 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
FROM node:20-bullseye-slim as builder
|
||||||
|
|
||||||
|
RUN mkdir /tmp/diceware
|
||||||
|
COPY . /tmp/diceware/
|
||||||
|
WORKDIR /tmp/diceware
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM nginx:1.25-bullseye
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/diceware/assets /usr/share/nginx/html/assets/
|
||||||
|
COPY --from=builder /tmp/diceware/dist /usr/share/nginx/html/dist/
|
||||||
|
COPY --from=builder /tmp/diceware/fonts /usr/share/nginx/html/fonts
|
||||||
|
COPY --from=builder /tmp/diceware/favicon.ico /usr/share/nginx/html/favicon.ico
|
||||||
|
COPY --from=builder /tmp/diceware/index.html /usr/share/nginx/html/index.html
|
||||||
|
COPY --from=builder /tmp/diceware/robots.txt /usr/share/nginx/html/robots.txt
|
||||||
|
|
||||||
|
RUN chmod -R a+rX /usr/share/nginx/html
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -186,7 +186,7 @@
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
Copyright 2015-2023 Douglas T. Muth
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
10
README.md
10
README.md
|
@ -91,6 +91,16 @@ A local webserver can be set up by running `npm install http-server -g` to insta
|
||||||
- `gh release upload v1.0.1 diceware.zip` to upload the ZIP file containing everything
|
- `gh release upload v1.0.1 diceware.zip` to upload the ZIP file containing everything
|
||||||
|
|
||||||
|
|
||||||
|
## Development In Docker
|
||||||
|
|
||||||
|
Wanna develop in Docker? We got you covered. Here are some helper scripts:
|
||||||
|
|
||||||
|
- `bin/docker-build.sh` - Build the Docker copntainer
|
||||||
|
- `bin/docker-dev.sh` - Run in dev mode--listening on http://localhost:8000/
|
||||||
|
- `bin/docker-prod.sh` - Run in prod mode--listening on http://localhost:80/
|
||||||
|
- `bin/docker-push.sh` - Push to Docker Hub
|
||||||
|
|
||||||
|
|
||||||
# Who built this? / Contact
|
# Who built this? / Contact
|
||||||
|
|
||||||
My name is Douglas Muth, and I am a software engineer in Philadelphia, PA.
|
My name is Douglas Muth, and I am a software engineer in Philadelphia, PA.
|
||||||
|
|
13
bin/docker-build.sh
Executable file
13
bin/docker-build.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Build our Docker image.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Errors are fatal
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Change to the parent directory of this script
|
||||||
|
pushd $(dirname $0)/.. > /dev/null
|
||||||
|
|
||||||
|
docker build -t diceware . -f ./Dockerfile
|
||||||
|
|
16
bin/docker-dev.sh
Executable file
16
bin/docker-dev.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Script to run the script in dev mode, which will spawn a shell
|
||||||
|
#
|
||||||
|
|
||||||
|
# Errors are fatal
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Change to the parent directory
|
||||||
|
pushd $(dirname $0)/.. > /dev/null
|
||||||
|
|
||||||
|
PORT=${PORT:=8000}
|
||||||
|
|
||||||
|
docker run --rm -it -p ${PORT}:80 -v $(pwd):/mnt diceware
|
||||||
|
|
||||||
|
|
13
bin/docker-prod.sh
Executable file
13
bin/docker-prod.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Script to run the script in prod mode
|
||||||
|
#
|
||||||
|
|
||||||
|
# Errors are fatal
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Change to the parent directory
|
||||||
|
pushd $(dirname $0)/.. > /dev/null
|
||||||
|
|
||||||
|
docker run --rm -p 80:80 diceware
|
||||||
|
|
15
bin/docker-push.sh
Executable file
15
bin/docker-push.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Push our Docker image our Docker Hub.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Errors are fatal
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Change to the parent directory of this script
|
||||||
|
pushd $(dirname $0)/.. > /dev/null
|
||||||
|
|
||||||
|
docker tag diceware dmuth1/diceware
|
||||||
|
docker push dmuth1/diceware
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,11 @@ set -e
|
||||||
|
|
||||||
pushd $(dirname $0) > /dev/null
|
pushd $(dirname $0) > /dev/null
|
||||||
|
|
||||||
|
echo "# Syncing files to AWS S3 bucket..."
|
||||||
aws s3 sync . s3://diceware.dmuth.org/ --exclude ".*" --exclude "node_modules/*" --delete
|
aws s3 sync . s3://diceware.dmuth.org/ --exclude ".*" --exclude "node_modules/*" --delete
|
||||||
|
|
||||||
|
echo "# Invalidating CloudFront cache..."
|
||||||
|
aws cloudfront create-invalidation --distribution-id E2TUL4ST85ZH5Y --paths "/*"
|
||||||
|
|
||||||
|
echo "# Done!"
|
||||||
|
|
||||||
|
|
25
index.html
25
index.html
|
@ -39,9 +39,6 @@
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<a id="github_ribbon" style="display: none; " href="https://github.com/dmuth/diceware"
|
|
||||||
><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
|
|
||||||
|
|
||||||
<div class="starter-template">
|
<div class="starter-template">
|
||||||
<h1>Diceware Password Generator</h1>
|
<h1>Diceware Password Generator</h1>
|
||||||
<p class="lead">
|
<p class="lead">
|
||||||
|
@ -222,7 +219,9 @@ That said, there's no reason that Diceware cannot be used concurrently with a pa
|
||||||
But I <em>also</em> happen to like passwords I can remember. :-)
|
But I <em>also</em> happen to like passwords I can remember. :-)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
If you want the absolute highest levels of password security, consider using <a href="https://strongboxsafe.com/">Strongbox</a>. One neat thing about Strongbox is that it comes with a built-in Diceware client!
|
If you want the absolute highest levels of password security, consider using <a href="https://strongboxsafe.com/">Strongbox</a>. One neat thing about Strongbox is that it comes with a built-in Diceware client!</p>
|
||||||
|
|
||||||
|
If you prefer insults in your passphrases, check out the <a href="https://cheswick.com/insults">Insult Passphrase Generator</a> by Ron Hardin. Each passphrase has ~42 bits of randomness.</p>
|
||||||
|
|
||||||
|
|
||||||
<h3>FAQ: What are some good use cases for Diceware?</h3>
|
<h3>FAQ: What are some good use cases for Diceware?</h3>
|
||||||
|
@ -351,20 +350,20 @@ For rolls of 5 dice, I am now using <a href="https://www.eff.org/deeplinks/2016/
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
I started off using <a href="http://world.std.com/~reinhold/diceware.wordlist.asc">the original wordlist</a>,
|
I started off using <a href="http://world.std.com/~reinhold/diceware.wordlist.asc">the original wordlist</a>,
|
||||||
but it contained a lot of symbols, punctuation, numbers, and 2 and 3 letter words. I wanted to try a different
|
but it contained a lot of symbols, punctuation, numbers, and 2 and 3 letter words that felt made
|
||||||
wordlist with longer words, no non-alphabetic characters, and words more commonly used. So then I tried
|
the passwords it generated <em>more</em> difficult to remember.
|
||||||
<a href="http://norvig.com/ngrams/">Peter Norvig's</a> list of <a href="http://norvig.com/ngrams/count_1w.txt"
|
|
||||||
>the 1/3rd million most frequently used words</a>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>FAQ: How many dice are rolled per word?</h3>
|
<h3>FAQ: How many dice are rolled per word?</h3>
|
||||||
|
|
||||||
The default is 5 dice, which allows for 7,776 different words per roll. While I have some debug hooks
|
<p>
|
||||||
in the code so that you can run Diceware with <a href="?dice=6">6 dice per word</a> and
|
The default is 5 dice, which allows for 7,776 different words per roll.
|
||||||
<a href="?dice=7">7 dice per word</a> (for 46,655 and 279,935 possible words, respectively), the words
|
|
||||||
used become more obscure, which makes them more difficult to remember, so I'm not entirely sure that is a good thing.
|
|
||||||
But for now, the functionality is there, if there is a desire for it.
|
|
||||||
|
|
||||||
|
I used to have functionality for 6 and 7 dice per word, that involved longer wordlists
|
||||||
|
and the words became increasingly obscure. I decided to remove that functionality because
|
||||||
|
I felt it made the product harder to use and <em>less</em> accessible to the typical user.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>FAQ: Is Air-gapped Operation Supported?</h3>
|
<h3>FAQ: Is Air-gapped Operation Supported?</h3>
|
||||||
|
|
||||||
|
|
1165
package-lock.json
generated
1165
package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue