#!/afs/athena/contrib/perl/perl

while(@ARGV) {print crypt(shift(@ARGV), &salt),"\n";}

sub salt {
    $n=1;
    $a=sprintf("%c", 47+(time%76));
    while ($a !~ /[a-zA-Z0-9\.\/]/) {
	$a=sprintf("%c", 47+((time<<++$n)%76));
    }
    $n=0;
    $b=sprintf("%c", 47+(int(time/6.34)%76));
    while ($b !~ /[a-zA-Z0-9\.\/]/) {
	$b=sprintf("%c", 47+((int(time/6.34)<<++$n)%76));
    }
    "$a$b";
}
