Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I had almost exactly the same situation happen. I had to produce activation codes just before Christmas. I was on my break, chilling at home when I got a text message asking if they could email me the bit of script so I could change it to remove the vowels. I complied and when I got back to the office after Christmas asked why.

Turns out that when you generate over a million random letter sequences some of them are rather fruity words. In fact my original code was being referred to as "the random f*k generator" lol



My solution to this was to pull down some lists of swear words and then forbid every single digraph that appeared on the lists. It eliminated something like 25% of the randomly generated tokens, but the ones that passed this check were pretty reliably un-wordlike.


You don't really need the vowels. I remember a windows license key that started with FCKGW.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: