Re: dictionary

From: Mark Ellzey (mark@rdi.st)
Date: 09/18/02


Date: Wed, 18 Sep 2002 12:15:13 -0400
From: Mark Ellzey <mark@rdi.st>
To: vuln-dev@securityfocus.com


I have written a quick perl program that will generate all possible
'words' for X number of chars, where X = a number supplied at the
arg, this is good for making dictionary lists of great size.

For other char sets just add to the @chars array.

#!/usr/bin/perl -w
# Word generator
# Mark Ellzey (mark@rdi.st) - 9/18/02

use strict;

my $how_many_words = $ARGV[0];
my @chars = qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/;
my %hash;
my $num_of_chars = @chars;

foreach my $char (@chars) {
        for(my $i = 1; $i <= $how_many_words; $i++) {
                push @{$hash{$char}}, $char;
        }
}

foreach my $entry (keys %hash) {
        my $word;
        foreach my $thing(@{$hash{$entry}}) {

                $word .= $thing;
        }
        print "$word\n";
        for(my $i = 1; $i <= $how_many_words-1;$i++) {
                change_array($i,$entry,$hash{$entry});
        }
}

sub change_array {
        my $offset = shift;
        my $letter = shift;
        my $array = shift;

        my @arrayz = @$array;

        foreach my $char (@chars) {
                next if $char eq $letter;
                #print "$letter - $char $offset\n";
                $arrayz[$offset] = $char;
                my $word;
                foreach my $thing (@arrayz) {
                        $word .= $thing;
                }
                print "$word\n";
                if($offset+1 != $how_many_words) {
                        change_array($offset+1,$char,\@arrayz);
                }
        }
}

On Tue, Sep 17, 2002 at 08:28:51AM +0000, alex hajii wrote:
> 70% of passwords "break" under a good dictionary attack.
> is anyone here familiar with a good dictionary database ?
> is there any already written software for this reason that is downloadable?
> thak U.
>
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>



Relevant Pages

  • Re: "sum A "vs "sum(A)"
    ... ML deals with function args in two different ways... ... % the function form ... % - takes the arg as DEFINED... ... % whereby CHARs are interpretedas DOUBLEs depending on the function... ...
    (comp.soft-sys.matlab)
  • Args limitations?
    ... I'm running in to a issue where I'm trying to use a arg for input from ... the command line the problem is the value for the arg has a! ... is there any way to get around this amnd are there any other special ... chars that I should not use or? ...
    (comp.lang.tcl)