Skip to content

Instantly share code, notes, and snippets.

@mschmitt
Created March 22, 2012 14:33
Show Gist options
  • Save mschmitt/2158666 to your computer and use it in GitHub Desktop.
Save mschmitt/2158666 to your computer and use it in GitHub Desktop.
The user hater's password generator. Have a lot of fun!
#!/usr/bin/perl -w
use strict;
use diagnostics;
my @normal_chars = qw(I 1 l 0 O);
my @special_chars = qw(| [ ]);
my $length = 12;
print "The user hater's password generator. Have a lot of fun!\n";
print "-------------------------------------------------------\n";
my $quality_passwords = 0;
while(1){
my $out;
for (my $j = 1; $j <= $length; $j++){
my @chars = @normal_chars;
if (($j > 1) and ($j < $length)){
@chars = (@chars, @special_chars);
}
$out .= $chars[rand(@chars)];
}
if ( ($out =~ /[a-z]/) and ($out =~ /[A-Z]/) and ($out =~ /\d/) and ($out =~ /\W/)){
$quality_passwords++;
printf "%2.2i) %s\n", $quality_passwords, $out;
}
last if ($quality_passwords >= 10);
}
@terrorobe
Copy link

The user hater's password generator. Have a lot of fun!
-------------------------------------------------------
01) lI0[0l|l[1I1
02) 1l]1O0O1O]00
03) 0OOl][]IOO]0
04) 0[OI0II0OOl0
05) 1]ll]O00I]1l
06) O|]|]|O0lI|I
07) O1Il[l|0[]l1
08) 1O0OI0[Il0Ol
09) 0IO]OIOl10Ol
10) 1]lI]Il|O0]0

@mschmitt
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment