Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's part 2 of your idea prototyped in a shell script. It takes 4, 5 and 6 letter words (roughly 50,000) from the Unix dictionary file on your computer, and concatenate those words on the first character.</p> <pre><code>#! /bin/bash RANDOM=$$ WORDSFILE=./simple-words DICTFILE=/usr/share/dict/words grep -ve '[^a-z]' ${DICTFILE} | grep -Ee '^.{4,6}$' &gt; ${WORDSFILE} N_WORDS=$(wc -l &lt; ${WORDSFILE}) for i in $(seq 1 20); do password="" while [ ! "${#password}" -ge 8 ] || grep -qe"^${password}$" ${DICTFILE}; do while [ -z "${password}" ]; do password="$(sed -ne "$(( (150 * $RANDOM) % $N_WORDS + 1))p" ${WORDSFILE})" builtfrom="${password}" done word="$(sort -R ${WORDSFILE} | grep -m 1 -e "^..*${password:0:1}")" builtfrom="${word} ${builtfrom}" password="${word%${password:0:1}*}${password}" done echo "${password} (${builtfrom})" done </code></pre> <p>Like most password generators, I cheat by outputting them in sets of twenties. This is often defended in terms of "security" (someone looking over your shoulder), but really its just a hack to let the user just pick the friendliest password.</p> <p>I found the 4-to-6 letter words from the dictionary file still containing obscure words.</p> <p>A better source for words would be a written document. I copied all the words on this page and pasted them into a text document, and then ran the following set of commands to get the <em>actual</em> english words.</p> <pre><code>perl -pe 's/[^a-z]+/\n/gi' ./624425.txt | tr A-Z a-z | sort -u &gt; ./words ispell -l ./words | grep -Fvf - ./words &gt; ./simple-words </code></pre> <p>Then I used these 500 or so very simple words from this page to generate the following passwords with the shell script -- the script parenthetically shows the words that make up a password.</p> <pre><code>backgroundied (background died) soundecrazy (sounding decided crazy) aboupper (about upper) commusers (community users) reprogrammer (replacing programmer) alliterafter (alliteration after) actualetter (actual letter) statisticrhythm (statistical crazy rhythm) othereplacing (other replacing) enjumbling (enjoying jumbling) feedbacombination (feedback combination) rinstead (right instead) unbelievabut (unbelievably but) createdogso (created dogs so) apphours (applications phrase hours) chainsoftwas (chains software was) compupper (computer upper) withomepage (without homepage) welcomputer (welcome computer) choosome (choose some) </code></pre> <p>Some of the results in there are winners. </p> <p>The prototype shows it can probably be done, but the intelligence you require about alliteration or syllable information requires a better data source than just words. You'd need pronunciation information. Also, I've shown you probably want a database of good simple words to choose from, and not <em>all</em> words, to better satisfy your memorable-password requirement.</p> <p>Generating a single password the first time and every time -- something you need for the Web -- will take both a better data source and more sophistication. Using a better programming language than Bash with text files and using a database could get this to work instantaneously. Using a database system you could use the SOUNDEX algorithm, or some such.</p> <p>Neat idea. Good luck.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload