Random passwords generation (Python vs Perl) =)

Magnus Lycka lycka at carmen.se
Thu Feb 1 08:04:40 EST 2007


NoName wrote:
> Perl:
> @char=("A".."Z","a".."z",0..9);
> do{print join("", at char[map{rand @char}(1..8)])}while(<>);

If you generate passwords like that to normal computer
users, you'll end up with a lot of "my password doesn't
work" tickets. You should skip the symbols that are
easy to mistake for each other.

Skip at least Il1 and 0O. On the other hand, you could
probably use other characters besides letters and digits
to make the passwords stronger. Which ones to use is
unfortunately platform dependent.



More information about the Python-list mailing list