生成cvs用户密码的shell

发表于:2007-07-04来源:作者:点击数: 标签:
[root@test11 cvsroot]# cat cvs.sh
#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift; my $crypttext = crypt ($plaintext, $salt);
print "$\n";


原文转自:http://www.ltesting.net