Improved repeat generation of master password suggestions.
This commit is contained in:
parent
c4abdb6d49
commit
39c6d5668a
@ -36,6 +36,7 @@ done
|
|||||||
template=${template:-${templates[$((RANDOM % ${#templates[@]}))]}}
|
template=${template:-${templates[$((RANDOM % ${#templates[@]}))]}}
|
||||||
|
|
||||||
|
|
||||||
|
while true; do (
|
||||||
printf 'sentence: '
|
printf 'sentence: '
|
||||||
while read -n1 character && [[ $character ]]; do
|
while read -n1 character && [[ $character ]]; do
|
||||||
category=${categoryByCharacter["$character"]}
|
category=${categoryByCharacter["$character"]}
|
||||||
@ -46,3 +47,7 @@ done <<< "$template"
|
|||||||
echo
|
echo
|
||||||
printf 'permutations: %s, entropy: ~%.1f bit\n' "$permutations" "$(bc -l <<< "l($permutations) / l(2)")"
|
printf 'permutations: %s, entropy: ~%.1f bit\n' "$permutations" "$(bc -l <<< "l($permutations) / l(2)")"
|
||||||
|
|
||||||
|
read -s -n 1 -p 'Generate another? [Yn]' && echo || break
|
||||||
|
[[ $REPLY = n ]] && break
|
||||||
|
); done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user