For a few days I have been pondering over this problem now: I would like to
make a word-list making program that gives me every combination of 4 letter
passwords that are made up out of an array of ten characters (each
character has it's own place in the array, of course). How do I do this? I
haven't been able to find the answer myself, maybe someone could help me on
this one, please...
thanks!
You haven't really said clearly what you want, but I will guess that
you want all permutations (not combinations) of the ten characters
taken four at a time, with replacement, since order is significant in a
password.
The following fragment of code generates all 100 two-character
permutations. Entending it to four is left as homework. (Which is
what the original question sounds suspiciously like.)
my @chars = qw(A B C D E F G H I J);
foreach my $i (0..9) {
foreach my $j (0..9) {
print "$chars[$i]$chars[$j] ";
}
print "\n";
}
__END__
Output
AA AB AC AD AE AF AG AH AI AJ
BA BB BC BD BE BF BG BH BI BJ
CA CB CC CD CE CF CG CH CI CJ
DA DB DC DD DE DF DG DH DI DJ
EA EB EC ED EE EF EG EH EI EJ
FA FB FC FD FE FF FG FH FI FJ
GA GB GC GD GE GF GG GH GI GJ
HA HB HC HD HE HF HG HH HI HJ
IA IB IC ID IE IF IG IH II IJ
JA JB JC JD JE JF JG JH JI JJ
--
EBC
(snipped)
> For a few days I have been pondering over this problem now: I would like to
> make a word-list making program that gives me every combination of 4 letter
> passwords that are made up out of an array of ten characters
http://www.cc.gatech.edu/classes/AY2001/cs1050hon_spring/code/permute.html
Godzilla!
--
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net