Password generator II
My last post about password generator , Warpboy's wordlistGenerator present an more effective way for looping.
alphanumeric
my $var = (('A'..'Z'),(1-9));
mixalpha
my $var = (('A'..'Z'),('a'..'z'));
upperAlpha
my $var = ('A'..'Z');
lower Alpha
my $var= ('a'..'z');
lalpha-smybol
my @var = (('a'..'z') ,(0..9),'!','@','#','$','%','^','&','*','(',')','-','_','+','=');
digit
my $var=(1..9);
all
my @char = (('A'..'Z'), (0..9),'!','@','#','$','%','^','&','*','(',')','-','_','+','=','~','`','[',']','{','}','|', "/", ":" ,";",'"',"'",'<','>',",",".","?","/");
My code:
for($i=65;$i<=122;$i++){ print ","; print "\"".chr($i)."\""; } Then the rest of his idea is fairly simple and nice $charset = chomp(
$inputted = chomp(
$len = Length(
$ran = $#var +1; #counter
foreach(1..$inputed){
for(1..int($a)){
$p=$char[int(rand($ran))];
print pa $p; #pa - file handler
}
}
No comments:
Post a Comment