User Tools

Site Tools


pwg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pwg [2026/03/30 01:59] – created stevepwg [2026/03/30 13:15] (current) steve
Line 39: Line 39:
 do do
     TorF=$(( RANDOM % 2 ))     TorF=$(( RANDOM % 2 ))
-    First=$(cat ${Self} | sed '1,/^#WORDS$/d' | shuf -n 1 )+    # Below deletes from the begining of the script up to and including 
 +    # the #WORDS line, then sends the rest of the lines to the shuf 
 +    # command that emits a single word. 
 +    First=$(sed '1,/^#WORDS$/d' ${Self} | shuf -n 1 ) 
 +    # Below is a bash builtin that capitalizes the first letter, so 
 + # word becomes Word.
         String=${First^}         String=${First^}
         while [ ${#String} -le ${Len} ]         while [ ${#String} -le ${Len} ]
Line 50: Line 55:
           String+="${Num:$(($RANDOM%${NumCnt})):1}"           String+="${Num:$(($RANDOM%${NumCnt})):1}"
           fi           fi
-   This=$(cat ${Self} | sed '1,/^#WORDS$/d' | shuf -n 1 )+   This=$(sed '1,/^#WORDS$/d' ${Self} | shuf -n 1 )
           String+=${This^}           String+=${This^}
         done         done
Line 65: Line 70:
 grep -E '^[A-Za-z]{3,5}$' /usr/share/dict/words >> pwg grep -E '^[A-Za-z]{3,5}$' /usr/share/dict/words >> pwg
 </code> </code>
-On my system, that produces a list of 10756 words, the password 'Puff%Bass0CATV_Claim6Sent' generated above has 94 bits of entropy, and is one of 10756 x 10 x 10756 x 10 x 10756 x 10 x 10756 x 10 x 10756. That's one password out of 1.4396*10^24. At 100 guesses per second, that's 456 trillion years if I did the math right.+On my laptop at home, that produces a list of 10756 words, the password 'Puff%Bass0CATV_Claim6Sent' generated above has 94 bits of entropy, and is one of 10756 x 10 x 10756 x 10 x 10756 x 10 x 10756 x 10 x 10756. That's one password out of 1.4396*10^24. At 100 guesses per second, that's 456 trillion years if I did the math right. 
 +\\ 
 +On a system at work, where I installed a larger dictionary, it's 42245 words! 
 +<code bash> 
 +## Type ↓ ↓ ↓, User stejon-admin in ~ on lnxv001 ## 
 +ls -Al /usr/share/dict/words ; sudo dnf whatprovides /usr/share/dict/linux.words 
 +lrwxrwxrwx 1 root root 11 2025-11-18+20:24:18 /usr/share/dict/words -> linux.words 
 +Last metadata expiration check: 0:02:23 ago on Mon 30 Mar 2026 09:10:52 AM EDT. 
 +words-3.0-39.el9.0.1.noarch : A dictionary of English words for the /usr/share/dict directory 
 +Repo        : @System 
 +Matched from: 
 +Filename    : /usr/share/dict/linux.words 
 +</code>
pwg.1774835983.txt.gz · Last modified: by steve