http://qs1969.pair.com?node_id=778436

sulfericacid has asked for the wisdom of the Perl Monks concerning the following question:

Hello again, Monks.

Some of you may remember my recent post regarding password solving. It worked, to some extent, but it gave me a good base on passwords in general.

I come again today to ask advice on another technique I'd like to try. I'd like to do a sequential scan to see if it will improve my last password solver by not producing duplicates.

You'll see my framework below. I'm mapping out each character to a set value (granted the list will be longer for A-Z, digits, special chars). My idea is to determine what the last character is and ++ it's value. Once it's value == the max number of characters in my %mapping, it'll set it's count back to 1 and it'll push the letter to the left up one character.

Ie:

... aay aaz aba abb
I'm trying to start with one digit "a" and try each character in my list, once each character is tested it'll prepend another character. From there it'll try all the combinations again and again thus trying every password combination from the characters given.

I'm having a problem getting the logic on paper. As this is a learning experience (and it REALLY is, I haven't used Perl intimately for almost 2 years now because my work switched my job around) I don't want someone to slap together code that will do the whole process. I'm just looking for advice/pointers on how to start making my iterations.

#!/usr/bin/perl use warnings; use strict; my $password = "pass"; my %mapping = ( "a" => "1", "b" => "2", "c" => "3", "d" => "4", "e" => + "5", "f" => "6", "g" => "7", "h" => "8", "i" => "9", "j" => "10", "k" = +> "11", "l" => "12", "m" => "13", "n" => "14", "0" => "15", "p" => "16", "q" => "17 +", "r" => "18", "s" => "19", "t" => "20", "u" => "21", "v" => "22", "w" => "23 +", "x" => "24", "y" => "25", "z" => "26" );


"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid