#!perl use strict; use warnings; use Getopt::Long; use POE::Component::Server::IRC::Common qw(mkpasswd); use vars qw($VERSION); $VERSION = '1.40'; my $version; my $md5; my $apache; my $password; GetOptions( 'version', \$version, 'md5', \$md5, 'apache', \$apache, 'password', \$password ); if ( $version ) { print "$0 - version ", $VERSION, "\n"; exit 0; } die "No --password option specified\n" unless $password; $md5 = 0 if $md5 and $apache; my $crypt = mkpasswd( $password, md5 => $md5, apache => $apache ); print $crypt, "\n" if $crypt; exit 0; __END__ =head1 NAME pmkpasswd - Generate crypted passwords =head1 SYNOPSIS pmkpasswd --password moocow =head1 DESCRIPTION pmkpasswd is a little utility to generate crypted passwords for use with L C blocks. It is basically a wrapper for the C function provided by L. By default it produces passwords using perl's C function. The password is outputted on STDOUT. =head1 SWITCHES =over =item --version Prints the version number on STDOUT and exits. =item --password Mandatory switch, the plain-text password you wish to be crypted. =item --md5 Instead of using C, produce a MD5 crypted password. =item --apache Instead of using C, produce an Apache MD5 crypted password. =back =head1 AUTHOR Chris C Williams =head1 SEE ALSO L L L