what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Password Generation Script

Password Generation Script
Posted Dec 7, 2011
Authored by Richard Braganza

This is a perl script that generates a list of passwords from user-supplied input on the command line. It enables a tester the ability to create various permutations of a given password for testing.

tags | cracker, perl
SHA-256 | 1eb229f6f284423c21b8d973d32dc10130512598abb5cd7062d67dedcbc04955

Password Generation Script

Change Mirror Download
Please find in-line a simple re-entrant perl script that generates a list
of passwords from an input supplied on the command line. The script will
generate on a new line for every variation of the input word. The number of
new words created is based on the characters the script is allowed to
replace within the word. It also adds by default capitals.

For example if the script's table has only the following entry in the %leet
table:

'a' => '4'

then the script will take the word given on its command line and generate
list where any 'a' in the word are replaced with either 'a', 'A' or '4'
therefore passing the word 'password' to the script will return the
following variants:

password
pAssword
p4ssword

please feel free to alter the default table of characters to include
variants for your locale e.g. adding € for e etc

The script is supplied as is without warranty and only released for use in
auditing where you have permission. I hope you find the script useful and I
welcome any feedback
===================================================================================================
#!perl -w

my %leet = (
a => [qw( a 4 /-\ @ A )],
b => [qw ( b |3 6 B )],
c => [qw! c ( < [ C !],
d => [qw! d D !],
e => [qw( e 3 E )],
f => [qw( f F )],
g => [qw( g 6 G )],
h => [qw! h |-| )-( H !],
i => ['i', '!' ,"1", "I" ],
j => ['j', "J" ],
k => [qw( k |< |c ]{ K )],
l => [ 'l', "1", "|", "L" ],
m => [ 'm', "|V|", "|\\/|", "M" ],
n => ["|\\|", "n", "N"],
o => [ 'o', "0", "O"],
p => [ 'p', "P", "9"],
q => [ 'q', "Q"],
r => [ 'r', "R"],
s => [ "5", "Z" ,"s", "S"],
t => [ "7", "+","t","T" ],
u => [qw( u \_/ U )],
v => [qw( v \/ V )],
w => [qw( vv `// w W)],
'x' => ['x', 'X'],
'y' => ['j', '`/', 'y', 'Y'],
z => ["2", 'z','Z'],
);

my $password = <>;
chomp $password;

my @passwords;
my @l=split //, lc $password;

my $len = length $password;
my $p="";

sub variants
{
my $col = shift;
my $ind = shift || "";
my $org = "";
if ($col && $col < $len)
{
$org=$ind;
}

if ($col >= $len )
{
#print "\n";
push @passwords,$p;
$p="";
return;
}
unless ( defined $leet{$l[$col]}[0] )
{
$leet{$l[$col]}[0] = $l[$col]; # we don't have a match in
leet table so pass it through
}
for ( my $k=0; $k<scalar @{$leet{$l[$col]}} ; $k++)
{
if ($col +1==$len)
{
# print "$org$leet{$l[$col]}[$k]";
$p.="$org$leet{$l[$col]}[$k]";
}
variants($col+1, "$org$leet{$l[$col]}[$k]");
}
}
variants (0);
foreach (@passwords)
{
print "$_\n";
}

Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close