#!/usr/local/bin/perl # DES で crypt 済のパスワード $des_crypted_password = 'ABS5SGh1EL6bk'; # MD5 で crypt 済のパスワード $md5_crypted_password = '1ドル$AB$qHArPuqikDNZFVs6JTunC1'; $salt = 'AB'; print "Content-type: text/html\n\n"; print "
\n";
print "\$des_crypted_password = '$des_crypted_password'
\n";
print "\$md5_crypted_password = '$md5_crypted_password'
\n";
if ( crypt($FORM{'password'},$salt) eq $des_crypted_password ){
print "ユーザ認証 OK です。このホストの crypt 方式は DES です。\n";
} elsif ( crypt($FORM{'password'},$salt) eq $md5_crypted_password ){
print "ユーザ認証 OK です。このホストの crypt 方式は MD5 です。\n";
} else {
print "パスワードが違います。\n";
}
}
# 自分自身のファイル名を取得
$script_name = $ENV{SCRIPT_NAME};
$script_name =~ s|.*/([^/]+)$|1ドル|;
print <