17
3
Common words should still be avoided to be used as passwords. This challenge is about coding a very simple program that munges a given password (Modify Until Not Guessed Easily).
Input
A word, which is a string written in the alphabet abcdefghijklmnopqrstuvwxyz. It does not matter if the letters are lowercase or uppercase.
Munging
- Change any repeated sequence of a same letter to itself preceded by the number of times the letter was repeated (
LLLLwith4L) - Change the first
awith@ - Change the first
bwith8 - Change the first
cwith( - Change the first
dwith6 - Change the first
ewith3 - Change the first
fwith# - Change the first
gwith9 - Change the first
hwith# - Change the first
iwith1 - Change the second
iwith! - Change the first
kwith< - Change the first
lwith1 - Change the second
lwithi - Change the first
owith0 - Change the first
qwith9 - Change the first
swith5 - Change the second
swith$ - Change the first
twith+ - Change the first
vwith> - Change the second
vwith< - Change the first
wwithuu - Change the second
wwith2u - Change the first
xwith% - Change the first
ywith?
Rule 1 must be applied the needed number of times until it is not possible to apply it more. After that the rest of the rules are applied.
Output The munged word
Examples
codegolf-->(0639o1#programming-->pr09r@2m1ngpuzzles-->pu2z135passwords-->p@25uu0r6$wwww-->4uuaaaaaaaaaaa-->11alllolllolll-->3103io3ljjjmjjjj-->3jm4j
This is code-golf, so please make your program as short as possible!
Nothing in this post should be used as password ideas or as any part of password practices.
18The very fact that programs like this are possible means that the attacker could write them and munge the password (and try the various munges) just as easily (even easier because they often have access to better hardware). So just for safety's sake I will say: nothing in this post should be used as password ideas or as any part of password practices. – NH. – 2017-10-19T16:41:37.017
1I recommend making that disclaimer bold and duplicating it at the top. You can never be too careful... – wizzwizz4 – 2017-10-21T13:57:23.617