exploit the possibilities
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:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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