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:

October 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close