From a3684346f4d60715512c7ca30ba9fc7bb270c38e Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 3 Jun 2012 22:20:58 +0200 Subject: Merge everything into a single executable. --- fripost-mkpass | 64 ---------------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100755 fripost-mkpass (limited to 'fripost-mkpass') diff --git a/fripost-mkpass b/fripost-mkpass deleted file mode 100755 index 6728f74..0000000 --- a/fripost-mkpass +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/perl - -use 5.010_000; -use warnings; -use strict; -use utf8; - -=head1 NAME - -fripost-mkpass - Create a random new password, and returns its hash - -=head1 SYNOPSIS - -B [I] - -=head1 DESCRIPTION - -Use I if given, otherwise generate a random new password, and -print both the clear copy and a salted SHA-1 hash. - -=cut - -use FindBin qw($Bin); -use lib "$Bin/lib"; - -our $VERSION = '0.01'; - -use Getopt::Long qw /:config noauto_abbrev no_ignore_case - gnu_compat bundling permute nogetopt_compat - auto_version auto_help/; -use Pod::Usage; -use Fripost::Password; - -GetOptions( "man" => sub { pod2usage(-exitstatus => 0, - -verbose => 2) } - ) or pod2usage(2); - -# Generate password -my $password = $ARGV[0]; -$password //= mkpasswd(); - - -# Show the information that will be inserted -say "Password: " . $password; -say "Salted SHA-1: " . hash($password, SHA1, undef); - -=head1 AUTHORS - -Stefan Kangas C<< >> - -Guilhem Moulin C<< >> - -=head1 COPYRIGHT - -Copyright 2010,2011 Stefan Kangas. - -Copyright 2012 Guilhem Moulin. - -=head1 LICENSE - -This program is free software; you can redistribute it and/or modify it -under the same terms as perl itself. - -=cut -- cgit v1.2.3