#!/usr/bin/perl -w # by andrew wales $vowels="aeiouy"; $consonant="bcdfghjklmnpqrstvwxz"; $end="0123456789"; $saltchar="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; $times=$ARGV[0]||'1'; srand(); for (1..$times) { $pw=""; for (1..2) { $pw.=substr($consonant,rand(length($consonant)),1); $pw.=substr($vowels,rand(length($vowels)),1); $pw.=substr($consonant,rand(length($consonant)),1); } $pw.=substr($end,rand(length($end)),1); $pw.=substr($end,rand(length($end)),1); $salt=substr($saltchar,rand(length($saltchar)),1); $salt.=substr($saltchar,rand(length($saltchar)),1); print $pw," (",crypt($pw,$salt),")\n"; }