]> pere.pagekite.me Git - homepage.git/blob - linux/make-cvs-pwhash.pl
Switched blog to hungry.com for now. Updated all links.
[homepage.git] / linux / make-cvs-pwhash.pl
1 #!/usr/bin/perl
2 #
3 # Author: Petter Reinholdtsen <pere@td.org.uit.no>
4 # Date: 2000-06-29
5 #
6 # Simple quick and dirty CVS pserver password hash generator. Based
7 # on source from Andreas Rick.
8
9 if ($#ARGV<1) {
10 print "\nUSAGE: $0 <username> <password>\n\n";
11 exit;
12 }
13
14 sub scramble {
15 my ($password, $enc) = @_;
16 return crypt($password,$enc);
17 }
18 my $username = $ARGV[0];
19 my $password = $ARGV[1];
20 my $try = scramble($password, scramble($password, $username));
21
22 print "$username:$try:cvs\n";