• Stars
    star
    211
  • Rank 186,867 (Top 4 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate secure passwords you can actually remember!

Diceware

Feel free to check out the live version at https://diceware.dmuth.org/

Weak passwords are a big flaw in computer security due to a lack of "entropy" or randomness. For example, how many times have you used the name of a pet or relative or street in a password, or perhaps the number "1". Not very random, is it? :-) Worse still, if passwords are reused between services, that increases your security risk.

Fact is, humans are terrible at remembering random combiations of letters and numbers, but we are great at remembering phrases of words. That's where Diceware comes in.

Diceware is based on the proposal at http://world.std.com/~reinhold/diceware.html wherein virtual dice are roled 5 times, and the 5 digit number used against a lookup table of words. 4 dice rolls gives you 4 random words which are easy for a human being to remember, yet have a high amount of entropy which makes them hard to crack.

For more information on Diceware:

Can I run this on my own computer without using your website?

Yes! Go to https://github.com/dmuth/diceware/releases and download the latest diceware.zip file. When you unzip that file, the contents will be written to a directory called diceware/. You can then point a webserver on your machine to diceware/index.html in order to use Diceware.

Sadly, you cannot open diceware/index.html directly, as the CORS policy in Chrome prevents that. If you know of a way to fix that, please open an issue. :-)

Will this work on an iPhone?

Yep! It should work on any mobile phone or tablet that supports Javascript, but I have only tested it on an iPhone 5S at this time.

Will this work in an air-gapped environment?

Yes, copies of assets such as Bootstrap and jQuery have been made, and Diceware can now be run without requiring an Internet connection.

Development

This app is built with Webpack.

When done editing main.js, the packed file can be built by simply running webpack on the command line. It will be writing to dist/bundle.js. To run webpack in a mode so that it regularly checks for changed files, run webpack --watch --mode development.

In a move that departs from Best Practices, I have made the decision to include the packed file in Git. My reason for this is that the software will be ready to run as soon as it is checked out (or a ZIP is downloaded), and that is a key design feature of this app--I want it to be as easy to get up and running as possible.

A local webserver can be set up by running npm install http-server -g to install it, then http-server to listen on http://localhost:8080/

In summary:

  • Development
    • npm run clean - Cleanup after a previous run
    • npm install - Install NPM packages used by Diceware
    • npm run dev-build - Run webpack to pack Javascript files and watch for changes.
    • http-server
    • vim src/lib.js src/index.js
      • Be sure to check in your changes before the next step!
  • Testing
    • rm -fv src/index.js && git co src/index.js - Get the new SHA1 hash that will be displayed in debug messages.
      • The hash can be crosschecked with the results of git hash-object src/index.js
    • npm test - Make sure you didn't break any of the core logic!
    • npx cypress run - Run front-end testing
      • If the tests break, run npx cypress open to run tests interactively.
  • Deployment
    • npm run build - Webpack Javscript files in production mode (smaller file but takes longer)
    • ./go-sync-to-s3.sh - Do this if you're me, to upload to S3. If you're not me, you'll need to do something else, or possibly nothing at all.

In practice:

  • npm run clean; npm run dev-build - Run webpack in dev mode while working on Javascript
    • http-server - Stand up a local HTTP server
    • vim src/lib.js src/index.js
    • rm -fv src/index.js && git co src/index.js
  • npm run clean; npm run build - Run webpack in prod mode to produce final Javascript bundle
  • ./go-sync-to-s3.sh - Do this if you're me, to upload to S3. If you're not me, you'll need to do something else, or possibly nothing at all.

Releasing a New Build

  • npm run release-build to create the ZIP file diceware.zip with all assets in it, including bundle.js and the contents of node_modules/.
  • gh release create v1.0.1 to upload a release to https://github.com/dmuth/diceware/releases.
    • Change the tag for the version number accordingly.
  • gh release upload v1.0.1 diceware.zip to upload the ZIP file containing everything

Who built this? / Contact

My name is Douglas Muth, and I am a software engineer in Philadelphia, PA.

There are several ways to get in touch with me:

Feel free to reach out to me if you have any comments, suggestions, or bug reports.

More Repositories

1

evernote-to-obsidian

Wrapper for the Yarle app to make converting Evernote notebooks to Markdown easier
Shell
165
star
2

splunk-lab

Learn Splunk by creating a lab instance in seconds. Includes Eventgen and Splunk's Machine Learning app!
Shell
85
star
3

IsSeptaFcked

Real-time status for Philadelphia Regional Rail
JavaScript
54
star
4

git-rebase-i-playground

A playground/lab to test different use cases of git rebase -i
HTML
48
star
5

wordpress-with-nginx-and-letsencrypt

Install WordPress in Docker with Nginx, PHP-FPM, and LetsEncrypt for HTTPS!
Shell
45
star
6

fastapi-httpbin

HTTP Endpoints for easy testing of your app.
Python
28
star
7

cat-crawler

A webcrawler I wrote in Golang that I can use to find and download cat pictures.
Go
28
star
8

grafana-playground

Learn Grafana quickly by spinning up an instance with Prometheus and Loki to test your Internet connection quickly and painlessly.
Python
26
star
9

splunk-telegram

Splunk messages from Telegram groups
Shell
24
star
10

splunk-network-health-check

A Dockerized Splunk app to monitor your Internet connection
Shell
21
star
11

google-go-cpu-usage

A package to test CPU performance in GoLang across multiple cores.
Go
21
star
12

google-go-monte-carlo

A Monte Carlo simulation written in GoLang as a way to "get my feet wet" with the language.
Go
17
star
13

s3-disk-usage

Report S3 disk usage stats, including revisions and deleted files
Python
16
star
14

