#!/usr/local/bin/perl # ($NAME=$0) =~ s#.*/##; # get basename from $0 $salt="00"; if (@ARGV==2) { $salt=pop(@ARGV); } else { print "salt to use: "; chomp($salt=<>); } if (@ARGV==1) { $string=pop(@ARGV); } else { print "Input-String to crypt: "; chomp($string=<>); } $out=crypt($string, $salt); print "The crypt of [$string] with salt [$salt] is [$out]\n"; __END__ =head1 NAME crypt.pl - calculate the crypt-key of a string and given salt. =head1 SYNOPSIS crypt.pl =head1 DESCRIPTION If You want to use a password file for the apache webserver, You must maintain the crypted passwords. This script crypts the given passwort and a given salt and prints the key. Thats all. =head1 SEE ALSO crypt(1), crypt(3c) =head1 AUTHOR René Scholz E<lt>Voland@Jena.Thur.deE<gt> | htp://www.thur.de/~Voland/ =cut