Bored, I wrote a small program to generate a password dictionary, as a staged Summary of learning TCL.
You can generate any combination of dictchar characters and set the password length.
Use tclsh8.4 In Debian to pass the test.
#! /Usr/bin/tclsh
#*************************************** *********
# Password dictionary Generator
# Just for learning, by easwy, Mar 31,200 6
#
# Len-the length of password
#
# Return
# None, password group in file $ dictname
#*************************************** *********
Proc gendict {Len }{
# Chars in Password
Set dictchar "abcdefghijklmnopqrstuvwxyz"
# Count of chars
Set charcnt [String Length $ dictchar]
# Last item's index in array
Set last [expr "$ len-1"]
# Dictionary file name
Set dictname "passwd.txt"
# Initial array
For {set I 0} {$ I <$ Len} {incr I }{
Set a ($ I) 0
}
# Open dictionary file
Set dictfile [open "passwd.txt" W]
# Starting...
While {true }{
# Construct new passwd
Set passwd ""
For {set I 0} {$ I <$ Len} {incr I }{
# Append char which index is $ A ($ I) to passwd Str
Set passwd "$ passwd [String index $ dictchar $ A ($ I)]"
}
# Output passwd
Puts $ dictfile $ passwd
# Incr last Char's index
Incr A ($ last)
# Update all indices
For {set I $ last} {$ I> 0} {incr I-1 }{
If {$ A ($ I) >=$ charcnt }{
Set a ($ I) 0
Set ind [expr "$ I-1"]
Incr A ($ IND)
}
}
# Exit
If {$ A (0) >=$ charcnt} {break}
}
Close $ dictfile
}
# Generate passwd string, Len 3
Gendict 3