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:

December 2022

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close