0: #! /usr/bin/perl -w
1: use strict;
2:
3: # Creates passwords from a customizable list of characters
4: # (To make it easier on users, don't use zero or capital 'O', for example)
5: #
6: # *Not* a completely security-conscious implementation, especially when
7: # generating multiple passwords at once...
8: #
9: # Change @Chars to suit your preference
10: # Change the inner for loop to determine password length
11: #
12: # Usage: $0 [Number of passwords to generate]
13:
14: my @Chars = split '',
15: 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789@#$%&*=+_<>?~';
16:
17: for (1..($ARGV[0] ||= 1)){
18: my $Password;
19: for (1..6){
20: $Password .= $Chars[rand @Chars];
21: }
22: print "$Password\n";
23: }
In reply to Another Password Generator by Russ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |