aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2010-12-31 01:55:55 +0100
committerStefan Kangas <stefankangas@gmail.com>2010-12-31 01:55:55 +0100
commitc96788477bd4be72c31bb2dc7602378c569706e8 (patch)
tree391a8b431ed646c5525aee1f3068e8f419648555
parentc1bf5f074f8c6c079445d836dcdaf7b9bbc911ea (diff)
Add option to generate SMD5 for command line argument
-rwxr-xr-xfripost-mkpass.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/fripost-mkpass.pl b/fripost-mkpass.pl
index fba5079..83a58ac 100755
--- a/fripost-mkpass.pl
+++ b/fripost-mkpass.pl
@@ -19,14 +19,16 @@ use Fripost::Password;
use String::MkPasswd qw/mkpasswd/;
# Generate password
-my $password = mkpasswd(
+my $password = $ARGV[0];
+
+$password //= mkpasswd(
-length => 20,
-minnum => 5,
-minspecial => 3
);
# Show the information that will be inserted
-say "Generated password: $password";
+say "Password: $password";
say "Salted MD5: " . smd5($password);
=head1 AUTHOR