atoponce/webpassgen

Pre-hyphenated words lose their hyphen

Closed this issue · 0 comments

Consider the following passphrase created from the Beale wordlist in the Diceware container:

privy m-16 suit saul fact kicks ooze

When checking the "Hyphenate" box, the passphrase then becomes:

privy-m-16-suit-saul-fact-kicks-ooze

If un-checking the "Hyphenate" box, the hyphen in the "m-16" word is lost:

privy m 16 suit saul fact kicks ooze

Probably the best way to fix this, is before un-hyphenating the passphrase, to check for hyphenated words in the selected wordlist, store any matches in a variable, and after removing all the hyphens, to restore the hyphenated word to its correct location.