twitter-aws-comprehend

An app to analyze tweets using Amazon Comprehend's Sentiment Analysis service
Python
16
star
15

ssh-principal-and-ca-playground

Dockerized setup of SSH with a Certificate Authority and Principals configured
Shell
15
star
16

SeptaStats

Real-time dashboards, graphs, and analytics for Philadelphia's Regional Rail train system.
PHP
15
star
17

nginxtop

UNIX top-like app for nginx (or Apache, if you wish) access logs.
JavaScript
14
star
18

tarsplit

A utility to split tarballs into smaller pieces while keeping files intact.
Shell
12
star
19

zfs-playground

Learn ZFS the easy way with this lab environment where disk failures and corruption can be simulated!
Shell
11
star
20

unix-utils

Random shell scripts and whatnot that I'd like to share
Shell
10
star
21

rsync-obsidian-to-icloud

Bash scripts to rsync an Obsidian Vault to iCloud and back
Shell
9
star
22

aws-lambda-copy-s3-file-uploads

AWS Lambda code to copy files uploaded to S3 to another bucket for safekeeping
JavaScript
8
star
23

chef-101-introduction-to-chef

Sample Chef cookbook and recipe that I created for a blog post on Chef
HTML
8
star
24

musicbot-docker

A Dockerfile for the Discord Musicbot
Shell
7
star
25

dns-tool

A DNS packet creation tool I wrote
Python
7
star
26

aws-s3-server-access-logging-rollup

A Python script to perform regular rollup of AWS S3 Server Access Logs
Python
7
star
27

ansible-btsync

An Ansible Playbook and roles for setting up BitTorrent Sync on Digital Ocean
Shell
6
star
28

facebook-group-leaderboard

Node.js app to get leaderboards and other stats for 1 or more Facebook groups
JavaScript
6
star
29

google-go-log4go

A log4j analogue for GoLang.
Go
6
star
30

anthrocon-reg

Convention Memebership Registration System. To date, it has processed over $1 Million in registration revenue across a number of conventions.
PHP
6
star
31

ticket-sales

A proof of concept node.js server I put together to handle locking and claiming of seats at an event.
JavaScript
4
star
32

neural-network

A demo of how to use a Neural Network in Node.js
JavaScript
4
star
33

docker-in-vagrant

Alternative to Docker Desktop for Mac. This project lets you deploy Docker inside of a Vagrant VM in Virtualbox.
Shell
4
star
34

twitter-sentiment-analysis

Perform sentiment analysis for Twitter keywords with AWS Comphrehend and Splunk
Python
4
star
35

Splunk4Docker

Don't use this anymore, use splunk-lab instead: https://github.com/dmuth/splunk-lab
Shell
4
star
36

splunk-osx-magic-mouse-battery

A Splunk App to track the battery level of your Apple Magic Mouse
Shell
3
star
37

docker-remove-dependent-child-images

Script to remove dependent child images of a Docker Container
Shell
3
star
38

procedural-webserver

A webserver written in GoLang which serves up procedurally generated content.
Go
3
star
39

fivestarstats

Generate statistics on ratings made with the Drupal module "fivestar"
PHP
2
star
40

golang-stats

Stats package for Golang
Go
2
star
41

guestbook

A sample guestbook app I wrote in PHP for an interview. Part of the requirements involved NOT using any frameworks, so I created my own architecture from the ground up.
PHP
2
star
42

Dougs-Drupal-Templates

Some nifty Drupal templates for websites I run
PHP
2
star
43

anthrocon-hotel-countdown

Code for the Anthrocon Hotel Countdown Timer screen that I used on the website for our 2013 convention.
PHP
2
star
44

MusicBot-Ansible

Ansible Playbook to install the Discord Musicbot
2
star
45

docker-health-check

Simple Health Check for Docker
Shell
2
star
46

anthrocon_dealers

Code for handling dealer registrations on our website
PHP
2
star
47

Drupal-Chatroom

A fork/fix of the chatroom module for Drupal.
JavaScript
1
star
48

mac-osx-ram-usage

Uses Splunk and Docker to get a real-time look at OS/X Ram Usage
Shell
1
star
49

chef

My Chef recipes for creating a development Vagrant box
Ruby
1
star
50

undertale-deltarune-resources

Undertale and Deltarune Resources
1
star
51

anthrocon_webform

Saner downloads of webform data in Drupal
PHP
1
star
52

twitter-account-metrics-bot

App to pull down tweet activity from specific accounts and send to Telegram via a bot
Python
1
star
53

dmuth.github.io

Jekyll repo for CheetahFacts.com
HTML
1
star
54

zooyan_stats_user

A sample Drupal module that I put together as part of my interview process at the now defunct Zooyan.
PHP
1
star
55

splunk-modem-monitor

A Splunk app to monitor your Arris TG852G cable modem.
PHP
1
star
56

docker-check-disk-usage

A docker container to check disk usage and send alerts to Slack
Shell
1
star
57

splunk-aws-s3-server-accesslogs

Generate Splunk Dashboards for your AWS S3 Server Access Logs
Shell
1
star
58

Dougs-Drupal-Tools

This Drupal 6 module contains tools that I put together for some Drupal-powered sites that I manage.
PHP
1
star
59

splunk-twint

Dockerized version of Twint with some Splunk Integration
Shell
1
star
60

another-circuit-breaker

This Node.js module implements the "Circuit Breaker" pattern, which is used to detect failures and prevent a failure from occurring regularly.
JavaScript
1
star
61

splunk-glassdoor

Splunk app to graph Glassdoor reviews of companies
Shell
1
star
62

grafana-network-monitor

Monitor Connectivity to Various Hosts on the Internet
Shell
1
star