From c96788477bd4be72c31bb2dc7602378c569706e8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 31 Dec 2010 01:55:55 +0100 Subject: Add option to generate SMD5 for command line argument --- fripost-mkpass.pl | 6 ++++-- 1 file 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 -- cgit v1.2.3