1: #Here's a quicky password generator sub.
2: #Great for account creation
3: # Usage: my $Password = Pass();
4:
5: sub Pass
6: {
7:
8: my $Num;
9: my $Other;
10: my $Pass = "";
11:
12: foreach $Num (1..8)
13: {
14: $Other = rand 122;
15: $Other =~ s/\..*//; #ditch the decimal part
16: while ( ($Other < 48)
17: || (( $Other > 57) && ( $Other < 65))
18: || (( $Other > 90) && ( $Other < 97)))
19: {
20: $Other = rand 122;
21: $Other =~ s/\..*//; #ditch the decimal part
22: }
23:
24: $Pass = $Pass . chr $Other;
25: }
26: return($Pass);
27: }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Quicky password sub
by kayos (Sexton) on May 02, 2000 at 18:45 UTC | |
by chromatic (Archbishop) on May 02, 2000 at 19:07 UTC | |
by turnstep (Parson) on May 02, 2000 at 22:42 UTC | |
by buzzcutbuddha (Chaplain) on May 02, 2000 at 21:31 UTC | |
|
RE: Quicky password sub
by PipTigger (Hermit) on May 04, 2000 at 22:02 UTC |