|
[³o½g¤å³¹³Ì«á¥Ñ¤p«B¦b 2007/06/23 00:43am ²Ä 1 ¦¸½s¿è]-r3'5 ©¹p¶ÆÁcÅ餤¤åºô -- ¹p¶Æ±MÄݰQ½×ºô¡A±´°Q¤@¤Á¦³Ãö¹p¶ÆÁcÅ骩¥»ªº¬ÛÃö°ÝÃD»P§Þ³N¤ä´©¡I¡@¡@ ZBkV
#!/usr/bin/perl ##################################################### # ÁcÅ餤¤å»y¨t¥Ñ auron ºûÅ@»s§@ # ##################################################### # LEO SuperCool BBS / LeoBBS X / ¹p¶Æ·¥»Å¶W¯Å½×¾Â # ##################################################### # °ò©ó¤sÆN(½k)¡BªáµL¯Ê»s§@ªº LB5000 XP 2.30 §K¶Oª© # # ·sª©µ{¦¡»s§@ & ª©Åv©Ò¦³: ¹p¶Æ¬ì§Þ (C)(R)2004 # ##################################################### # ºô¯¸¦ì§}¡G http://www.LeoBBS.com/ # # ½×¾Â¦ì§}¡G http://bbs.LeoBBS.com/ # ##################################################### BEGIN { $startingtime=(times)[0]+(times)[1]; foreach ($0,$ENV{'PATH_TRANSLATED'},$ENV{'SCRIPT_FILENAME'}){ my $LBPATH = $_; next if ($LBPATH eq ''); $LBPATH =~ s/\\/\//g; $LBPATH =~ s/\/[^\/]+$//o; unshift(@INC,$LBPATH); } } use LBCGI; $LBCGI::POST_MAX = 200000; $LBCGI::DISABLE_UPLOADS = 1; $LBCGI::HEADERS_ONCE = 1; $LeoBBS_E_CHT = "§@"; $LeoBBS_J_CHT = "»~"; $LeoBBS_L_CHT = "Ä~"; $versionnumber = "LeoBBS X Build060331"; $|++; $query = new LBCGI; $action = $query->param('action'); $mypath = mypath(); # ªð¦^¥Ø«eªºµ´¹ï¸ô®| (¥¿½T) ³Ì«á¨S¦³ / $myurl = myurl(); # ªð¦^¥Ø«eªº URL ¸ô®| (¥¿½T) ³Ì«á¨S¦³ / ($html_dir, $html_url) = split(/\|/,myimgdir()); # ªð¦^¥Ø«e¹Ï¹³¥Ø¿ýªºµ´¹ï¸ô®|©M url ¸ô®| (¤£¤@©w¥¿½T) ³Ì«á¨S¦³ / if (-e "$mypath/data/install.lock") { &output("q}Erd ĵ§i¡I¡I¦w¸Ëµ{¦¡³QÂê©w¡AµLªk«½Æ¦w¸Ë¡C2 ½Ð¤â°Ê§R°£ data ¥Ø¿ý¤Uªº install.lock Àɮ׫᫷s°õ¦æ¡CI)BFU "); exit; } if ($action eq "") { $output = qq~i ©¹p¶ÆÁcÅ餤¤åºô -- ¹p¶Æ±MÄݰQ½×ºô¡A±´°Q¤@¤Á¦³Ãö¹p¶ÆÁcÅ骩¥»ªº¬ÛÃö°ÝÃD»P§Þ³N¤ä´©¡I¡@¡@ n} ¡@¡@¦b¶i¦æ¦w¸Ë«e¡A½Ð¥ý½T©w±z¤w¸g§¹¾ã¤W¶Ç¤F¾ãӽ׾µ{¦¡©M¹Ï¤ùÀɮסA¨Ã¤w¸g¨Ì·Ón¨D³]©w¦n¤F©Ò¦³¥Ø¿ý©MÀɮתºÄݩʡC'=* ¡@¡@¤U± 1 ©M 2 ¤¤ªº¹w³]³]©w¬O¥Ñµ{¦¡¦Û°Ê§PÂ_²£¥Íªº¡A¾A¥Î©ó¤j³¡¤À¦w¸Ë¥»µ{¦¡ªº¥Î¤á¡A¦pªG¦³¿ù$LeoBBS_J_CHT¡A½Ð¦Û¦æ×§ï¦¨¥¿½TªºÈ¡CNH ¡@¡@¡¸ ¦pªG¦]¬°±z¤ô·Ç¦³¦ÓµLªk¥¿±`¦w¸Ë©M¨Ï¥Î¥»½×¾Â¡A½Ð«ö¦¹µù¥U¥»½×¾Â°Ó$LeoBBS_H_CHTª©¡A¨ú±o¦w¸Ë¨Ï¥Î¨ó§Uµ¥§Þ³N¤ä´©»PªA°È¡Cdn ¡@1.³]©wµ{¦¡¸}¥»ªº¸ô®|¡]¤@¯ë±¡ªp¤U¡A¦Û°Ê§PÂ_µ{¦¡¨ú±o³o¸Ìªº¸ê®Æ³£¬O¥¿½Tªº¡^w/s ¡@¸}¥»µ{¦¡(cgi-bin)ªº¦w¸Ë¸ô®|¡@¡@¡@µ²§À¦³ "/"bUn1B ¡@¸}¥»µ{¦¡(cgi-bin)ªº URL ¸ô®|¡@ ¡@µ²§À¨S¦³ "/"l|2@ ¡@2.³]©w¹Ï¹³Àɮתº¸ô®|¡]¦pªG²Ä¤G¦æªº³Ì«á¦³¯ºÁy¹Ïªº¸Ü¡A´N»¡©ú²Ä¤G¦æ¶ñ¼gªº¸ê®Æ¬O¥¿½Tªº¡A§_«h½Ð¦Û¦æ×§ï¶ñ¼g¡^%nY1 ¡@¹Ï¹³ÀÉ®×(non-cgi)ªº¦w¸Ë¸ô®|¡@¡@¡@¡@¡@µ²§À¦³ "/"(o|>m^ ¡@¹Ï¹³ÀÉ®×(non-cgi) URL ¸ô®|¡@ ¡@ ¡@µ²§À¨S¦³ "/"#;l ¡@3.³]©wªì©l¤ÆºÞ²zû¡]¦pªG¬O¤É¯Å¦w¸Ëªº¸Ü¡A¨º»ò³o¸Ì¬OµL»Ý¶ñ¼gªº¡A½Ð°È¥²¯dªÅ¥Õ¡^ >O ¡@ªì©lºÞ²zû·|û¦WºÙ¡@¡@¡@¡@¡@¶}ÀY¤£n¨Ï¥Î³X«È¦r¼Ë¡A¤]¤£n¶W¹L12Ó¦r¤¸¡]6Ó¤¤¤å¦r¡^=s'`1 ¡@ªì©lºÞ²zû±K½X¡@¡@¡@¡@¥u¤¹³\\¤j¤p¼g¦r¥À©M¼Æ¦rªº²Õ¦X¡A¤£¯à¥þ³¡¬O¼Æ¦r¡A¨Ã¤£±o¤Ö©ó8Ó¦r¤¸8Il7We ¡@ªì©lºÞ²zû±K½X¡@¡@¡@¡@½Ð¨Ì·Ó¤W¤@¦æ¦A«·s¿é¤J¤@¹M¡A¥H«K½T©w¡I#S ~; &output("$output"); exit; } if ($action eq "proceed") { $lbdir = $query->param("lbdir"); $lbdir =~ s/\/$//isg; $mypath = $lbdir; $lbdir = "${lbdir}/"; $boardurl = $query->param("boardurl"); $boardurl =~ s/\/$//isg; $imagesdir = $query->param("imagesdir"); $imagesdir =~ s/\/$//isg; $imagesdir = "${imagesdir}/"; $imagesurl = $query->param("imagesurl"); $imagesurl =~ s/\/$//isg; $adminname = $query->param("adminname"); $adminpass = $query->param("adminpass"); $adminpass1= $query->param("adminpass1"); unlink ("$mypath/record.cgi"); opendir (DIRS, "$mypath"); my @files = readdir(DIRS); closedir (DIRS); my @searchdir = grep(/^search/i, @files); $searchdir = @searchdir; my @memdir = grep(/^members/i, @files); $memdir = @memdir; my @msgdir = grep(/^messages/i, @files); $msgdir = @msgdir; my @recorddir = grep(/^record/i, @files); $recorddir = @recorddir; my @ftpdir = grep(/^ftpdata/i, @files); $ftpdir = @ftpdir; my @memfavdir = grep(/^memfav/i, @files); $memfavdir = @memfavdir; if (($searchdir > 2)||($memdir > 1)||($msgdir > 1)||($recorddir > 1)||($ftpdir > 1)||($memfavdir > 1)) { if ($searchdir > 2) { $output = "search ¶}ÀYªº¥Ø¿ý¦³¨âөΨâÓ¥H¤W"; } elsif ($memdir > 1) { $output = "members ¶}ÀYªº¥Ø¿ý¦³¨âөΨâÓ¥H¤W"; } elsif ($recorddir > 1) { $output = "record ¶}ÀYªº¥Ø¿ý¦³¨âөΨâÓ¥H¤W"; } elsif ($ftpdir > 1) { $output = "ftpdata ¶}ÀYªº¥Ø¿ý¦³¨âөΨâÓ¥H¤W"; } elsif ($msgdir > 1) { $output = "messages ¶}ÀYªº¥Ø¿ý¦³¨âөΨâÓ¥H¤W"; } elsif ($memfavdir > 1) { $output = "memfav ¶}ÀYªº¥Ø¿ý¦³¨âөΨâÓ¥H¤W"; } &output("YA1?u ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I6xPs $mypath ¥Ø¿ý¤Uªº¥H $output¡Aif<9 ½Ð§R°£¦h¾lªº¡A«O«ù¦¹¬ÛÃö¥Ø¿ý¥u¦³¤@Ó¡AµM«á«·s°õ¦æ¦w¸Ëµ{¦¡¤@¦¸¡C]%K" "); exit; } $memdir = $memdir[0]; $msgdir = $msgdir[0]; $memfavdir = $memfavdir[0]; &changemod($mypath, $html_dir); chmod(0777,"$mypath/$memdir"); mkdir("$mypath/$memdir/old",0777) unless (-e "$mypath/$memdir/old"); chmod(0777,"$mypath/$memdir/old"); chmod(0777,"$mypath/data"); $memdirwritabler = $memdirwritabler1 = $datadirwritabler =""; $makefile = "$mypath/$memdir/test.txt"; open (TEST, ">$makefile") or $memdirwritabler = "¥Ø¿ý $mypath/$memdir ¬°¤£¥i¼g¡A½ÐÅܧóÄݩʬ° 777 ¡CwbRj "; print TEST "-"; close (TEST); $memdirwritabler = "¥Ø¿ý $mypath/$memdir ¬°¤£¥i¼g¡A½ÐÅܧóÄݩʬ° 777 ¡Cz#R " if (!(-e "$makefile")); unlink "$makefile"; $makefile = "$mypath/$memdir/old/test.txt"; open (TEST, ">$makefile") or $memdirwritabler1 = "¥Ø¿ý $mypath/$memdir/old ¬°¤£¥i¼g¡A½ÐÅܧóÄݩʬ° 777 ¡CDFh "; print TEST "-"; close (TEST); $memdirwritabler1 = "¥Ø¿ý $mypath/$memdir/old ¬°¤£¥i¼g¡A½ÐÅܧóÄݩʬ° 777 ¡C6Py " if (!(-e "$makefile")); unlink "$makefile"; $makefile = "$mypath/data/test.txt"; open (TEST, ">$makefile") or $datadirwritabler = "¥Ø¿ý $mypath/data ¬°¤£¥i¼g¡A½ÐÅܧóÄݩʬ° 777 ¡CS|! "; print TEST "-"; close (TEST); $datadirwritabler = "¥Ø¿ý $mypath/data ¬°¤£¥i¼g¡A½ÐÅܧóÄݩʬ° 777 ¡CnG " if (!(-e "$makefile")); unlink "$makefile"; if (($memdirwritabler ne "")||($memdirwritabler1 ne "")||($datadirwritabler)) { &output("X-'r!R ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡Il@}:{y $datadirwritabler$memdirwritabler$memdirwritabler1? "); exit; } chmod(0666,"${lbdir}data/boardinfo.cgi"); if (!(-e "${lbdir}data/boardinfo.cgi")) { &output("pVQ)vP ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡Iv. ¥¼µo²{ ${lbdir}data/boardinfo.cgi ÀɮסA¥i¯à±z¿é¤Jªº *.cgi ¸}¥»ªº¦w¸Ë¸ô®|¿ù$LeoBBS_J_CHT¡A½Ðªð¦^«·s¿é¤J¡C_I "); exit; } if (!(-e "${imagesdir}images/logo.gif")) { &output("W ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I7L ¥¼µo²{ ${imagesdir}images/logo.gif ÀɮסA¥i¯à±z¿é¤Jªº image ¹Ï¹³Àɮתº¦w¸Ë¸ô®|¿ù$LeoBBS_J_CHT¡A½Ðªð¦^«·s¿é¤J¡C- "); exit; } if (($adminname ne "")&&($adminpass ne "")) { $adminnametemp = $adminname; $adminname =~ s/\ \;//ig; $adminname =~ s/¡@/ /g; $adminname =~ s/–E/ /g; $adminname =~ s/[ ]+/ /g; $adminname =~ s/[ ]+/_/; $adminname =~ s/[_]+/_/; $adminname =~ s/ //isg; $adminname =~ s/ //isg; $adminname =~ s/¡@//isg; $adminname =~ s/–E//isg; $adminname =~ s/()+//isg; $adminname =~ s/[\a\f\n\e\0\r\t\`\~\!\@\#\$\%\^\&\*\(\)\+\=\\\{\}\;\'\:\"\,\.\/\\?\[\]]//isg; $adminname =~ s/\s*$//g; $adminname =~ s/^\s*//g; if ($adminnametemp ne $adminname) { &output("ezV ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I~,s'" ±z¿é¤JªººÞ²zû·|û¦WºÙ¦³°ÝÃD¡A½Ðªð¦^«·s¿é¤J¡I;ufu} "); exit; } if ($adminname =~ /^³X«È/) { &output("F.BZ ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡IT( ½Ð¤£n¦bºÞ²zû·|û¦WºÙªº¶}ÀY¤¤¨Ï¥Î³X«È¦r¼Ë¡A½Ðªð¦^«·s¿é¤J¡I`Ze "); exit; } if (length($adminname)>12) { &output(" -b ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I;q/i ºÞ²zû·|û¦WºÙ¤Óªø¡A½Ð¤£n¶W¹L12Ó¦r¤¸¡]6Ó¤¤¤å¦r¡^¡A½Ðªð¦^«·s¿é¤J¡Iw]) "); exit; } if (length($adminname)g\-: ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡Iw)T+7 ºÞ²zû·|û¦WºÙ¤Óµu¤F¡A½Ð¤£n¤Ö©ó2Ó¦r¤¸¡]1Ó¤¤¤å¦r¡^¡A½Ðªð¦^«·s¿é¤J¡II "); exit; } if ($adminname =~ m/[\a\f\n\e\0\r\t\`\~\!\@\#\$\%\^\&\*\(\)\=\+\\\[\]\{\}\;\'\:\"\,\.\/\\?]/) { &output("4VRO= ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡Ifw\RF< ¹ï¤£°_¡A±z¿é¤JªººÞ²zû·|û¦WºÙ¦³°ÝÃD¡A½Ð¤£n¦bºÞ²zû·|û¦WºÙ¤¤¥]§t\@\#\$\%\^\&\*\(\)\+\=\\\{\}\;\'\:\"\,\.\/\\?\[\]³oÃþ¦r¤¸¡I¡A½Ðªð¦^«·s¿é¤J¡I9$. "); exit; } if ($adminpass =~ /[^a-zA-Z0-9]/) { &output("li ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I e&$]' ºÞ²zû±K½X¥u¤¹³\\¤j¤p¼g¦r¥À©M¼Æ¦rªº²Õ¦X¡A½Ðªð¦^«á§ó´«¡IK:_!` "); exit; } if ($adminpass =~ /^lEO/) { &output("X1 ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡IqyGp ºÞ²zû±K½X¤£¤¹³\\¬O lEO ¶}ÀY¡A½Ðªð¦^«á§ó´«¡I& "); exit; } if (length($adminpass){ ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I=h{$Z$ ºÞ²zû±K½X¤Óµu¤F¡A½Ðªð¦^«á§ó´«¡]±K½X¥²¶· 8 ¦ì¥H¤W¡^¡Ip;bg "); exit; } if ($adminpass =~ /^[0-9]+$/) { &output(":5$ ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I<Ao%D3 ºÞ²zû±K½X¤£¯à¥þ³¡¬°¼Æ¦r¡A½Ðªð¦^«á§ó´«¡I "); exit; } if ($adminname eq $adminpass) { &output("1#B ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡ITToKm ¤£n±NºÞ²zû·|û¦WºÙ©MºÞ²zû±K½X³]©w¦¨¬Û¦Pªº¡A½Ðªð¦^«á§ó´«¡IW2@b "); exit; } if ($adminpass ne $adminpass1) { &output("Kq|1\# ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡Iu$ ¹ï¤£°_¡A±z¿é¤Jªº¨â¦¸ºÞ²zû±K½X¤£¬Û¦P¡A½Ðªð¦^«·s¿é¤J¡IS(75 "); exit; } } open(FILE, "${lbdir}data/boardinfo.cgi"); @info = ; close(FILE); if (open(FILE, ">${lbdir}data/boardinfo.cgi")) { print FILE "\$lbdir = '$lbdir';\n"; print FILE "\$boardurl = '$boardurl';\n"; print FILE "\$imagesdir = '$imagesdir';\n"; print FILE "\$imagesurl = '$imagesurl';\n"; eval('flock(FILE, 2);'); print FILE $@ ne '' ? "\$OS_USED = 'Nt';\n" : "\$OS_USED = 'Unix';\n"; foreach (@info) { chomp; next if (($_ =~ /^\$lbdir/)||($_ =~ /^\$imagesdir/)||($_ =~ /^\$boardurl/)||($_ =~ /^\$imagesurl/)||($_ =~ /^\$OS_USED/)||($_ eq "")); print FILE "$_\n"; } print FILE "\n"; close(FILE); } else { &output(",9 ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡Ii&5pJ ${lbdir}data/boardinfo.cgi Àɮפ£¥i¼g¡A½Ð¤â°Ê³]©w¨äÄݩʬ° 666 ¡AµM«á«·s¾ã²z¥»¶±$LeoBBS_L_CHTÄò¡C< "); exit; } if (($adminname ne "")&&($adminpass ne "")) { $oldadminname = $adminname; $adminname =~ s/ /\_/g; $adminname =~ tr/A-Z/a-z/; my $namenumber = ((ord(substr($adminname,0,1))&0x3c)>2); # my $namenumber = int((ord(substr($adminname,0,1))+ord(substr($adminname,1,1)))/2); mkdir ("${lbdir}$memdir/$namenumber", 0777) if (!(-e "${lbdir}$memdir/$namenumber")); chmod(0777,"${lbdir}$memdir/$namenumber"); if ((-e "$lbdir$memdir/$namenumber/$adminname.cgi")||(-e "$lbdir$memdir/old/$adminname.cgi")) { &output("c ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡IR ºÞ²zû±b¸¹ $oldadminname ¤w¸g¦s¦b¡A½Ðªð¦^§ó´«¡IO4 "); exit; } eval {$adminpass = md5_hex($adminpass);}; if ($@) {eval('use Digest::MD5 qw(md5_hex);$adminpass = md5_hex($adminpass);');} unless ($@) {$adminpass = "lEO$adminpass";} opendir(DIR, $lbdir); @files = readdir(DIR); closedir(DIR); @memdirs = grep(/^members/i, @files); $memdir = $memdirs[0]; chmod(0777,"$lbdir$memdir"); mkdir("$lbdir$memdir/old",0777) unless (-e "$lbdir$memdir/old"); chmod(0777,"$lbdir$memdir/old"); my $currenttime = time; if (open(FILE, ">$lbdir$memdir/$namenumber/$adminname.cgi")) { print FILE "$adminname\t$adminpass\tmember\tad\t0|0\t\tno\t«O±K\t\t\t\t\t\t$currenttime\t\t"; close(FILE); } else { &output("e ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡I-kZ> ${lbdir}$memdir ¥Ø¿ý¤£¥i¼g¡A½Ð¤â°Ê³]©w¨äÄݩʬ° 777 ¡AµM«á«·s¾ã²z¥»¶±$LeoBBS_L_CHTÄò¡Ci7! "); exit; } if (open(FILE, ">$lbdir$memdir/old/$adminname.cgi")) { print FILE "$adminname\t$adminpass\tmember\tad\t0|0\t\tno\t«O±K\t\t\t\t\t\t$currenttime\t\t"; close(FILE); } else { unlink("$lbdir$memdir/$namenumber/$adminname.cgi"); &output("& ¦w¸Ëµ{¦¡µo²{¿ù$LeoBBS_J_CHT¡IYeJ ${lbdir}$memdir/old ¥Ø¿ý¤£¥i¼g¡A½Ð¤â°Ê³]©w¨äÄݩʬ° 777 ¡AµM«á«·s¾ã²z¥»¶±$LeoBBS_L_CHTÄò¡Cs'1 "); exit; } $output = "ºÞ²zû±b¸¹ $oldadminname¡@«Ø¥ß¦¨¥\\¡I"; } open(LOCK, ">${lbdir}data/install.lock"); print LOCK "www.LeoBBS.com"; close(LOCK); unlink("${lbdir}install.cgi") if (!(-e "${lbdir}data/install.lock")); &changedirname(); # Åܧó·|ûÃöÁ䥨¿ýªº¦WºÙ &output("&m ½×¾Â¦w¸Ë§¹¦¨¡I$outputU-6c ½×¾Â¦w¸Ë¤w¸g¶¶§Q§¹¦¨¡I¥Ø«e¦w¸Ëµ{¦¡¤w¸g¦Û°ÊÂê©w¡AµLªk¦A¦¸°õ¦æ¡A¦ý§ÚÌÁÙ¬O±j¯P«ØÄ³±zª½±µ±N¨ä±q¦øªA¾¹¤W§R°£¡C2O<3 ¦pªG»Ýn¦A¦¸°õ¦æ¦w¸Ëµ{¦¡¡A½Ð¥ý¤â°Ê±N data ¥Ø¿ý¤Uªº install.lock ÀÉ®×§R°£¡AµM«á¦A°õ¦æ¦w¸Ëµ{¦¡¡I<3:7? ²{¦b±z¥i¥H¨Ï¥ÎºÞ²zû±b¸¹©M±K½X¶i¤J ½×¾ÂºÞ²z¤¤¤ß «·s³]©w©Ò¦³°ò¥»ÅܼƩM·®æ°Ñ¼Æ¡C)QL| "); $versionnumber =~ s/\//isg; &sendurlinfo("lb.moninet.com.tw","LeoBBS/reg.cgi","ver=$versionnumber&url=$boardurl") if (($boardurl ne "")&&($boardurl !~ m/localhost/i)&&($boardurl !~ m/127\.0\.0\./i)&&($boardurl !~ m/192\.168\./i)); exit; } # °Ñ¼Æ¤£¹ï¡D &output("Zo ½Ð¤£nJ¶Ã°õ¦æ¥»µ{¦¡¡AÁÂÁ¦X$LeoBBS_E_CHT¡IE "); exit; sub output { my $outputinfo = shift; print header(-charset=>big5 , -expires=>"$EXP_MODE" , -cache=>"$CACHE_MODES"); print qq~ 3EUi9 ¹p¶Æ·¥»Å¶W¯Å½×¾Â LeoBBS X ¦w¸Ëµ{¦¡,e*,4A .©¹p¶ÆÁcÅ餤¤åºô -- ¹p¶Æ±MÄݰQ½×ºô¡A±´°Q¤@¤Á¦³Ãö¹p¶ÆÁcÅ骩¥»ªº¬ÛÃö°ÝÃD»P§Þ³N¤ä´©¡I¡@¡@ 20q&8 $outputinfo>%?,T ¡@¡@¡¸ ¦pªG¦]¬°±z¤ô·Ç¦³¦ÓµLªk¥¿±`¦w¸Ë©M¨Ï¥Î¥»½×¾Â¡A½Ð«ö¦¹µù¥U¥»½×¾Â°Ó$LeoBBS_H_CHTª©¡A¨ú±o¦w¸Ë¨Ï¥Î¨ó§Uµ¥§Þ³N¤ä´©»PªA°È¡CnnJt ª©Åv©Ò¦³¡G¹p¶Æ¬ì§Þ & ¹p¶Æ·¥»Å¶W¯Å½×¾Â¡@ÁcÅ骩Åv©Ò¦³¡G¼¯¥§ºô¡@ $LBCGI::LBTYPE¡@ Copyright 2003-2004ET ~; } sub changemod { my ($cgibinpath, $noncgipath) = @_; opendir (DIRS, "$noncgipath"); my @files = readdir(DIRS); closedir (DIRS); my @usrdir = grep(/^usr/i, @files); my $usrdir = $usrdir[0]; $usrdir = $usrdir[1] if (lc($usrdir) eq 'usravatars'); chmod(0777,"$noncgipath/$usrdir"); chmod(0777,"$noncgipath/myimage"); chmod(0777,"$noncgipath/usravatars"); chmod(0777,"$noncgipath/face"); chmod(0777,"$noncgipath/face/js"); opendir (DIRS, "$cgibinpath"); my @files = readdir(DIRS); closedir (DIRS); foreach (@files) { chmod(0777,"$cgibinpath/$_") if ($_ !~ /\./); } my @files1 = grep(/\.cgi/i, @files); foreach (@files1) { chmod(0755,"$cgibinpath/$_"); } @files1 = grep(/\.pl/i, @files); foreach (@files1) { chmod(0755,"$cgibinpath/$_"); } @files1 = grep(/\.pm/i, @files); foreach (@files1) { chmod(0755,"$cgibinpath/$_"); } mkdir("$cgibinpath/$memdir/old",0777) unless (-e "$cgibinpath/$memdir/old"); chmod(0777,"$cgibinpath/$memdir/old"); mkdir("$cgibinpath/$msgdir/in",0777) unless (-e "$cgibinpath/$msgdir/in"); chmod(0777,"$cgibinpath/$msgdir/in"); mkdir("$cgibinpath/$msgdir/main",0777) unless (-e "$cgibinpath/$msgdir/main"); chmod(0777,"$cgibinpath/$msgdir/main"); mkdir("$cgibinpath/$msgdir/out",0777) unless (-e "$cgibinpath/$msgdir/out"); chmod(0777,"$cgibinpath/$msgdir/out"); mkdir("$cgibinpath/$msgdir/modscarddata",0777) unless (-e "$cgibinpath/$msgdir/modscarddata"); chmod(0777,"$cgibinpath/$msgdir/modscarddata"); mkdir("$cgibinpath/$memfavdir/open",0777) unless (-e "$cgibinpath/$memfavdir/open"); chmod(0777,"$cgibinpath/$memfavdir/open"); mkdir("$cgibinpath/$memfavdir/close",0777) unless (-e "$cgibinpath/$memfavdir/close"); chmod(0777,"$cgibinpath/$memfavdir/close"); mkdir("$cgibinpath/verifynum",0777) unless (-e "$cgibinpath/verifynum"); chmod(0777,"$cgibinpath/verifynum"); mkdir("$cgibinpath/verifynum/login",0777) unless (-e "$cgibinpath/verifynum/login"); chmod(0777,"$cgibinpath/verifynum/login"); } sub sendurlinfo { eval("use Socket;"); return if ($@ ne ""); ($host,$path,$content) = @_; $host =~ s/^http:\/\///isg; $port = 80; $path = "/$path" if ($path !~ /^\//); my ($name, $aliases, $type, $len, @thataddr, $a, $b, $c, $d, $that); my ($name, $aliases, $type, $len, @thataddr) = gethostbyname($host); my ($a, $b, $c, $d) = unpack("C4", $thataddr[0]); my $that = pack('S n C4 x8', 2, $port, $a, $b, $c, $d); return unless (socket(S, 2, 1, 0)); select(S); $| = 1; select(STDOUT); return unless (connect(S, $that)); print S "POST http://$host/$path HTTP/1.0\n"; print S "Content-type: application/x-www-form-urlencoded\n"; my $contentLength = length $content; print S "Content-length: $contentLength\n"; print S "\n"; print S "$content"; @results = ; close(S); undef $|; return; } # ´ú¸Õµ´¹ï¸ô®| sub mypath { local $temp; if ($ENV{'SERVER_SOFTWARE'} =~ /apache/i) { if ($ENV{'SCRIPT_FILENAME'}=~ /cgiwrap/i) { $temp=$ENV{'PATH_TRANSLATED'}; } else { $temp=$ENV{'SCRIPT_FILENAME'}; } $temp=~ s/\\/\//g if ($temp=~/\\/); $mypath=substr($temp,0,rindex($temp,"/")); } else { $ENV{'PATH_TRANSLATED'} = $ENV{'SCRIPT_FILENAME'} if ($ENV{'PATH_TRANSLATED'} eq ""); $mypath=substr($ENV{'PATH_TRANSLATED'},0,rindex($ENV{'PATH_TRANSLATED'},"\\")); $mypath=~ s/\\/\//g; } return $mypath; } # ´ú¸Õ URL ¸ô®| sub myurl { local $server_port,$fullurl; $server_port = ":$ENV{'SERVER_PORT'}" if ($ENV{'SERVER_PORT'} ne '80'); if ($ENV{'HTTP_HOST'} ne "") { $fullurl = $ENV{'HTTP_HOST'}; } else { $fullurl = $ENV{'SERVER_NAME'}; } $fullurl = "$fullurl$server_port" if ($fullurl !~ /\:/); $fullurl = "http://$fullurl$ENV{'SCRIPT_NAME'}"; $myurl = substr($fullurl,0,rindex($fullurl,"/")); return $myurl; } # ´ú¸Õ¹Ï¹³¥Ø¿ýªºµ´¹ï¸ô®|©M url ¸ô®| sub myimgdir { my $html_dir = $html_url = $base = $base1 = ""; $base = $mypath; $base1 = $myurl; if (-e "$base/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/lb5000/editor/selcolor.html") { $html_dir = "$base/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/ib2000/editor/selcolor.html") { $html_dir = "$base/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/lb/editor/selcolor.html") { $html_dir = "$base/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/ib/editor/selcolor.html") { $html_dir = "$base/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/bbs/editor/selcolor.html") { $html_dir = "$base/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/leobbs/editor/selcolor.html") { $html_dir = "$base/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/leo/editor/selcolor.html") { $html_dir = "$base/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/lb5000/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb5000/non-cgi"; $html_url = "$base1/lb5000/non-cgi"; } elsif (-e "$base/ib2000/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib2000/non-cgi"; $html_url = "$base1/ib2000/non-cgi"; } elsif (-e "$base/lb/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb/non-cgi"; $html_url = "$base1/lb/non-cgi"; } elsif (-e "$base/ib/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib/non-cgi"; $html_url = "$base1/ib/non-cgi"; } elsif (-e "$base/bbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/bbs/non-cgi"; $html_url = "$base1/bbs/non-cgi"; } elsif (-e "$base/leobbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/leobbs/non-cgi"; $html_url = "$base1/leobbs/non-cgi"; } elsif (-e "$base/leo/non-cgi/editor/selcolor.html") { $html_dir = "$base/leo/non-cgi"; $html_url = "$base1/leo/non-cgi"; } elsif (-e "$base/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } elsif (-e "$base/htdocs/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/htdocs/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/htdocs/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/htdocs/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/htdocs/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/htdocs/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/htdocs/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/htdocs/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/htdocs/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/htdocs/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/htdocs/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/htdocs/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/htdocs/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/htdocs/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/htdocs/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/htdocs/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } if (($html_dir eq "")||(!(-e "$html_dir/images/board.js"))) { if ($base =~ m|(.*)/(.+?)|) { $base = $1; } else { $base = $mypath; } if ($base1 =~ m|(.*)/(.+?)|) { $base1 = $1; } else { $base1 = $myurl; } if (-e "$base/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/lb5000/editor/selcolor.html") { $html_dir = "$base/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/ib2000/editor/selcolor.html") { $html_dir = "$base/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/lb/editor/selcolor.html") { $html_dir = "$base/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/ib/editor/selcolor.html") { $html_dir = "$base/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/bbs/editor/selcolor.html") { $html_dir = "$base/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/leobbs/editor/selcolor.html") { $html_dir = "$base/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/leo/editor/selcolor.html") { $html_dir = "$base/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/lb5000/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb5000/non-cgi"; $html_url = "$base1/lb5000/non-cgi"; } elsif (-e "$base/ib2000/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib2000/non-cgi"; $html_url = "$base1/ib2000/non-cgi"; } elsif (-e "$base/lb/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb/non-cgi"; $html_url = "$base1/lb/non-cgi"; } elsif (-e "$base/ib/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib/non-cgi"; $html_url = "$base1/ib/non-cgi"; } elsif (-e "$base/bbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/bbs/non-cgi"; $html_url = "$base1/bbs/non-cgi"; } elsif (-e "$base/leobbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/leobbs/non-cgi"; $html_url = "$base1/leobbs/non-cgi"; } elsif (-e "$base/leo/non-cgi/editor/selcolor.html") { $html_dir = "$base/leo/non-cgi"; $html_url = "$base1/leo/non-cgi"; } elsif (-e "$base/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } elsif (-e "$base/htdocs/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/htdocs/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/htdocs/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/htdocs/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/htdocs/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/htdocs/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/htdocs/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/htdocs/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/htdocs/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/htdocs/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/htdocs/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/htdocs/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/htdocs/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/htdocs/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/htdocs/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/htdocs/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } } if (($html_dir eq "")||(!(-e "$html_dir/images/board.js"))) { if ($base =~ m|(.*)/(.+?)|) { $base = $1; } else { $base = $mypath; } if ($base1 =~ m|(.*)/(.+?)|) { $base1 = $1; } else { $base1 = $myurl; } if (-e "$base/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/lb5000/editor/selcolor.html") { $html_dir = "$base/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/ib2000/editor/selcolor.html") { $html_dir = "$base/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/lb/editor/selcolor.html") { $html_dir = "$base/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/ib/editor/selcolor.html") { $html_dir = "$base/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/bbs/editor/selcolor.html") { $html_dir = "$base/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/leobbs/editor/selcolor.html") { $html_dir = "$base/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/leo/editor/selcolor.html") { $html_dir = "$base/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/lb5000/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb5000/non-cgi"; $html_url = "$base1/lb5000/non-cgi"; } elsif (-e "$base/ib2000/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib2000/non-cgi"; $html_url = "$base1/ib2000/non-cgi"; } elsif (-e "$base/lb/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb/non-cgi"; $html_url = "$base1/lb/non-cgi"; } elsif (-e "$base/ib/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib/non-cgi"; $html_url = "$base1/ib/non-cgi"; } elsif (-e "$base/bbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/bbs/non-cgi"; $html_url = "$base1/bbs/non-cgi"; } elsif (-e "$base/leobbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/leobbs/non-cgi"; $html_url = "$base1/leobbs/non-cgi"; } elsif (-e "$base/leo/non-cgi/editor/selcolor.html") { $html_dir = "$base/leo/non-cgi"; $html_url = "$base1/leo/non-cgi"; } elsif (-e "$base/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } elsif (-e "$base/htdocs/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/htdocs/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/htdocs/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/htdocs/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/htdocs/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/htdocs/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/htdocs/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/htdocs/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/htdocs/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/htdocs/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/htdocs/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/htdocs/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/htdocs/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/htdocs/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/htdocs/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/htdocs/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } } if (($html_dir eq "")||(!(-e "$html_dir/images/board.js"))) { if ($base =~ m|(.*)/(.+?)|) { $base = $1; } else { $base = $mypath; } if ($base1 =~ m|(.*)/(.+?)|) { $base1 = $1; } else { $base1 = $myurl; } if (-e "$base/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/lb5000/editor/selcolor.html") { $html_dir = "$base/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/ib2000/editor/selcolor.html") { $html_dir = "$base/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/lb/editor/selcolor.html") { $html_dir = "$base/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/ib/editor/selcolor.html") { $html_dir = "$base/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/bbs/editor/selcolor.html") { $html_dir = "$base/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/leobbs/editor/selcolor.html") { $html_dir = "$base/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/leo/editor/selcolor.html") { $html_dir = "$base/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/lb5000/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb5000/non-cgi"; $html_url = "$base1/lb5000/non-cgi"; } elsif (-e "$base/ib2000/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib2000/non-cgi"; $html_url = "$base1/ib2000/non-cgi"; } elsif (-e "$base/lb/non-cgi/editor/selcolor.html") { $html_dir = "$base/lb/non-cgi"; $html_url = "$base1/lb/non-cgi"; } elsif (-e "$base/ib/non-cgi/editor/selcolor.html") { $html_dir = "$base/ib/non-cgi"; $html_url = "$base1/ib/non-cgi"; } elsif (-e "$base/bbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/bbs/non-cgi"; $html_url = "$base1/bbs/non-cgi"; } elsif (-e "$base/leobbs/non-cgi/editor/selcolor.html") { $html_dir = "$base/leobbs/non-cgi"; $html_url = "$base1/leobbs/non-cgi"; } elsif (-e "$base/leo/non-cgi/editor/selcolor.html") { $html_dir = "$base/leo/non-cgi"; $html_url = "$base1/leo/non-cgi"; } elsif (-e "$base/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } elsif (-e "$base/htdocs/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi"; $html_url = "$base1/non-cgi"; } elsif (-e "$base/htdocs/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/lb5000"; $html_url = "$base1/lb5000"; } elsif (-e "$base/htdocs/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/ib2000"; $html_url = "$base1/ib2000"; } elsif (-e "$base/htdocs/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/lb"; $html_url = "$base1/lb"; } elsif (-e "$base/htdocs/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/ib"; $html_url = "$base1/ib"; } elsif (-e "$base/htdocs/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/bbs"; $html_url = "$base1/bbs"; } elsif (-e "$base/htdocs/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/leobbs"; $html_url = "$base1/leobbs"; } elsif (-e "$base/htdocs/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/leo"; $html_url = "$base1/leo"; } elsif (-e "$base/htdocs/non-cgi/bbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/bbs"; $html_url = "$base1/non-cgi/bbs"; } elsif (-e "$base/htdocs/non-cgi/non-cgi/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/non-cgi"; $html_url = "$base1/non-cgi/non-cgi"; } elsif (-e "$base/htdocs/non-cgi/lb/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb"; $html_url = "$base1/non-cgi/lb"; } elsif (-e "$base/htdocs/non-cgi/lb5000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/lb5000"; $html_url = "$base1/non-cgi/lb5000"; } elsif (-e "$base/htdocs/non-cgi/ib2000/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib2000"; $html_url = "$base1/non-cgi/ib2000"; } elsif (-e "$base/htdocs/non-cgi/ib/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/ib"; $html_url = "$base1/non-cgi/ib"; } elsif (-e "$base/htdocs/non-cgi/leo/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leo"; $html_url = "$base1/non-cgi/leo"; } elsif (-e "$base/htdocs/non-cgi/leobbs/editor/selcolor.html") { $html_dir = "$base/htdocs/non-cgi/leobbs"; $html_url = "$base1/non-cgi/leobbs"; } } $html_dir = $mypath if ($html_dir eq ""); $html_url = $myurl if ($html_url eq ""); return "$html_dir|$html_url|"; } sub changedirname { opendir (DIRS, "$lbdir"); my @files = readdir(DIRS); closedir (DIRS); @files = grep(/^\w+?$/i, @files); my @searchdir = grep(/^search/i, @files); my $searchdir = $searchdir[0]; my @memdir = grep(/^members/i, @files); my $memdir = $memdir[0]; my @msgdir = grep(/^messages/i, @files); my $msgdir = $msgdir[0]; my @memfavdir = grep(/^memfav/i, @files); my $memfavdir = $memfavdir[0]; my @recorddir = grep(/^record/i, @files); my $recorddir = $recorddir[0]; my @saledir = grep(/^sale/i, @files); my $saledir = $saledir[0]; my @ftpdir = grep(/^ftpdata/i, @files); my $ftpdir = $ftpdir[0]; opendir(DIRS, $imagesdir); my @files = readdir(DIRS); closedir(DIRS); @files = grep(/^\w+?$/i, @files); my @usrdir = grep(/^usr/i, @files); my $usrdir = $usrdir[0]; $usrdir = $usrdir[1] if (lc($usrdir) eq 'usravatars'); my $x = &myrand(1000000000); $x = crypt($x, aun); $x =~ s/%([a-fA-F0-9]{2})/pack("C", hex($1))/eg; $x =~ s/[^\w\d]//g; $x = substr($x, 2, 9); $usrdir = "usr$x" if (rename("$imagesdir$usrdir", "${imagesdir}usr$x")); $recorddir = "record$x" if (rename("$lbdir$recorddir", "${lbdir}record$x")); $saledir = "sale$x" if (rename("$lbdir$saledir", "${lbdir}sale$x")); my $x = &myrand(1000000000); $x = crypt($x, aun); $x =~ s/%([a-fA-F0-9]{2})/pack("C", hex($1))/eg; $x =~ s/[^\w\d]//g; $x = substr($x, 2, 9); $memdir = "members$x" if (rename("$lbdir$memdir", "${lbdir}members$x")); $msgdir = "messages$x" if (rename("$lbdir$msgdir", "${lbdir}messages$x")); my $x = &myrand(1000000000); $x = crypt($x, aun); $x =~ s/%([a-fA-F0-9]{2})/pack("C", hex($1))/eg; $x =~ s/[^\w\d]//g; $x = substr($x, 2, 9); $searchdir = "search$x" if (rename("$lbdir$searchdir", "${lbdir}search$x")); $ftpdir = "ftpdata$x" if (rename("$lbdir$ftpdir", "${lbdir}ftpdata$x")); $memfavdir = "memfav$x" if (rename("$lbdir$memfavdir", "${lbdir}memfav$x")); }I,zDU!
|
|
C_^ ©¹p¶ÆÁcÅ餤¤åºô -- ¹p¶Æ±MÄݰQ½×ºô¡A±´°Q¤@¤Á¦³Ãö¹p¶ÆÁcÅ骩¥»ªº¬ÛÃö°ÝÃD»P§Þ³N¤ä´©¡I¡@¡@ Pvd\s ©¹p¶ÆÁcÅ餤¤åºô -- ¹p¶Æ±MÄݰQ½×ºô¡A±´°Q¤@¤Á¦³Ãö¹p¶ÆÁcÅ骩¥»ªº¬ÛÃö°ÝÃD»P§Þ³N¤ä´©¡I¡@¡@ !|ugm ¥´¶}´NÅã¥Ü³o¬q¤å¦rw ®`§Ú²{¦b³£µLªk¦w¸Ë)1a" ¹J¨ì³oºØ°ÝÃDn«ç»ò¿ì°Ú R ©¹p¶ÆÁcÅ餤¤åºô -- ¹p¶Æ±MÄݰQ½×ºô¡A±´°Q¤@¤Á¦³Ãö¹p¶ÆÁcÅ骩¥»ªº¬ÛÃö°ÝÃD»P§Þ³N¤ä´©¡I¡@¡@ iZ$Q8I -=-=-=- ¥H¤U¤º®e¥Ñ ¤p«B ¦b 2007¦~06¤ë23¤é 00:46am ®É·s¼W -=-=-=-fAX} ¶¶¥N¤@´£3'1l §ÚªºDATA¥Ø¿ý¤U®Ú¥»¨S¦³install.lock¦ý¬O«oÅã¥Ü½Ð¤â°Ê§R°£ data ¥Ø¿ý¤Uªº install.lock Àɮ׫᫷s°õ¦æ¡C.......¨ì©³¬°¦ó·|³o¼Ë°Ú~~~A{5@9
| | |
ª©Åv©Ò¦³¡A¤£±o¾Õ¦ÛÂà¸ü
|
¹p¶ÆÁcÅ餤¤åºô¼s§i¦ì¸m
|
|