‘XbhXgΦίι‘ S 1- 101- 201- 301- 401- 501- 601- 701- 801- 901- 1001- ΕV50
y½Ϊ―Δήz2^f¦Β »Μ7yΜΫ°Δ^z
- 469 F466 F03/03/23 07:35 ID:???
- my ($md5datefile, $date, $idnum, $random, $idcrypt);
$md5datefile = './md5.cgi';
$date = substr($DATE, 0, 8);
$idnum = substr($ENV{'REMOTE_ADDR'}, -6) . $FORM{'bbs'} . $date;
#$idnum =~ tr/a-zA-Z0-9_//cd;
if ( open(MD5FILE, '<'.$md5datefile) ) {
@my ($md5date, $md5number) = split(/<>/, <MD5FILE>);
@close(MD5FILE);
@$random = $md5number if ($md5date eq $date);
}
unless ($random) {
@my $data = '';
@sysopen(RANDOM, '/dev/urandom', 'O_READ') or &DispError('/dev/urandom ͺJ―Θ’I');
@sysread(RANDOM, $data, 8);
@close(RANDOM);
@open(MD5FILE, '>'.$md5datefile);
@flock(MD5FILE, 2);
@print MD5FILE "$date<>$data";
@close(MD5FILE);
@$random = $data;
}
chmod(0666, $md5datefile);
$idcrypt = substr(crypt($idnum, '$1$' . $random), -8);
$ID = " ID:$idcrypt";
186KB
V
XΜ\¦
XbhXgΦίι S O100 100 ΕV50
0ch BBS 2004-10-30