| Author |
Profanity checking, phonetically.
|
|
| shrike@cyberspace.org 2006-07-08, 6:58 pm |
| Howdy,
I have a randomly generated alphabetic string, and I need to profanity
check it, phonetically. I didn't see anything like this on CPAN.
Anybody done anything like this?
-Thanks in advance
-Matt
| |
| John Bokma 2006-07-08, 6:58 pm |
| "shrike@cyberspace.org" <shrike@cyberspace.org> wrote:
> Howdy,
>
> I have a randomly generated alphabetic string, and I need to profanity
> check it, phonetically. I didn't see anything like this on CPAN.
>
> Anybody done anything like this?
Soundex? And there is a better algorithm IIRC.
OTOH, why bother, people start using fsck, or f*kc etc.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
| |
| axel@white-eagle.invalid.uk 2006-07-08, 6:58 pm |
| John Bokma <john@castleamber.com> wrote:
> "shrike@cyberspace.org" <shrike@cyberspace.org> wrote:
[color=darkred]
[color=darkred]
[color=darkred]
> Soundex? And there is a better algorithm IIRC.
> OTOH, why bother, people start using fsck, or f*kc etc.
It sounds more that the OP does not want to annoy people by presenting
them with something like a randomly generated password which has
rude connotations... but of course this will very widely depending
on the recipient.
Axel
| |
| John Bokma 2006-07-08, 9:58 pm |
| axel@white-eagle.invalid.uk wrote:
> John Bokma <john@castleamber.com> wrote:
>
>
>
>
>
>
> It sounds more that the OP does not want to annoy people by presenting
> them with something like a randomly generated password which has
> rude connotations... but of course this will very widely depending
> on the recipient.
*hits self with Perl Cookbook*
Indeed, didn't read good.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
| |
| Sherm Pendley 2006-07-08, 9:58 pm |
| John Bokma <john@castleamber.com> writes:
> *hits self with Perl Cookbook*
>
> Indeed, didn't read good.
Try a smaller book next time - seeing double from a concussion isn't likely
to improve things. :-)
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
| |
| shrike@cyberspace.org 2006-07-09, 7:58 am |
|
Sherm Pendley wrote:
> John Bokma <john@castleamber.com> writes:
>
>
> Try a smaller book next time - seeing double from a concussion isn't likely
> to improve things. :-)
>
> sherm--
Unless your billing per line ;-)
Thanks all. I expected this to be oddball enough not to be in the
cookbook. The previous poster was correct: it is uid/password
combinations that I am checking.
Is this sort of thing common enough to bother adding a module to CPAN?
I expect to write a module specifically for this. I would call it
Text::Soundex::Profanity
-Opinions?
-Matt
| |
| David Squire 2006-07-09, 6:58 pm |
| shrike@cyberspace.org wrote:
[snip]
> Thanks all. I expected this to be oddball enough not to be in the
> cookbook. The previous poster was correct: it is uid/password
> combinations that I am checking.
>
> Is this sort of thing common enough to bother adding a module to CPAN?
> I expect to write a module specifically for this. I would call it
> Text::Soundex::Profanity
>
> -Opinions?
Hmmm. Seems like a lot of work to solve a very rare problem. I generate
random passwords using this:
sub makePassword {
my $PasswordLength = 10;
$PasswordLength = shift if @_;
my @Chars = split //,
'abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRS
TUVWXYZ23456789'; # note
excision of ambiguous characters
my $Password = '';
for (1..$PasswordLength) {
$Password .= $Chars[rand @Chars];
}
return $Password;
}
... which I picked up somewhere (here?) a few years ago and adapted. I
have yet to see one that looked pronounceable, let alone profane.
DS
| |
| Bill Smith 2006-07-09, 6:58 pm |
|
"David Squire" <David.Squire@no.spam.from.here.au> wrote in message
news:e8r2ag$fhr$1@gemini.csx.cam.ac.uk...
> shrike@cyberspace.org wrote:
>
> [snip]
> .. which I picked up somewhere (here?) a few years ago and adapted. I
> have yet to see one that looked pronounceable, let alone profane.
>
>
I suspect that users are much more likely to record a password if it is not
pronounceable. This can be a problem in some enviroments.
Bill Smith
| |
| anno4000@radom.zrz.tu-berlin.de 2006-07-10, 3:59 am |
| David Squire <David.Squire@no.spam.from.here.au> wrote in comp.lang.perl.misc:
> shrike@cyberspace.org wrote:
>
> [snip]
>
>
> Hmmm. Seems like a lot of work to solve a very rare problem. I generate
> random passwords using this:
>
> sub makePassword {
>
> my $PasswordLength = 10;
> $PasswordLength = shift if @_;
>
> my @Chars = split //,
> 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRS
TUVWXYZ23456789'; # note
> excision of ambiguous characters
> my $Password = '';
> for (1..$PasswordLength) {
> $Password .= $Chars[rand @Chars];
> }
> return $Password;
> }
That's improvable. The generation of the character array can be taken
out of the sub so it doesn't happen each time the sub is called. The
remainder can be compacted:
{
# note excision of ambiguous characters
my @Chars = split //,
'abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRS
TUVWXYZ23456789';
sub makePassword {
return join '', @Chars[ map rand @Chars, 1 .. shift || 10];
}
}
> .. which I picked up somewhere (here?) a few years ago and adapted. I
> have yet to see one that looked pronounceable, let alone profane.
Like with all safety measures, the impact of a breach must be weighed
against the expenditure of implementation. If you are running a porn
site your conclusion may be different than when you represent the
holy see.
Anno
| |
| shrike@cyberspace.org 2006-07-10, 7:58 am |
|
Bill Smith (use net) wrote:
> "David Squire" <David.Squire@no.spam.from.here.au> wrote in message
> news:e8r2ag$fhr$1@gemini.csx.cam.ac.uk...
>
> I suspect that users are much more likely to record a password if it is not
> pronounceable. This can be a problem in some enviroments.
>
> Bill Smith
In my case neither is a factor.
Once my passwords are issued they only authenticate for a few hours,
and parrallel sessions and CPU usage are controlled on a per-user
basis. Users can advertise their passwords on the side of a bus for all
I care.
But I would rather avoid commiting the faux pas of issueing a username
like "pckrhd". Of course the number of concievable iterations makes
such a thing virtually inevitable as the number of logins scales. But I
can try, which is all that is required.
I was amazed out how difficult it was to find raw profanity lists on
the internet. I found one or two very incomplete ones. I have made the
module. It was about 16 lines of perl and 200 lines of profanity. It
has been quite a funny excercise. The profanity list on Wikipedia for
example had me laughing so hard I nearly cried.
-Thanks everyone for your help!
-Matt
| |
| Stephan Titard 2006-07-10, 6:59 pm |
| shrike@cyberspace.org escribió:
> Sherm Pendley wrote:
>
> Unless your billing per line ;-)
>
> Thanks all. I expected this to be oddball enough not to be in the
> cookbook. The previous poster was correct: it is uid/password
> combinations that I am checking.
>
> Is this sort of thing common enough to bother adding a module to CPAN?
> I expect to write a module specifically for this. I would call it
> Text::Soundex::Profanity
>
> -Opinions?
> -Matt
>
o Text::Metaphone::* using the new shiny soundex
I did not try it but I remember it looked interesting...
at least I have an entry in my perl module notebook
hth
--stephan
| |
| bpontarelli@gmail.com 2006-07-26, 6:59 pm |
| You could try this, but you have to buy it. I don't know of anything
else out there that has a clean enough list for most applications. Some
have hundreds of thousands of words, most of which are not really
profanity and others have only a few dozen words (like WikiPedia). This
has around 500 english words, 1000 misspellings, ratings, types, and
regular expressions. The link is:
http://badwords.inversoft.com
The regular expressions will help you out quite a bit I think.
Cheers,
-bp
shrike@cyberspace.org wrote:
> Howdy,
>
> I have a randomly generated alphabetic string, and I need to profanity
> check it, phonetically. I didn't see anything like this on CPAN.
>
> Anybody done anything like this?
>
> -Thanks in advance
> -Matt
|
|
|
|