--- /dev/null
+21:05 2005/10/10\r
+suga@snpn.net\r
+\r
+Sn Uploader\r
+\r
+\95\81\92Ê\82Ì(\89½\r
+\94Ä\97p\83t\83@\83C\83\8b\83A\83b\83v\83\8d\81[\83_\82Å\82·\r
+\8ev\82¤\82æ\82¤\82È\82Ì\82ª\96³\82©\82Á\82½\82Ì\82Å\r
+\82±\82Ì\8dÛ\8dì\82Á\82Ä\82Ý\82Ü\82µ\82½\r
+\r
+\83X\83N\83\8a\83v\83g\96{\91Ì\82Í\r
+/uploader/ NoCGI.pm\94Å\r
+/uploader+cgipm/ CGI.pm\94Å\r
+\82Ì\83f\83B\83\8c\83N\83g\83\8a\82É\8ai\94[\82³\82ê\82Ä\82¢\82Ü\82·\r
+\r
+\93K\93\96\82É\8dì\82Á\82½\82à\82ñ\82È\82Ì\82Å\r
+\83^\83C\83g\83\8b\82Ì\90Ý\92è\8d\80\96Ú\82È\82Ç\82Í\82 \82è\82Ü\82¹\82ñ\r
+\83f\83U\83C\83\93\93\99\95Ï\82¦\82½\82¢\8fê\8d\87\82Í\82»\82ê\82Ù\82Ç\93ï\82µ\82\82È\82¢\82Æ\8ev\82¢\82Ü\82·\82Ì\82Å\r
+\83\\81[\83X\82»\82Ì\82Ü\82Ü\82¢\82À\82Á\82Ä\82\82¾\82³\82¢\r
+\r
+\8aî\96{\93I\82È\93®\8dì\82ÍCGI.pm\94Å/NoCGI.pm\94Å\8b¤\82É\95Ï\82í\82è\82Ü\82¹\82ñ\82ª\r
+NoCGI.pm\94Å\82Ì\95û\82ª\83p\83t\83H\81[\83}\83\93\83X\82ª\82æ\82¢\8ev\82¢\82Ü\82·\r
+\88µ\82¤\83T\83C\83Y\82ª\82 \82ñ\82Ü\82è\97e\97Ê\82ª\91å\82«\82\82È\82¢\8fê\8d\87\82Í\82Ç\82¿\82ç\82Å\82à\82©\82Ü\82í\82È\82¢\82©\82Æ\r
+\82È\82¨IIS\82Å\82Í\83A\83b\83v\83\8d\81[\83h\82Å\82«\82È\82¢\82±\82Æ\82à\82È\82¢\82Æ\8ev\82¢\82Ü\82·\82ª\r
+\93®\8dì\82ª\95s\90R\82É\82È\82é\8cX\8cü\82ª\82 \82é\82Ì\82Å\8fo\97\88\82ê\82Î\94ð\82¯\82½\95û\82ª\82æ\82³\82»\82¤\82Å\82·\r
+\r
+\83A\81[\83J\83C\83u\82É\93Y\95t\82³\82ê\82Ä\82¢\82é\83X\83N\83\8a\83v\83g\82Ì\r
+\8a¿\8e\9a\83R\81[\83h\82ÍShift-JIS/\89ü\8ds\83R\81[\83h\82ÍCRLF\82É\82È\82Á\82Ä\82¢\82Ü\82·\r
+\r
+\81¦\r
+\82±\82Ì\83X\83N\83\8a\83v\83g\82Ì\92\98\8dì\8c \82Í\8dì\8eÒ\82É\8bA\91®\82µ\82Ü\82·\82ª\r
+\97\98\97p\8eÒ\82Ì\90Ó\94C\82É\82¨\82¢\82Ä\8e©\97R\82É\89ü\95Ï,\89^\97p\82·\82é\82±\82Æ\82ª\82Å\82«\82Ü\82·\r
+\82Ü\82½\97\98\97p\82µ\82½\82±\82Æ\82É\82æ\82Á\82Ä\94\90¶\82µ\82½\91¹\8aQ\82É\91Î\82µ\82Ä\r
+\8dì\8eÒ\82Í\88ê\90Ø\82Ì\90Ó\96±\82ð\95\89\82í\82È\82¢\82à\82Ì\82Æ\82µ\82Ü\82·\r
+\r
+//////\r
+\90Ý\92u\95û\96@\r
+1. \90Ý\92u\82·\82é\83f\83B\83\8c\83N\83g\83\8a\82ð\8dì\90¬\82µ\82Ü\82·\r
+ \82È\82¨\82±\82Ì\83f\83B\83\8c\83N\83g\83\8a\82ÍCGI\8eÀ\8ds\8c \8cÀ\82Å\8f\91\82«\8d\9e\82ß\82é\82æ\82¤\82É\r
+ \81@suEXEC\8aÂ\8b«\82È\82ç\82Î701 \82»\82Ì\91¼\82È\82ç 777\82Ì\82æ\82¤\82É\83p\81[\83~\83b\83V\83\87\83\93\82ð\90Ý\92è\82·\82é\r
+ suEXEC\8aÂ\8b«\82Å 777\82È\82Ç\82É\82µ\82½\8fê\8d\87\83X\83N\83\8a\83v\83g\82É\83A\83N\83Z\83X\82·\82é\82Æ 500 Internal Server Error \82ª\8fo\82é\82±\82Æ\82ª\82 \82è\82Ü\82·\r
+2. upload.cgi\82ð\83G\83f\83B\83^\93\99\82Å\8aJ\82«\82Í\82¶\82ß\82Ì\95û\82Ì\83p\83\89\83\81\81[\83^\82ð\90Ý\92è\82·\82é\r
+\81@ \8aî\96{\93I\82É\82Í$set{'admin_pass'}\82Ì\95Ï\8dX\82ÆPerl\82ÌPATH\82Ì\8am\94F\82¾\82¯\82Å\82¢\82¢\82Æ\8ev\82¢\82Ü\82·\r
+3. \83T\81[\83o\82É\83A\83b\83v\83\8d\81[\83h\82µ\93K\93x\82É\83p\81[\83~\83b\83V\83\87\83\93ex.(suEXEC:700 other:755)\82ð\90Ý\92è\82·\82é\r
+4. \83u\83\89\83E\83U\82Å upload.cgi\82É\92¼\90Ú\83A\83N\83Z\83X\82·\82é\82Æ\83\8d\83O\83t\83@\83C\83\8b/\83f\83B\83\8c\83N\83g\83\8a\82ð\8e©\93®\93I\82É\8dì\90¬\82µ\82Ü\82·\r
+ \83A\83b\83v\83\8d\81[\83_\82Ö\82Ì\83\8a\83\93\83N\82Íupload.cgi\82Å\82Í\82È\82 upload.html(1\83y\81[\83W\96Ú\82Ì\83A\83h\83\8c\83X)\82É\82µ\82Ä\82\82¾\82³\82¢\r
+ \81\94upload.cgi\82É\83A\83N\83Z\83X\82³\82ê\82½\8fê\8d\87\82Í\96³\91Ê\82É\83v\83\8d\83Z\83X\82ð\8bN\93®\82µ\82Äupload.html\82É\93]\91\97\82·\82é\82¾\82¯\82Å\82·\r
+\r
+ * \8f\89\82ß\82Ä\83A\83N\83Z\83X\82µ\82½\8dÛ\82É\81u\83\81\83C\83\93\83\8d\83O\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½\81v\82È\82Ç\82Ì\95\\8e¦\82ª\8fo\82½\8fê\8d\87\82Í\r
+ 1.\82Ì\83f\83B\83\8c\83N\83g\83\8a\82Ì\83p\81[\83~\83b\83V\83\87\83\93\90Ý\92è\82ð\8c©\92¼\82µ\82Ä\82\82¾\82³\82¢\r
+\r
+\82 \82Æ\82Í\93K\93\96\82É\90Ý\92è\82Æ\82©\95Ï\82¦\82Ä\82Ý\82Ä\82\82¾\82³\82¢\r
+\82È\82¨1\83y\81[\83W\96Ú\82ðindex.html\93\99\82É\82·\82é\82ÆURL\82ª\82¿\82å\82Á\82Æ\92Z\82\82È\82é\82©\82à\82µ\82ê\82Ü\82¹\82ñ\r
+\81\94\90Ý\92u\82µ\82½\83f\83B\83\8c\83N\83g\83\8a\82É\82Íindex.html\82ð\8dì\90¬\82µ\82È\82¢\82Ì\82Å\r
+ \83C\83\93\83f\83b\83N\83X\83\8a\83X\83g\82ª\95\\8e¦\82³\82ê\82é\8aÂ\8b«\82Ì\95û\82Í\8fã\8bL\82Ì\82æ\82¤\82É\90Ý\92è\82·\82é\82©\r
+ \8bó\82Ìindex.html\82Å\82à\83A\83b\83v\83\8d\81[\83h\82µ\82Ä\82\82¾\82³\82¢\r
+\r
+suEXEC\8e\9e\82Ì\8d\\90¬\97á\r
+-- upload [701] / upload.cgi [700]\r
+\81@\81@| log.cgi [600] --- \8e©\93®\8dì\90¬\r
+\81@\81@| upload.html[604] --- \8e©\93®\8dì\90¬\r
+ |\r
+\81@\81@+-- src [701] --- \8e©\93®\8dì\90¬\r
+\r
+\82»\82Ì\91¼\88ê\94Ê\93I\82È\8d\\90¬\r
+-- upload [777] / upload.cgi [755]\r
+\81@\81@| log.cgi [666] --- \8e©\93®\8dì\90¬\r
+\81@\81@| upload.html[666] --- \8e©\93®\8dì\90¬\r
+ |\r
+\81@\81@+-- src [777] --- \8e©\93®\8dì\90¬\r
+//////\r
+\r
+\83t\83@\83C\83\8b\82Ì\8dí\8f\9c\95û\96@\r
+ 1.\83t\83@\83C\83\8bNo\82Ì\97\93\82ÉNo\82ð\93ü\82ê\82Ü\82·\r
+ up0001.jpg -> 1, 0001 , up0001 , up0001.jpg \93\99 \90\94\92l\82ª\8c\9f\8fo\82Å\82«\82ê\82Î(hoge001.png\82Å\82à)OK\82Å\82·\r
+ JavaScript\82ª\97L\8cø\82È\8fê\8d\87 "D" \82Æ\8c¾\82¤\95¶\8e\9a\82ª\83t\83@\83C\83\8b\96¼\82Ì\8d¶\91¤\82É\8fo\82Ä\82«\82Ü\82·\82Ì\82Å\82»\82ê\82ð\83N\83\8a\83b\83N\82³\82ê\82Ä\82à\8c\8b\8d\\82Å\82·\r
+ 2.\8dí\8f\9c\83L\81[\82ª\95K\97v\82È\82Æ\82«\82Í\93ü\97Í\82·\82é\r
+ \8aÇ\97\9d\8eÒPASS\82ð\93ü\82ê\82é\82Æ\91S\82Ä\82Ì\83t\83@\83C\83\8b\82ª\8dí\8f\9c\89Â\94\\82Å\82·\r
+ \82Ü\82½\8dí\8f\9c\8e\9e\82ÌIP\83A\83h\83\8c\83X\82ª\93\8a\8de\8e\9eIP\83A\83h\83\8c\83X\82Ì\91æ3\83I\83N\83e\83b\83g(192.168.0.9 \82Ì 192.168.0.)\82Ü\82Å\r
+ \88ê\92v\82·\82é\8fê\8d\87\96\94\82Í\83\86\81[\83U\81[\8cÅ\97LID\82ª\88ê\92v\82·\82é\8fê\8d\87\82É\8cÀ\82Á\82Ä\82Í\8dí\8f\9c\83L\81[\82Í\95K\97v\82Å\82Í\82 \82è\82Ü\82¹\82ñ\r
+ 3.del\82ð\89\9f\82·\r
+ \96\94,\8aÇ\97\9d\8eÒ\82ÍSUSS(Sn Uploader Support Script)\82É\83\8d\83O\83C\83\93\82·\82é\82±\82Æ\82É\82æ\82è\91I\91ð/\88ê\8a\87\8dí\8f\9c\82ª\82Å\82«\82Ü\82·\r
+\r
+HTML\82ð\8dX\90V\82µ\82½\82¢\8fê\8d\87\r
+ \83X\83N\83\8a\83v\83g\89ü\95Ï/POSTKey\97L\96³\93\99\82Å\83t\83H\81[\83\80\83f\83U\83C\83\93\82ª\95Ï\82í\82Á\82Ä\8dX\90V\82µ\82½\82¢\8fê\8d\87\82Í\r
+ \8dí\8f\9c\83t\83H\81[\83\80\82ÉNo\82ð\93ü\82ê\82¸Key\82Ì\97\93\82É\8aÇ\97\9d\8eÒPASS($set{'admin_pass'})\82Ì\92l\82ð\93ü\82ê\82Ädel\82ð\89\9f\82µ\82Ä\82\82¾\82³\82¢\r
+ \96\94\82ÍSUSS(Sn Uploader Support Script)\82É\83\8d\83O\83C\83\93\82µ\82Ä\8dì\8bÆ\82ð\82µ\82Ä\82\82¾\82³\82¢\r
+\r
+SUSS(Sn Uploader Support Script)\r
+ \97v\82·\82é\82É\8aÇ\97\9d\89æ\96Ê\82Å\82· \8c³\81X\95Ê\83X\83N\83\8a\83v\83g\82Å\82µ\82½\82ª\93\9d\8d\87\82³\82ê\82Ü\82µ\82½\r
+ SUSS\82É\83\8d\83O\83C\83\93\82·\82é\82½\82ß\82É\82Í \8dí\8f\9c\83t\83H\81[\83\80\82Ì Del\97\93\82É\90Ý\92è\82µ\82½\8aÇ\97\9d\8eÒ\83\8d\83O\83C\83\93ID\r
+ Key\97\93\82É\8aÇ\97\9d\8eÒ\83p\83X\83\8f\81[\83h \82ð\93ü\97Í\82µ\82Ädel\82ð\89\9f\82µ\82Ü\82·\r
+ \83\8d\83O\83C\83\93\82·\82é\82Æ\8aÇ\97\9d\8eÒ\89æ\96Ê\82É\90Ø\82è\91Ö\82í\82è \83\8d\83O\82Ì\88ê\8a\87\8dí\8f\9c/\83G\83\89\81[\83\8d\83O\95\\8e¦/\90Ý\92è\95\\8e¦\82È\82Ç\82ð\8c©\82é\82±\82Æ\82ª\82Å\82«\82Ü\82·\r
+\r
+Cookie\82É\82Â\82¢\82Ä\r
+ \82±\82Ì\83X\83N\83\8a\83v\83g\82Å\82ÍCookie\82ð\8eg\97p\82µ\82Ä\82¢\82Ü\82· \8eå\82É\8dí\8f\9c\95â\8f\95\82Æ\82µ\82Ä\8eg\82¢\82Ü\82·\r
+ SN_UPLOAD(JavaScript) \93\8a\8de\83t\83H\81[\83\80\82ÌDelKey/PostKey\82ð\8bL\89¯\82µ\82Ü\82·\r
+ SN_DEL (JavaScript) \8dí\8f\9c\83t\83H\81[\83\80\82ÌKey\82ð\8bL\89¯\82µ\82Ü\82· \92l\82ª\82È\82¢\8fê\8d\87SN_UPLOAD\82ÌDelKey\82ð\83R\83s\81[\82µ\82Ü\82·\r
+ SN_USER (HTML_META) \83\86\81[\83U\81[\8cÅ\97LID\82ð\8bL\89¯\82µ\82Ü\82·\r
+ Cookie\82Ì\95Û\91¶\82Ì\8aú\8cÀ\82Æ\82©\82Í\93Á\82É\90§\8cÀ\82µ\82Ä\82¢\82È\82¢\82Ì\82Å\8bC\82É\90H\82í\82È\82©\82Á\82½\82ç\8aY\93\96\95\94\95ª\82ð\8fC\90³\82µ\82Ä\82\82¾\82³\82¢\r
+ \8aÇ\97\9d\8eÒ\82Í\82Ü\82¸\8dí\8f\9c\83t\83H\81[\83\80\82É\8aÇ\97\9d\8eÒPASS\82ð\93ü\82ê[del]\82ð\89\9f\82µ\8bL\89¯\82³\82¹\82é\82Æ\r
+ \83t\83@\83C\83\8b\8dí\8f\9c\82âSUSS\82É\93ü\82Á\82½\82è\82·\82é\8dÛ\82É\82¢\82\82ç\82©\8ay\82É\82È\82é\82Æ\8ev\82¢\82Ü\82·\r
+\r
+\83o\83O\82ð\8c©\82Â\82¯\82½\82ç\81c\r
+ \92¼\82·\95Û\8fØ\82Í\82 \82è\82Ü\82¹\82ñ\82ª\8cf\8e¦\94Â\93\99\82É\95ñ\8d\90\82à\82ç\82¦\82½\82ç\91P\8f\88\82µ\82½\82¢\82Æ\8ev\82¢\82Ü\82·\r
+\r
+\82 \82ñ\82Ü\82è\91å\82µ\82½\82±\82Æ\82Å\82Í\82È\82¢\82±\82Æ\r
+ \8bH\82É\90Ý\92u\82³\82ê\82½\83A\83b\83v\83\8d\81[\83_\82É\82 \82é\83t\83@\83C\83\8b\82Ì\8dí\8f\9c\88Ë\97\8a\82È\82Ç\82ª\89º\95\94\82Ì\83\8a\83\93\83N\82ð\92H\82Á\82Ä\r
+ \82±\82¿\82ç\82É\97\88\82é\82±\82Æ\82ª\82 \82é\82Ì\82Å \83f\83t\83H\83\8b\83g\82Å\82Í\8fÈ\97ª\82³\82ê\82Ä\82¢\82Ü\82·\82ª\r
+ \82Å\82«\82ê\82Î $set{'home_url'}([HOME]\82Ì\83\8a\83\93\83N\90æ\82Ì\92l) \82Í\96\84\82ß\82Ä\82Ù\82µ\82¢\82©\82à\82µ\82ê\82Ü\82¹\82ñ\r
+ \82È\82¨\82±\82Ì\92l\82Í ../ \82â http://example.org/~user/ \82È\82Ç\91\8a\91Î\83p\83X\82Å\82à\90â\91Î\83p\83X\82Å\82à\8d\\82¢\82Ü\82¹\82ñ\r
+\r
+\82³\82ç\82É\91å\82µ\82½\82±\82Æ\82Å\82Í\82È\82¢\82±\82Æ\r
+ \94z\95z\83A\81[\83J\83C\83u\82Ì\92\86\82É\82 \82é\83X\83N\83\8a\83v\83g\83t\83@\83C\83\8b\82Í\95W\8f\80\93I\82È\83G\83f\83B\83^\82Å\82à\r
+ \95Ò\8fW\82µ\82â\82·\82¢\82æ\82¤\82É\95¶\8e\9a\83R\81[\83h\82ÉShift-JIS\82ð\8eg\97p\82µ\82Ä\82¢\82Ü\82·\r
+ \82»\82Ì\82½\82ß\83o\83O\82Æ\82¢\82¤\82©Shift-JIS\82Ì\88ê\95\94\82Ì\95¶\8e\9a\83R\81[\83h\82ª\\82Æ\8fd\82È\82Á\82Ä\82¢\82é\89e\8b¿\82Å\r
+ \83t\83@\83C\83\8b\96¼\82É"\95\,\97\,\83\,\81["\82È\82Ç\82ª\8aÜ\82Ü\82ê\82Ä\82¢\82é\82Æ\83t\83@\83C\83\8b\96¼\82ª\93r\92\86\82Å\90Ø\82ê\82Ü\82·\r
+ \83f\83U\83C\83\93\95Ï\8dX\93\99\82Å\95¶\8e\9a\82ð\92Ç\89Á\91}\93ü\82µ\82½\8fê\8d\87 \8fê\8f\8a\82É\82æ\82Á\82Ä\82Í500\83G\83\89\81[\82ª\82Å\82é\82±\82Æ\82à\82 \82è\82Ü\82·\r
+ \95Ê\82É\83o\83C\83i\83\8a\82ª\89»\82¯\82½\82è\82·\82é\82í\82¯\82Å\82Í\82È\82¢\82Ì\82Å\82·\82ª\8bC\82É\82È\82é\90l\82Í\r
+ \83G\83f\83B\83^\93\99\82Å\83X\83N\83\8a\83v\83g\91S\91Ì\82ðEUC\82É\95Ï\8a·\82·\82é\82Ì\82ª\82æ\82¢\82©\82Æ\8ev\82¢\82Ü\82·\r
+ \90Ý\92è\8d\80\96Ú\82Ì\8fI\82í\82è\82Ì\95û\82É $set{'html_head'} \82Æ\82¢\82¤\8d\80\96Ú\82ª\82 \82é\82Ì\82Åcharset\82ð euc-jp \82É\82·\82é\82Æ\r
+ \94r\8foHTML\82ÌMETA\83^\83O\95\94\95ª\82Í\8f\91\82«\8a·\82í\82è\82Ü\82·\r
+ \81\94\93r\92\86\82©\82çEUC\82É\90Ø\82è\91Ö\82¦\82é\82Æ\82«\82Í\83\8d\83O\83t\83@\83C\83\8b\82Ì\95Ï\8a·\82à\82¨\96Y\82ê\82¸\82É...\r
+\r
+\96{\93\96\82É\91å\82µ\82½\82±\82Æ\82Å\82Í\82È\82¢\82±\82Æ\r
+ \82±\82Ì\83X\83N\83\8a\83v\83g\82Ì\83f\83t\83H\83\8b\83g\82Å\82Í\90¶\90¬\82·\82éHTML\82Ì\89E\89º\82É\94z\95z\83y\81[\83W\82Ö\82Ì\83\8a\83\93\83N\82ª\92£\82Á\82Ä\82 \82è\82Ü\82·\82ª\r
+ \83f\83U\83C\83\93\82Ì\95Ï\8dX\82â\93s\8d\87\8fã\8dí\8f\9c\82µ\82½\82¢\8fê\8d\87\82Í(\82à\82¿\82ë\82ñ\8ec\82µ\82Ä\92¸\82¯\82ê\82Î\8að\82µ\82¢\82Ì\82Å\82·\82ª)\r
+ \83\8a\83\93\83N\8by\82Ñ\95\\8e¦\82ð\8dí\8f\9c\82µ\82Ä\92¸\82¢\82Ä\82à\88ê\8cü\82É\8d\\82¢\82Ü\82¹\82ñ\r
+ \92A\82µ\82±\82ê\82Í\83X\83N\83\8a\83v\83g\82Ì\92\98\8dì\8c \82ð\95ú\8aü\82·\82é\82Æ\82¢\82¤\82±\82Æ\82Å\82Í\82 \82è\82Ü\82¹\82ñ\r
+\r
+\r
+\95â\91«\8e\96\8d\80\r
+ \83X\83N\83\8a\83v\83g\93à\82Ì\90à\96¾\82Å\8f\81X\90à\96¾\82ª\91«\82è\82È\82¢\82Æ\82±\82ë\82ª\82 \82é\82©\82à\82µ\82ê\82Ü\82¹\82ñ\82Ì\82Å\95â\91«\82µ\82Ä\82¨\82«\82Ü\82·\r
+\r
+$set{'interval'}\r
+ \93¯\88êIP\82©\82ç\82Ì\98A\91±\93\8a\8de\82ð\8ew\92è\82µ\82½\95b\90\94\82Ì\8aÔ\8b\91\94Û\82µ\82Ü\82·\r
+ \83f\83t\83H\83\8b\83g\82Í0\95b\82É\82È\82Á\82Ä\82¢\82Ü\82·\82ª \97á\82¦\82Î10\95ª\82È\82ç\82Î 60*10 \82Æ\95\\8bL\82µ\82Ä\82à\96â\91è\82 \82è\82Ü\82¹\82ñ\r
+ \82È\82¨\8dÅ\8fI\93\8a\8de\82ÌIP/\8e\9e\8aÔ\82Å\82µ\82©\94»\92f\82µ\82Ä\82¢\82È\82¢\82Ì\82Å\8fã\8bL\82Ì\97á\82Å\82·\82Æ\r
+ 10\95ª\88È\93à\82É\91¼\82Ì\90l\82ª\83A\83b\83v\83\8d\81[\83h\82ð\82µ\82½\8fê\8d\87\82Í\89ð\8f\9c\82³\82ê\82Ä\82µ\82Ü\82¢\82Ü\82·\r
+\r
+$set{'max_all_flag'}\r
+ \82±\82Ì\92l\82ð\97L\8cø\82É\82·\82é\82Æ\93\8a\8de\90\94\88È\8aO\82É\83t\83@\83C\83\8b\82Ì\97e\97Ê\82Å\82à\83\8d\83O\97\8e\82¿\82ð\94»\92è\82·\82é\82æ\82¤\82É\82È\82è\82Ü\82·\r
+ \83\8c\83\93\83^\83\8b\83T\81[\83o\82È\82Ç\97e\97Ê\82ª\8cÀ\82ç\82ê\82Ä\82¢\82é\8fê\8d\87\96ð\82É\97§\82Â\82Ì\82Å\82Í\82È\82¢\82Å\82µ\82å\82¤\82©\81H\r
+ \92\8d\88Ó\82Æ\82µ\82Ä\82Í \97á\82¦\82Î 1\83t\83@\83C\83\8b\82Ì\8dÅ\91å\97e\97Ê\82ª10MB($set{'max_size'} = 10*1024),\r
+ \91\8d\97e\97Ê50MB($set{'max_all_size'}= 50*1024) \82É\90Ý\92è\82µ\82½\8fê\8d\87\r
+ \83T\81[\83o\82É\8aù\82É50MB\82 \82é\8fó\91Ô\82Å 10MB\82Ì\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82³\82ê\82é\82Æ\r
+ \88ê\8e\9e\93I\82É 50MB+10MB = 60MB \82ª\8fÁ\94ï\82³\82ê\82Ü\82· \82Ü\82½\95¡\90\94\93¯\8e\9e\83A\83b\83v\83\8d\81[\83h\8e\9e\82É\82à\93¯\97l\82Ì\82±\82Æ\82ª\8c¾\82¦\82Ü\82·\82Ì\82Å\r
+ \8f\82µ\97]\97T\82ð\8e\9d\82Á\82Ä(\83T\81[\83o\90§\8cÀ\97Ê\82æ\82è\82Í\8f\82È\82ß\82É)\90Ý\92è\82µ\82½\82Ù\82¤\82ª\82æ\82³\82»\82¤\82Å\82·\r
+ \82Ü\82½\95Û\8e\9d\8c\8f\90\94\90§\8cÀ\8e\9e\82à\82»\82¤\82Å\82·\82ª \83p\81[\83~\83b\83V\83\87\83\93\90Ý\92è,\83A\83N\83Z\83X\8c \82È\82Ç\82Ì\8aÖ\8cW\82Å\r
+ \83t\83@\83C\83\8b\82ª\8dí\8f\9c\82Å\82«\82È\82©\82Á\82½\8fê\8d\87\82Í(\83t\83@\83C\83\8b\82ª\8eÀ\8dÛ\82É\8ec\82Á\82Ä\82¢\82é\82Ì\82Å)\83\81\83C\83\93\83\8d\83O\82©\82ç\82Í\8dí\8f\9c\82µ\82Ä\82¢\82Ü\82¹\82ñ\r
+ \82æ\82Á\82Ä\90Ý\92è\83\8d\83O\90\94/\97e\97Ê\82æ\82è\8eÀ\8dÛ\82Ì\83\8d\83O\90\94/\97e\97Ê\82ª\91½\82\82È\82é\82±\82Æ\82ª\82 \82è\82Ü\82·\r
+\r
+$set{'up_all'}\r
+ \82±\82Ì\92l\82ð\97L\8cø\82É\82·\82é\82Æ$set{'up_ext'}\82É\93o\98^\82³\82ê\82Ä\82¢\82é\82à\82Ì\88È\8aO\82Å\82à\83A\83b\83v\83\8d\81[\83h\82ð\8eó\82¯\95t\82¯\82Ü\82·\r
+ $set{'ext_org'}\82ª\96³\8cø\82É\82È\82Á\82Ä\82¢\82é\8fê\8d\87(=0)\82Í\8ag\92£\8eq'.bin'\82Å\93o\98^\82³\82ê\82Ü\82·\r
+ $set{'ext_org'}\82ª\97L\8cø\82É\82È\82Á\82Ä\82¢\82é\8fê\8d\87(=1)\82Í\93\8a\8de\8e\9e\82Ì\8ag\92£\8eq\82É\82È\82è\82Ü\82·\r
+ $set{'ext_org'}\82ð\97L\8cø\82É\82·\82é\8fê\8d\87(=1)\82Í\r
+ \83X\83N\83\8a\83v\83g\8c¾\8cê\82È\82Ç\97\\8aú\82¹\82Ê\93®\8dì\82ð\82·\82é\8fê\8d\87\82ª\82 \82è\82Ü\82·\82Ì\82Å\r
+ \83Z\83L\83\85\83\8a\83e\83B\81[\82É\82Í\8f\\95ª\8bC\82ð\82Â\82¯\82Ä\89º\82³\82¢\r
+\r
+$set{'find_crypt'}\r
+ \82±\82Ì\92l\82ª\97L\8cø\82É\82È\82Á\82Ä\82¢\82é\82Æ\83A\83b\83v\83\8d\81[\83h\82³\82ê\82½\83A\81[\83J\83C\83u\82ª\88Ã\8d\86\89»\82³\82ê\82Ä\82¢\82é\82©\92²\82×\82Ü\82·(ZIP\82Ì\82Ý)\r
+ \88Ã\8d\86\89»\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82ÍCOMMENT\82Ì\8dÅ\8f\89\82É\90Ô\82Ì"*"\82ª\95t\82«\82Ü\82·\r
+ \91å\91Ì\8c\9f\8fo\8fo\97\88\82Ä\82é\83i \82Æ\8ev\82í\82ê\82é\8fê\8d\87\82É\82Í\94r\8foHTML\82Ì\82Ç\82±\82©\82É*\82ÍPASS\95t\82¾ \82Æ\8f\91\82¢\82Ä\82¨\82¯\82Î\r
+ \83_\83E\83\93\83\8d\81[\83h\82·\82é\91¤\82É\82à\91½\8f\82Í\83\81\83\8a\83b\83g!?\82ª\82 \82é\82©\82È\82Æ\8ev\82¢\82Ü\82·\r
+\r
+$set{'binary_compare'}\r
+ \82±\82Ì\92l\82ª\97L\8cø\82É\82È\82Á\82Ä\82¢\82é\82Æ\8aù\82É\83A\83b\83v\83\8d\81[\83h\82³\82ê\82Ä\82¢\82é\83t\83@\83C\83\8b\82Æ\83o\83C\83i\83\8a\94ä\8ar\82ð\82µ\82Ü\82·\r
+ \88ê\92v\82µ\82½\82ç\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82³\82¹\82Ü\82¹\82ñ\r
+\r
+$set{'post_key'}\r
+ $set{'post_flag'}\82ª\97L\8cø\82É\82È\82Á\82Ä\82¢\82é\8fê\8d\87(=1)\82Í\82±\82Ì\92l\82ð\83t\83H\81[\83\80\82É\93ü\97Í\82µ\82È\82¢\82Æ\r
+ \83A\83b\83v\83\8d\81[\83h\82Å\82«\82È\82\82È\82è\82Ü\82· PostKey\82Í,\82Å\8bæ\90Ø\82é\82±\82Æ\82Å\95¡\90\94\94\8ds\82·\82é\82±\82Æ\82ª\82Å\82«\r
+ \83\81\83C\83\93\83\8d\83O\82É\82Í\94õ\8dl\82Æ\82µ\82Ä\93\8a\8de\82³\82ê\82½\8dÛ\82ÌPostKey\82ª\8bL\98^\82³\82ê\82Ü\82·\r
+ \93r\92\86\82©\82çPostKey\82ð\97L\8cø\82É\82·\82é\8fê\8d\87\82Í\93\8a\8de\83t\83H\81[\83\80\82ÉPostKey\82Ì\8d\80\96Ú\82ª\82 \82è\82Ü\82¹\82ñ\82Ì\82Å\r
+ \83X\83N\83\8a\83v\83g\82ð\90Ý\92è\82µ\82½\82ç\8fã\8bL\82Ì\81uHTML\82ð\8dX\90V\82µ\82½\82¢\8fê\8d\87\81v\82ð\8eQ\8dl\82ÉHTML\82ð\8dX\90V\82µ\82Ä\82\82¾\82³\82¢\r
+\r
+$set{'dlkey'}\r
+ DLKey\82Ì\8eg\97p\82Ì\97L\96³\r
+ \83A\83b\83v\83\8d\81[\83h\82³\82ê\82½\83t\83@\83C\83\8b\82ð ./src/up****.*** \82©\82ç ./src/up****.***_[a-zA-Z0-9]{20}/up****.***\r
+ \82É\83\8a\83l\81[\83\80\82·\82é\82±\82Æ\82É\82æ\82Á\82Ä\8dì\90¬\82³\82ê\82é\83t\83@\83C\83\8b\83\8a\83X\83g\82Ì\83\8a\83\93\83N\82æ\82è\92H\82ê\82È\82\82µ\82Ü\82·\r
+ \8eÀURL\82Í\93\8a\8de\8e\9e\90Ý\92è\82µ\82½DLKey\82É\82Ä\94F\8fØ\82·\82é\82±\82Æ\82É\82æ\82Á\82Ä\8eQ\8fÆ\82Å\82«\82Ü\82·\r
+ perl\82ð\96³\91Ê\82É\8bN\93®\82µ\82½\82\82È\82¢\8fê\8d\87\82Í $set{'dummy_html'} \82Ì\92l\82ð 2\88È\8fã\82É\82·\82é\82Æ\81A\r
+ \94F\8fØ\8e\9e\82ÌHTML\82ð\90Ã\93IHTML\82Å\93f\82«\8fo\82·\82æ\82¤\82É\82È\82è\82Ü\82·\81B\r
+ \96³\91Ê\82ÈCGI\82Ì\8bN\93®\82ª\8c¸\82è\82Ü\82·\82Ì\82Å\96â\91è\82ª\82È\82¯\82ê\82Î\90Ã\93IHTML\82ð\93f\82«\8fo\82·\82æ\82¤\82É\82·\82é\82±\82Æ\82ð\82¨\8a©\82ß\82µ\82Ü\82·\81B\r
+\r
+$set{'zero_clear'}\r
+ FTP\82È\82ÇCGI\88È\8aO\82©\82ç\82Ì\91\80\8dì\82Å\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82µ\82½\8fê\8d\87\r
+ \83\81\83C\83\93\83\8d\83O\82É\82Í\8fî\95ñ\82ª\8ec\82Á\82Ä\82¢\82é\82ª\83\8a\83\93\83N\90æ\82Ì\83t\83@\83C\83\8b\82ª\82È\82¢\82Æ\82¢\82¤\82±\82Æ\82ª\82 \82è\82Ü\82·\r
+ \82±\82Ì\92l\82ª\97L\8cø\82È\8fê\8d\87\8e\9f\89ñ\83t\83@\83C\83\8b\83A\83b\83v\83\8d\81[\83h\8e\9e\82É\8aY\93\96\83t\83@\83C\83\8b\8fî\95ñ\82ð\83\81\83C\83\93\83\8d\83O\82©\82ç\8dí\8f\9c\82µ\82Ü\82·\r
+ \97L\8cø\82É\82µ\82È\82©\82Á\82½\8fê\8d\87\82Í\8e\9f\89ñ\8dX\90V\8e\9e\82©\82ç\82à0\83o\83C\83g\82Ì\83t\83@\83C\83\8b\82Æ\82µ\82ÄHTML\83t\83@\83C\83\8b\83\8a\83X\83g\82É\8bL\8dÚ\82³\82ê\82Ü\82·\r
+\r
+$set{'http_src_path'}\r
+ \8bH\82É\83t\83@\83C\83\8b\83\8a\83X\83g\82Ì\83\8a\83\93\83N\82É\91\8a\91ÎPATH\82ð\8eg\82¦\82È\82¢\83P\81[\83X\82ª\82 \82è\82Ü\82·\82Ì\82Å\r
+ \82»\82Ì\82æ\82¤\82È\8fê\8d\87\82Í\82±\82Ì\92l\82ð\90Ý\92è\82·\82é\8e\96\82É\82æ\82Á\82Ä\96¾\8e¦\93I\82É\83t\83@\83C\83\8b\82Ì\88Ê\92u\82ð\8ew\92è\82Å\82«\82Ü\82·\r
+ \8f®\8ew\92è\82µ\82½\8fê\8d\87\82Í \83t\83@\83C\83\8b\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a $set{'src_dir'} \82É\82Í \r
+ /home/user/public_html/upload/src/ \82È\82Ç\82Ì\83T\81[\83o\93à\90â\91ÎPATH\82ð\8eg\97p\82·\82é\82±\82Æ\82à\82Å\82«\82Ü\82·\r
+ \91\8a\91ÎPATH(\83f\83t\83H\83\8b\83g)\82Å\96â\91è\82È\82¢\8fê\8d\87\82Í\93Á\82É\90Ý\92è\82µ\82È\82\82Ä\8d\\82¢\82Ü\82¹\82ñ\r
+\r
+$set{'link_target'}\r
+ \83t\83@\83C\83\8b\96¼\82É\92£\82ç\82ê\82Ä\82¢\82é\83\8a\83\93\83N\82Ìtarget\91®\90«\82Å\82·\r
+ \90V\8bK\82Ì\83E\83B\83\93\83h\83E\82Å\8aJ\82«\82½\82¢\8fê\8d\87\82Í _blank \82Æ\93ü\97Í\82µ\82Ü\82·\r
+\r
+Sn Uploader (c) 2003-2005 SUGA All rights reserved.\r
--- /dev/null
+21:34 2005/10/10\r
+\r
+\93K\93\96\82È Sn Uploader FAQ\r
+\r
+Q1. \82±\82ê\82Í\89½\82Å\82·\82©\81H\r
+Q2. Perl\82Å\82·\82©\81HPHP\82Å\82·\82©\81H\r
+Q3. \90Ý\92u\82Å\82«\82Ü\82¹\82ñ(\93®\82«\82Ü\82¹\82ñ,500\83G\83\89\81[\82ª\82Å\82é)\r
+Q4. NoCGI.pm\94Å\82ÆCGI.pm\94Å\82Ç\82Á\82¿\8eg\82¦\82Î\82¢\82¢\82ñ\82Å\82·\82©\81H\r
+Q5. \90Ý\92è\82Ì 0\82Æ\82© 1\82Æ\82© \82Á\82Ä\89½\82Å\82·\82©\81H\r
+Q6. \83t\83\8c\81[\83\80\82ð\8eg\82Á\82Ä\82¢\82é\83y\81[\83W\82È\82Ì\82Å\83\8a\83\93\83N\82ð\83N\83\8a\83b\83N\82µ\82½\82ç\90V\82µ\82¢\83E\83B\83\93\83h\83E\82Å\8aJ\82«\82½\82¢\r
+Q7. \90Ý\92è\82Í\83f\83t\83H\83\8b\83g\82Ì\82Ü\82Ü\82¶\82á\82¢\82¯\82È\82¢\82Ì\81H\r
+Q8. \83\86\81[\83U\82©\82çkey\82Í\82 \82Á\82Ä\82é(\82Í\82¸\82È)\82Ì\82É\83t\83@\83C\83\8b\82ª\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Æ\8c¾\82í\82ê\82é\r
+Q9. \83G\83\89\81[\83\81\83b\83Z\81[\83W\82ª\91S\82\95\\8e¦\82³\82ê\82Ü\82¹\82ñ\r
+Q10. NoCGI.pm\94Å\82Å\83G\83\89\81[\83\81\83b\83Z\81[\83W\82ÉPOST\83f\81[\83^\95s\8a®\91S\82Æ\91å\97Ê\82É\8ec\82Á\82Ä\82¢\82Ü\82·\r
+Q11. \8aÇ\97\9d\83\82\81[\83h\82É\93ü\82é\82Ì\82ª\96Ê\93|\82Å\82·\r
+Q12. \90Ô\82¢"*"\82Á\82Ä\89½\81H\r
+Q13. POSTKey\95¡\90\94\90Ý\92è\82Å\82«\82é\82Á\82Ä\89½\82Ì\88Ó\96¡\82ª\82 \82é\82ñ\82Å\82·\82©\81H\r
+Q14. \8dí\8f\9cKey\82ð\96Y\82ê\82Ä\82µ\82Ü\82¢\82Ü\82µ\82½\8dí\8f\9c\83t\83H\81[\83\80\82É\82à\8e©\93®\93ü\97Í\82³\82ê\82Ä\82Ü\82¹\82ñ\r
+Q15. [Upload][Cancel]\82Ì[Upload]\82ª\8fÁ\82¦\82¿\82á\82¢\82Ü\82µ\82½\r
+Q16. IIS\82Å\82Í\93®\82©\82È\82¢\82Ì\81H\r
+Q17. ANHTTPD,BlackJumboDog\82Å\82à\93®\82«\82Ü\82·\82©\81H\r
+Q18. \83^\83C\83g\83\8b\82Ì"Uploader" \82â "Now.. Testing.." \82Æ\95\\8e¦\82³\82ê\82Ä\82¢\82é\95\94\95ª\82ð\8f\91\82«\8a·\82¦\82½\82¢\r
+Q19. \83\8a\83X\83g\82Ì\8f\87\94Ô\82ª\93\8a\8de\8e\9e\8aÔ\8f\87\82Å\82Í\82 \82è\82Ü\82¹\82ñ\82ª\82È\82º\82Å\82µ\82å\82¤\82©\81H\r
+Q20. \90Ý\92u\82µ\82½\82ç\83T\81[\83o\82ª\8fd\82\82È\82è\82Ü\82µ\82½ \89½\82©\89ü\91P\82·\82é\95û\96@\82Í\82 \82è\82Ü\82·\82©\81H\r
+Q21. \8dÅ\91å\93\8a\8de\97e\97Ê\82Í\82Ç\82ê\82\82ç\82¢\82Ü\82Å\82¢\82¯\82Ü\82·\82©\81H\r
+Q22. \97e\97Ê\90§\8cÀ\82ª\82 \82é\83T\81[\83o\82Å\82Í\82Ç\82Ì\82æ\82¤\82È\90Ý\92è\82ª\96]\82Ü\82µ\82¢\82Ì\82Å\82µ\82å\82¤\82©\81H\r
+Q23. \8ag\92£\8eqMP4(\91å\95¶\8e\9a)\82ð\92Ç\89Á\82µ\82½\82Ì\82Å\82·\82ª\94F\8e¯\82³\82ê\82Ü\82¹\82ñ\r
+Q24. \8ag\92£\8eqMP4(\91å\95¶\8e\9a)\82ð\83A\83b\83v\83\8d\81[\83h\82·\82é\82Æ\8f¬\95¶\8e\9a\82É\82È\82Á\82Ä\82µ\82Ü\82¤\r
+\r
+///////////////////////////////////////////////\r
+\r
+Q1. \82±\82ê\82Í\89½\82Å\82·\82©\81H\r
+A1. \94Ä\97p\83t\83@\83C\83\8b\83A\83b\83v\83\8d\81[\83_\82Å\82·\r
+ \8bC\8cy\82É\83u\83\89\83E\83U\82©\82ç\83T\81[\83o\82É\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82·\82é\82±\82Æ\82ª\82Å\82«\82Ü\82·\r
+\r
+Q2. Perl\82Å\82·\82©\81HPHP\82Å\82·\82©\81H\r
+A2. Perl\83X\83N\83\8a\83v\83g\82Å\82· Perl5\82È\82ç\93®\82\82Æ\8ev\82¢\82Ü\82· PHP\83X\83N\83\8a\83v\83g\82Å\82Í\82 \82è\82Ü\82¹\82ñ\r
+\r
+Q3. \90Ý\92u\82Å\82«\82Ü\82¹\82ñ(\93®\82«\82Ü\82¹\82ñ,500\83G\83\89\81[\82ª\82Å\82é)\r
+A3. \8aù\82É\91¼\82ÌCGI\83v\83\8d\83O\83\89\83\80\82ð\90Ý\92u\82µ\82Ä\82¢\82é\8fê\8d\87\82Í\82»\82Ì\90Ý\92è\82ð\8eQ\8dl\82É\82µ\82Ä\82Ý\82Ä\82\82¾\82³\82¢\r
+ \8eå\82ÉPerl\82ÌPATH\82ª\88á\82¤\8fê\8d\87\82âsuexec\82È\82Ì\82É\90Ý\92u\83f\83B\83\8c\83N\83g\83\8a\82Ì\83p\81[\83~\83b\83V\83\87\83\93\82ª777\82È\82Ç\82Ì\8fê\8d\87\82ª\91½\82¢\82æ\82¤\82Å\82·\r
+ \82Ü\82½\83\8d\83O\83t\83@\83C\83\8b\82â\83t\83@\83C\83\8b\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\82Í\8f\89\89ñ\83A\83N\83Z\83X\8e\9e\82É\8e©\93®\90¶\90¬\82µ\82Ü\82·\82Ì\82Å\r
+ FTP\91\80\8dì\82È\82Ç\82Å\82Í\8dì\82ç\82È\82¢\95û\82ª\8c\9c\96½\82Å\82·\r
+\r
+Q4. NoCGI.pm\94Å\82ÆCGI.pm\94Å\82Ç\82Á\82¿\8eg\82¦\82Î\82¢\82¢\82ñ\82Å\82·\82©\81H\r
+A4. \82Ç\82Á\82¿\82Å\82à\8d\\82¢\82Ü\82¹\82ñ\82ª NoCGI.pm\94Å\82Ì\95û\82ª\83A\83b\83v\83\8d\81[\83h\8f\88\97\9d\82ª\91½\8f\91¬\82¢\82Ý\82½\82¢\82Å\82·\r
+\r
+Q5. \90Ý\92è\82Ì 0\82Æ\82© 1\82Æ\82© \82Á\82Ä\89½\82Å\82·\82©\81H\r
+A5. \8aî\96{\93I\82ÉON\82©OFF\82Å\90Ý\92è\82·\82é\82à\82Ì\82Í ON=1,OFF=0 \82Å\94»\95Ê\82µ\82Ü\82·\r
+\r
+Q6. \83t\83\8c\81[\83\80\82ð\8eg\82Á\82Ä\82¢\82é\83y\81[\83W\82È\82Ì\82Å\83\8a\83\93\83N\82ð\83N\83\8a\83b\83N\82µ\82½\82ç\90V\82µ\82¢\83E\83B\83\93\83h\83E\82Å\8aJ\82«\82½\82¢\r
+A6. $set{'link_target'} \82Ì\92l\82É _blank \82ð\90Ý\92è\82µ\82Ä\82\82¾\82³\82¢\r
+\r
+Q7. \90Ý\92è\82Í\83f\83t\83H\83\8b\83g\82Ì\82Ü\82Ü\82¶\82á\82¢\82¯\82È\82¢\82Ì\81H\r
+A7. \8aî\96{\93I\82É\82Í\8aÇ\97\9d\8eÒPASS\82Ì\95Ï\8dX\82¾\82¯\82Å\8d\\82í\82È\82¢\82Æ\8ev\82¢\82Ü\82·\r
+ \90Ý\92è\82Ì\8fd\97v\93x\82Í(\8cÂ\90l\93I\82É\82Í)\8fã\82Ì\8d\82\82 \89º\82Ì\95û\82Í\88ê\95\94\82Ì\95û\82ª\8eg\82¤\82æ\82¤\82È\8a´\82¶\82¾\82Æ\8ev\82¢\82Ü\82·\r
+\r
+Q8. \83\86\81[\83U\82©\82çkey\82Í\82 \82Á\82Ä\82é(\82Í\82¸\82È)\82Ì\82É\83t\83@\83C\83\8b\82ª\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Æ\8c¾\82í\82ê\82é\r
+A8. \8dí\8f\9c\8fð\8c\8f\82ª\82 \82Á\82Ä\82È\82¢\82Æ\8ev\82¢\82Ü\82· (\81L\81[\81M)\83m~~\r
+ \8eÀ\8dÛ\82â\82Á\82Ä\82Ý\82Ä\8fÁ\82¦\82È\82©\82Á\82½\82ç\98A\97\8d\82\82¾\82³\82¢\r
+ 031003\88È\8d~\82É\82Í\8cÂ\95ÊCookie\82Å\82Ì\94»\92è\82ª\92Ç\89Á\82³\82ê\82Ä\82Ü\82·\r
+\r
+Q9. \83G\83\89\81[\83\81\83b\83Z\81[\83W\82ª\91S\82\95\\8e¦\82³\82ê\82Ü\82¹\82ñ\r
+A9. 031003\88È\91O\82Ì\82à\82Ì\82Í\8ed\97l\82Å\82·...031003\88È\8d~\82É\82Í\83G\83\89\81[\95\\8e¦\8b@\94\\82ª\82Â\82¢\82Ä\82¢\82Ü\82·\r
+\r
+Q10.NoCGI.pm\94Å\82Å\83G\83\89\81[\83\81\83b\83Z\81[\83W\82ÉPOST\83f\81[\83^\95s\8a®\91S\82Æ\91å\97Ê\82É\8ec\82Á\82Ä\82¢\82Ü\82·\r
+A10.\83A\83b\83v\83\8d\81[\83h\92\86\82É\83u\83\89\83E\83U\81[\82Ì\92\86\8e~\82È\82Ç\82ð\89\9f\82·\82Æ\82»\82¤\8bL\98^\82³\82ê\82Ü\82·\r
+ POST\83f\81[\83^\95s\8a®\91S = \83\86\81[\83U\81[\83A\83b\83v\83\8d\81[\83h\92\86\8e~ \82Æ\8dl\82¦\82Ä\82à\82ç\82Á\82Ä\8d\\82¢\82Ü\82¹\82ñ\r
+ \82¿\82È\82Ý\82ÉNoCGI.pm\94Å\82ª\83A\83b\83v\83\8d\81[\83h\83~\83X\82ª\91½\82¢\82Æ\8c¾\82¤\82í\82¯\82Å\82Í\82 \82è\82Ü\82¹\82ñ\r
+ CGI.pm\94Å\82Í\83f\83R\81[\83h\95û\96@\82ª\88á\82¢\82Ü\82·\82Ì\82Å\82±\82Ì\8eè\82Ì\8c\9f\8fo\83\8b\81[\83`\83\93\82ª\96³\82¢\82¾\82¯\82Å\82·\r
+ \91¼\82Ì\83A\83b\83v\83\8d\81[\83_\82É\82Í\82È\82¢(\8bL\98^\82·\82é\83\8c\83x\83\8b\82Å\82Í\82È\82¢)\83G\83\89\81[\83\81\83b\83Z\81[\83W\82Ì\97Þ\82È\82Ì\82Å\r
+ \82¢\82ç\82È\82¢\82Æ\8ev\82¦\82Î\89q\90¶\8fã\83\8d\83O\82É\8bL\98^\82µ\82È\82¢\82æ\82¤\82É\82µ\82½\82Ù\82¤\82ª\82¢\82¢\82©\82à\82µ\82Ü\82¹\82ñ\r
+> 1004\94Å\82¾\82Æ\83X\83N\83\8a\83v\83g\8aJ\82¢\82Ä POST\83f\81[\83^\95s\8a®\91S \82Å\8c\9f\8dõ\82·\82é\82Æ\8dÅ\8cã\82Ì\95û\82É\r
+> elsif($no == 108){ $flag = 1; $message = "POST\83f\81[\83^\95s\8a®\91S" \81`\r
+> \82Æ\82 \82è\82Ü\82·\82Ì\82Å\81@\82±\82±\82ð\r
+> # elsif($no == 108){ $flag = 1; $message = "POST\83f\81[\83^\95s\8a®\91S" \81`\r
+> \82Æ \90æ\93ª\82É # \82ð\92Ç\89Á\82·\82é\82Æ\r
+> \83G\83\89\81[\83\81\83b\83Z\81[\83W\82É\82Í\8bL\98^\82µ\82È\82\82È\82è\82Ü\82·\81B\r
+\r
+Q11.\8aÇ\97\9d\83\82\81[\83h\82É\93ü\82é\82Ì\82ª\96Ê\93|\82Å\82·\r
+A11.\8aÇ\97\9d\90l\82Í\82Ü\82¸\8dí\8f\9c\83t\83H\81[\83\80\82É\8aÇ\97\9d\90lPASS\82ð\8ao\82¦\82³\82¹\82Ä\82\82¾\82³\82¢\r
+ Cookie&JavaScript\82ª\8eg\82¦\82é\8fê\8d\87\82Í \8e\9f\82©\82ç\82Í\83t\83H\81[\83\80\82ÉPASS\82ª\8e©\93®\93ü\97Í\82³\82ê\82Ü\82·\82Ì\82Å\r
+ \90\94\8e\9a\82ð\93ü\82ê\82é\82Æ\83t\83@\83C\83\8b\8dí\8f\9c,\8aÇ\97\9d\83\86\81[\83UID\93ü\82ê\82é\82Æ\8aÇ\97\9d\89æ\96Ê\82É\93ü\82ê\82Ü\82·\r
+\r
+Q12.\90Ô\82¢"*"\82Á\82Ä\89½\81H\r
+A12.\93K\93\96\82È\93Æ\8e©\8eÀ\91\95\82É\82æ\82é\88Ã\8d\86\89»ZIP\8c\9f\8fo\82Ì\83}\81[\83L\83\93\83O\82Å\82·\r
+ \82à\82µ\82©\82µ\82½\82ç\8cë\94»\95Ê\82µ\82Ä\82é\8fê\8d\87\82à\82 \82é\82©\82à\82µ\82ê\82Ü\82¹\82ñ\r
+\r
+Q13.POSTKey\95¡\90\94\90Ý\92è\82Å\82«\82é\82Á\82Ä\89½\82Ì\88Ó\96¡\82ª\82 \82é\82ñ\82Å\82·\82©\81H\r
+A13.\8cÂ\90l\96\88\82É\94\8ds\82·\82é\82Æ\92N\82ª\82 \82°\82Ä\82é\82©\95ª\82©\82é\82©\82à\82µ\82ê\82Ü\82¹\82ñ\r
+ FTP\82Ì\83A\83J\83E\83\93\83gID\82ÆPASS\82ð1\90l\82É\8b³\82¦\82½\82ç\88ê\83\95\8c\8e\8cã\82É\82Í\r
+ \82È\82º\82©\82»\82Ì\83A\83J\83E\83\93\83gID\82ÆPASS\82Å\95¡\90\94\83N\83\89\83C\83A\83\93\83g\82ª\8cq\82ª\82Á\82Ä\82½\82Æ\82¢\82¤\r
+ \98b\82ð\92m\82è\8d\87\82¢\82©\82ç\95·\82¢\82½\82Ì\82Å\82Ç\82ÌPOSTKey\82Å\83A\83b\83v\83\8d\81[\83h\82µ\82Ä\82é\82©\r
+ \8bL\98^\82µ\82Ä\82Ý\82é\82Æ\96Ê\94\92\82¢\82©\82È\82Æ\95¡\90\94\90Ý\92è\82Å\82«\82é\82æ\82¤\82É\82µ\82Ä\82Ý\82Ü\82µ\82½\r
+\r
+Q14.\8dí\8f\9cKey\82ð\96Y\82ê\82Ä\82µ\82Ü\82¢\82Ü\82µ\82½\8dí\8f\9c\83t\83H\81[\83\80\82É\82à\8e©\93®\93ü\97Í\82³\82ê\82Ä\82Ü\82¹\82ñ\r
+A14.\93\8a\8de\83t\83H\81[\83\80\82É\8e©\93®\93ü\97Í\82ª\8ec\82Á\82Ä\82¢\82é\8fê\8d\87\82É\8cÀ\82Á\82Ä\82Í\r
+ 1.\8dí\8f\9c\83t\83H\81[\83\80\82ÌNo,key\8b¤\82É\82¢\82ê\82¸\82É[del]\82ð\89\9f\82·(\8dí\8f\9cCookie\83N\83\8a\83A)\r
+ 2.\93\8a\8de\83t\83H\81[\83\80\82Ì[Upload]\82ð\89\9f\82·(\8dí\8f\9cCookie\83R\83s\81[)\r
+ \8fã\8bL\91\80\8dì\82Å\93\8a\8de\83t\83H\81[\83\80\82ÌDelKey\82ª\83R\83s\81[\82³\82ê\82é\83n\83Y\82Å\82·\r
+\r
+Q15.[Upload][Cancel]\82Ì[Upload]\82ª\8fÁ\82¦\82¿\82á\82¢\82Ü\82µ\82½\r
+A15.\95¶\8e\9a\83R\81[\83h\82ðEUC\82É\82µ\82æ\82¤\82Æ\82µ\82½\82Ì\82Å\82Í\82È\82¢\82Å\82µ\82å\82¤\82©\81H\r
+ $set{'charset'} = euc-jp; \82É\82µ\82Ä\82à \95¶\8e\9a\83R\81[\83h\82ªSHIFT-JIS\82Ì\82Ü\82Ü\82Ì\8fê\8d\87\r
+ \82»\82Ì\82æ\82¤\82É\95\\8e¦\82³\82ê\82é\82±\82Æ\82ª\82 \82è\82Ü\82·\r
+ \83G\83f\83B\83^\82âFTP\93]\91\97\82Å\83X\83N\83\8a\83v\83g\82Ì\95¶\8e\9a\83R\81[\83h\82àEUC\82É\95Ï\8a·\82µ\82Ä\82\82¾\82³\82¢\r
+\r
+Q16.IIS\82Å\82Í\93®\82©\82È\82¢\82Ì\81H\r
+A16.\91S\82\93®\82©\82È\82¢\82±\82Æ\82à\82È\82¢\82Å\82·\82ª\82±\82¿\82ç\82Ì\8am\94F\82µ\82½\8cÀ\82è\82Å\82Í\93®\8dì\82É\95s\90R\82È\93_\82ª\82 \82é\82½\82ß\82¨\8a©\82ß\82µ\82Ü\82¹\82ñ\r
+ \93Á\92è\82Ì\91\80\8dì\82ð\82·\82é\82Æ\83v\83\8d\83Z\83X\82ª\8fI\82í\82ç\82È\82\82È\82èCPU\8eg\97p\97¦\82ª100%\82Ì\82Ü\82Ü\82É\82È\82è\82Ü\82·\r
+\81@\81@\82»\82Ì\97l\82È\83P\81[\83X\82É\8a×\82Á\82½\8fê\8d\87\82Í [Web\83T\83C\83g\82Ì\83v\83\8d\83p\83e\83B] \82©\82ç\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Ì [\83A\83\93\83\8d\81[\83h] \82ð\82µ\82Ä\82\82¾\82³\82¢\r
+ 2003/10/11\8c»\8dÝ \82±\82¿\82ç\82Å\82Ì\88ê\92Ê\82è\82Ì\93®\8dì\82ð\8am\94F\82µ\82½\8aÂ\8b«\82Í CGI.pm\94Å/NoCGI.pm\94Å\8b¤\82É\r
+ \81@ WinXPPro (Perl5.8.0) -> Apache1.3.28/2.0.47 ANHTTPD1.42k BlackJumboDog3.3.5\r
+ Redhat6.2 (Perl5.6.1) -> Apache1.3.27\r
+ \81@ FreeBSD4.8R(Perl5.005_3) -> Apache1.3.27/2.0.47\r
+ Solaris8 (Perl5.6.1) -> Apache1.3.27\r
+ \82Æ\82È\82Á\82Ä\82¢\82Ü\82·(\82¢\82¸\82ê\82ài386,Redhat\82ÆFreeBSD\82ÍsuEXEC)\r
+ \8c©\82ê\82Î\95ª\82©\82é\82æ\82¤\82É\82±\82¿\82ç\82Æ\82µ\82Ä\82Í\8aî\96{\93I\82Éhttpd\82É\82ÍApache\90\84\8f§\82Å\82·\r
+\r
+Q17.ANHTTPD,BlackJumboDog\82Å\82à\93®\82«\82Ü\82·\82©\81H\r
+A17.NoCGI.pm\94Å/CGI.pm\94Å\8b¤\82É\96â\91è\82È\82\93®\82\82Æ\8ev\82¢\82Ü\82·\82ª\r
+ \83p\83t\83H\81[\83}\83\93\83X\82Ì\96Ê\82Å\8c©\82é\82Æ Apache + NoCGI.pm\94Å \82ª\82æ\82³\82»\82¤\82Å\82·\r
+\r
+Q18.\83^\83C\83g\83\8b\82Ì"Uploader" \82â "Now.. Testing.." \82Æ\95\\8e¦\82³\82ê\82Ä\82¢\82é\95\94\95ª\82ð\8f\91\82«\8a·\82¦\82½\82¢\r
+A18.\8aù\82É\82 \82é\95¶\8e\9a\82ð\8f\91\82«\8a·\82¦\82é\92ö\93x\82È\82ç\83X\83N\83\8a\83v\83g\93à\82ð\8aY\93\96\95¶\8e\9a\82Å\8c\9f\8dõ\82µ\82Ä\92u\82«\8a·\82¦\82Ä\82\82¾\82³\82¢\r
+ HTML\83w\83b\83_\82È\82Ç\82Í\8c\8b\8d\\83q\83A\83h\83L\83\85\83\81\83\93\83g\82Å\8f\91\82¢\82Ä\82é\95\94\95ª\82ª\91½\82¢\82Ì\82Å\r
+ HTML\83^\83O\82Ì\92m\8e¯\82ª\82 \82ê\82Î\94ä\8ar\93I\8aÈ\92P\82É\8f\91\82«\8a·\82¦\82ç\82ê\82é\82Æ\8ev\82¢\82Ü\82·\r
+\r
+Q19.\83\8a\83X\83g\82Ì\8f\87\94Ô\82ª\93\8a\8de\8e\9e\8aÔ\8f\87\82Å\82Í\82 \82è\82Ü\82¹\82ñ\82ª\82È\82º\82Å\82µ\82å\82¤\82©\81H\r
+A19.\83\8a\83X\83g\82É\95\\8e¦\82³\82ê\82é\93\8a\8de\8e\9e\8aÔ\82Í POST\8aJ\8en\8e\9e \82Ì\8e\9e\8aÔ\82Å\82·\r
+ \83\8d\83O\82ª\8dX\90V\82³\82ê\82é\82Ì\82Í POST\8a®\97¹\8cã \82È\82Ì\82Å\83\8d\83O\82Ì\8e\9e\8aÔ\95\\8bL\82Ì\8f\87\94Ô\82ª\91½\8f\93ü\82ê\91Ö\82í\82é\82±\82Æ\82ª\82 \82è\82Ü\82·\r
+ \8cÂ\90l\93I\82É\82ÍPOST\82ð\8en\82ß\82½\8e\9e\8aÔ\82ð\93\8a\8de\8e\9e\8aÔ\82Æ\82µ\82½\82¢\82Ì\82Å\82±\82Ì\82æ\82¤\82È\8ed\97l\82É\82È\82Á\82Ä\82¢\82Ü\82·\r
+ # \82Æ\82¢\82¤\82©\97]\82è\8bC\82É\82µ\82Ä\82Ü\82¹\82ñ\82Å\82µ\82½\r
+ \82Ç\82¤\82µ\82Ä\82à\83\8a\83X\83g\82à\8e\9e\8aÔ\8f\87\82É\82µ\82½\82¢\82Æ\82¢\82¤\82Ì\82È\82ç\82ÎDATE\82ð POST\8a®\97¹\8cã \82Ì\8e\9e\8aÔ\82É\82·\82ê\82Î\82æ\82¢\82©\82Æ\8ev\82¢\82Ü\82·\r
+> $new[0] \82Å\8c\9f\8dõ\82ð\82©\82¯\82é\82Æ\r
+> $new[0] = "$no<>$in{'addr'}<>$in{'time'}<>1\n";\r
+> \82Æ\82¢\82¤\8ds\82ª\82 \82è\82Ü\82·\82Ì\82Å \82»\82Ì\8ds\82Ì\8fã\82É\82Å\82à\r
+> $in{'date'} = conv_date(time());\r
+> \82Æ\82¢\82¤\8ds\82ð\91«\82·\82Æ DATE \82É\8bL\98^\82³\82ê\82é\8e\9e\8aÔ\82Í POST\8a®\97¹\8cã \82Ì\8e\9e\8aÔ\82Æ\82È\82è\82Ü\82·\r
+> # $in{'date'} = conv_date(time()); \82Æ\8aù\82É\8f\91\82©\82ê\82Ä\82¢\82é\8ds\82ª\82 \82é\82à\82Ì\82ð\8eg\82Á\82Ä\82¢\82é\82Ì\82È\82ç\82Î\r
+> \90æ\93ª\82Ì # \82ð\8dí\8f\9c\82·\82é\82¾\82¯\82Å\8c\8b\8d\\82Å\82·\r
+\r
+Q20.\90Ý\92u\82µ\82½\82ç\83T\81[\83o\82ª\8fd\82\82È\82è\82Ü\82µ\82½ \89½\82©\89ü\91P\82·\82é\95û\96@\82Í\82 \82è\82Ü\82·\82©\81H\r
+A20.(;\81L\84D\81M)\82 \82ñ\82Ü\96³\97\9d\82µ\82È\82¢\82Å\82\82¾\82³\82¢\r
+ \95\81\92Ê\82Ì\8cf\8e¦\94Â\93\99\82É\94ä\82×\82é\82Æ\83f\81[\83^\82Ì\8fo\93ü\97Í\82ª\91½\82\8ds\82í\82ê\82é\82Ì\82Å\r
+ \89ñ\90ü/CPU\95\89\89×\82Í\8d\82\82ß\82É\82È\82é\83P\81[\83X\82ª\91½\82¢\82Æ\8ev\82¢\82Ü\82·\r
+ \97\98\97p\8eÒ\90l\90\94\82â\95Û\91¶\8c\8f\90\94/\83t\83@\83C\83\8b\83T\83C\83Y\82È\82Ç\82ð\8dl\97¶\82µ\82Ä\8eg\82Á\82Ä\82¢\82½\82¾\82¯\82ê\82Î\82æ\82¢\82©\82Æ\8ev\82¢\82Ü\82·\r
+\r
+Q21.\8dÅ\91å\93\8a\8de\97e\97Ê\82Í\82Ç\82ê\82\82ç\82¢\82Ü\82Å\82¢\82¯\82Ü\82·\82©\81H\r
+A21.A1\82É\8f\91\82¢\82½\82æ\82¤\82È\88Ê\92u\82Ã\82¯\82¾\82Æ\8ev\82Á\82Ä\82¢\82Ü\82·\82Ì\82Å\96³\92\83\82È\90Ý\92è/\8eg\82¢\95û\82Í\82µ\82È\82¢\95û\82ª\82æ\82¢\82©\82Æ\r
+ \88ê\89\9e100MbpsLAN\8aÂ\8b«(A16\82ÌApache\8aÂ\8b«/Client-Win2000ProIE6)\82Å\82Í1GB\92ö\93x\82Ü\82Å\8am\94F\82µ\82Ü\82µ\82½\82ª\r
+ \83T\81[\83o\8aÂ\8b«\81E\83N\83\89\83C\83A\83\93\83g\8aÂ\8b«\81E\89ñ\90ü\95i\8e¿\82â\82»\82Ì\91¼\8eg\97p\8aÂ\8b«\82É\88Ë\91¶\82µ\82Ü\82·\82µ\r
+ \82Ü\82½\89Â\94\\82Æ\8eÀ\97p\82Í\88á\82¢\82Ü\82·\82Ì\82Å\82 \82é\92ö\93x\82Ì\89^\97p\82ð\8e\9d\82Á\82Ä\90Ý\92u\8eÒ\8e©\90g\82ª\94»\92f\82µ\82Ä\82\82¾\82³\82¢\r
+ \92A\82µ\82 \82Ü\82è\82É\91å\82«\82¢\83T\83C\83Y\82Ì\83t\83@\83C\83\8b\82ÍFTP\82È\82Ç\95Ê\83v\83\8d\83g\83R\83\8b\82Å\82â\82è\8eæ\82è\82µ\82½\82Ù\82¤\82ª\82æ\82³\82»\82¤\82Å\82·\r
+\r
+Q22.\97e\97Ê\90§\8cÀ\82ª\82 \82é\83T\81[\83o\82Å\82Í\82Ç\82Ì\82æ\82¤\82È\90Ý\92è\82ª\96]\82Ü\82µ\82¢\82Ì\82Å\82µ\82å\82¤\82©\81H\r
+A22.\8c\8b\98_\93I\82É\82Í\82©\82È\82è\82Ì\97]\97T\82ð\8e\9d\82½\82¹\82½\90Ý\92è\82ð\82·\82é\82Ì\82ª\96³\93ï\82Å\82·\r
+ \82Æ\82¢\82¤\82Ì\82à \82±\82Ì\83X\83N\83\8a\83v\83g\82Å\82Í 1\83t\83@\83C\83\8b\82 \82½\82è\82Ì\97e\97Ê, \95Û\8e\9d\83\8d\83O(\83t\83@\83C\83\8b)\90\94, \91\8d\97e\97Ê\r
+ \82ð\90Ý\92è\82Å\82«\82Ü\82·\82ª\97e\97Ê\90§\8cÀ\82ª\82 \82é\83T\81[\83o\82É\82¨\82¢\82Ä\82Í\82±\82ê\82ç\82Ì\90Ý\92è\82É\92\8d\88Ó\82·\82é\93_\82ª\82 \82è\82Ü\82·\r
+ [\83A\83b\83v\83\8d\81[\83h] ---> [\83\8d\83O\90\94/\97e\97Ê\83`\83F\83b\83N] ---> [\83\8d\83O\97\8e\82¿\95ª\82Í\8dí\8f\9c]\r
+ \82Æ\82¢\82¤\8f\87\8f\98\82Å\83X\83N\83\8a\83v\83g\82Í\8f\88\97\9d\82ð\82µ\82Ä\82¢\82é\82Ì\82Å \97á\82¦\82Î50MB\82Ì\90§\8cÀ\82ª\8a|\82¯\82ç\82ê\82Ä\82¢\82é\83A\83J\83E\83\93\83g\82Å\r
+ 1\83t\83@\83C\83\8b\82 \82½\82è\82Ì\8dÅ\91å\97e\97Ê\82ð 50MB \82É\90Ý\92è\82·\82é\82Æ 1\83t\83@\83C\83\8b\96Ú\82É50MB\82ð\83A\83b\83v\83\8d\81[\83h\82µ\82½\8fê\8d\87\r
+ \95Û\8e\9d\83\8d\83O\90\94\82ª1 \82Å\82à 2\83t\83@\83C\83\8b\96Ú\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82È\82\82È\82Á\82Ä\82µ\82Ü\82¤\82±\82Æ\82ª\82 \82è\82Ü\82·\r
+ \82±\82ê\82Í \83A\83b\83v\83\8d\81[\83h\8a®\97¹\8e\9e\82Ü\82Å\82É 1\83t\83@\83C\83\8b\96Ú\82ª\8ec\82Á\82Ä\82¢\82é\82±\82Æ\82ª\8c´\88ö\82Æ\82È\82è\82Ü\82·\r
+ 2\83t\83@\83C\83\8b\96Ú\82Ì\83A\83b\83v\83\8d\81[\83h\8aJ\8en\82Æ\93¯\8e\9e\82É1\82Â\96Ú\82ð\8fÁ\82¹\82Î\96â\91è\82ª\96³\82\82È\82é\97l\82É\82à\8c©\82¦\82Ü\82·\82ª\r
+ \83A\83b\83v\83\8d\81[\83h\8a®\97¹\8e\9e\82Ü\82Å\82»\82ê\82ª\90³\8fí\82É\8fI\82í\82é\82©\82Ç\82¤\82©\82Í\95ª\82©\82è\82Ü\82¹\82ñ\r
+ \82µ\82©\82µ\82È\82ª\82ç\82»\82Ì\97l\82È\8ed\97l\82É\82µ\82½\82¢\8fê\8d\87\82Í\83X\83N\83\8a\83v\83g\82ð\82 \82é\92ö\93x\89ü\95Ï\82·\82é\82±\82Æ\82Å\89Â\94\\82É\82È\82è\82Ü\82·\r
+ \82Ü\82½\95¡\90\94\83\86\81[\83U\81[\82©\82ç\82Ì\93¯\8e\9e(\95À\97ñ)\83A\83b\83v\83\8d\81[\83h\8e\9e\82à\93¯\97l\82È\82Ì\82Å\95p\93x\82ª\91½\82¢\82æ\82¤\82È\82ç\r
+ \92N\82©\82ª\83A\83b\83v\83\8d\81[\83h\8e\9e\82É\82Í\83A\83b\83v\83\8d\81[\83h\82³\82¹\82È\82¢\82æ\82¤\82É\82·\82é\82È\82Ç\82Ì\8dH\95v\82ð\82µ\82½\95û\82ª\97Ç\82¢\82©\82à\82µ\82ê\82Ü\82¹\82ñ\r
+\r
+Q23.\8ag\92£\8eqMP4(\91å\95¶\8e\9a)\82ð\92Ç\89Á\82µ\82½\82Ì\82Å\82·\82ª\94F\8e¯\82³\82ê\82Ü\82¹\82ñ\r
+Q24.\8ag\92£\8eqMP4\82ð\83A\83b\83v\83\8d\81[\83h\82·\82é\82Æ\8f¬\95¶\8e\9a\82É\82È\82Á\82Ä\82µ\82Ü\82¤\r
+A23.A24 \8ag\92£\8eq\83t\83B\83\8b\83^\81[\82Ì\8f\88\97\9d\8f\87\8f\98\82Ì\8aÖ\8cW\82Å\r
+ $set{'up_ext'} \82É MP4 \82ð\92Ç\89Á\82·\82é\82Ì\82Ý\82Å\82Í\94F\8e¯\82³\82ê\82Ü\82¹\82ñ\r
+ \82±\82ê\82Í\8c³\83t\83@\83C\83\8b\96¼\8ag\92£\8eq\82ð\88ê\92U\8f¬\95¶\8e\9a\82É\95Ï\8a·\82µ\82½\8cã\82É\r
+ \8ag\92£\8eq\95Ï\8a·\82ð\8a|\82¯\82Ä\82¢\82é\82±\82Æ\82É\88ö\82è\82Ü\82·.\r
+ \88È\89º\82Ì\95û\96@\82Å\89ñ\94ð\82·\82é\82±\82Æ\82ª\82Å\82«\82Ü\82·\r
+ $set{'up_ext'} \83A\83b\83v\83\8d\81[\83h\82Å\82«\82é\8aî\96{\8ag\92£\8eq \82É MP4 \82ð\92Ç\89Á\r
+ $set{'change_ext'} \8ag\92£\8eq\95Ï\8a· \82É\81@mp4->MP4 \82ð\92Ç\89Á\r
+///////////////////////////////////////////////\r
--- /dev/null
+#!/usr/bin/perl\r
+use CGI;\r
+use vars qw(%set %in);\r
+use strict;\r
+$set{'log_file'} = './log.cgi'; #\83\8d\83O\83t\83@\83C\83\8b\96¼\r
+$set{'max_log'} = 30; #\95Û\8e\9d\8c\8f\90\94\r
+$set{'max_size'} = 1*1024; #\8dÅ\91å\93\8a\8de\97e\97Ê(KB)\r
+$set{'min_flag'} = 0; #\8dÅ\8f¬\97e\97Ê\90§\8cÀ\82ð\8eg\97p\82·\82é=1\r
+$set{'min_size'} = 100; #\8dÅ\8f¬\93\8a\8de\97e\97Ê(KB)\r
+$set{'max_all_flag'} = 0; #\91\8d\97e\97Ê\90§\8cÀ\82ð\8eg\97p\82·\82é=1\r
+$set{'max_all_size'} = 20*1024; #\91\8d\90§\8cÀ\97e\97Ê(KB)\r
+$set{'file_pre'} = 'up'; #\83t\83@\83C\83\8b\90Ú\93ª\8e«\r
+$set{'pagelog'} = 10; #1\83y\81[\83W\82É\95\\8e¦\82·\82é\83t\83@\83C\83\8b\90\94\r
+$set{'base_html'} = 'upload.html'; #1\83y\81[\83W\96Ú\82Ì\83t\83@\83C\83\8b\96¼\r
+$set{'interval'} = 0; #\93¯\88êIP\93\8a\8de\8aÔ\8au\95b\90\94\r
+$set{'deny_host'} = ''; #\93\8a\8de\8bÖ\8e~IP/HOST ,\82Å\8bæ\90Ø\82é ex.(bbtec.net,219.119.66,ac.jp)\r
+$set{'admin_name'} = 'admin'; #\8aÇ\97\9d\8eÒ\83\8d\83O\83C\83\93ID\r
+$set{'admin_pass'} = '1234'; #\8aÇ\97\9d\8eÒ\83p\83X\83\8f\81[\83h\r
+\r
+# \88È\89º5\8d\80\96Ú\82ð\8dÄ\90Ý\92è\82·\82é\8dÛ\82É\82ÍPATH\81C\83f\83B\83\8c\83N\83g\83\8a\82Í / \82Å\8fI\82í\82é\82±\82Æ\r
+# $set{'html_dir'},$set{'base_cgi'}\82ð ./ \88È\8aO\82É\90Ý\92è\82·\82é\8fê\8d\87,\r
+# \82Ü\82½\82ÍDLkey\82ð\8eg\97p\82µ \82È\82¨\82©\82ÂHTML\83L\83\83\83b\83V\83\85($set{'dummy_html'} = 2 or 3)\82ð\8eg\97p\82·\82é\8fê\8d\87\82Í\r
+# $set{'base_cgi'} , $set{'http_html_path'} , $set{'http_src_path'} \82ð\83t\83\8b\83p\83X(http://\81`\81` or /\81`\81`)\82Å\8bL\8fq\82·\82é\r
+$set{'html_dir'} = './'; # \93à\95\94HTML\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\r
+$set{'src_dir'} = './src/'; # \93à\95\94\83t\83@\83C\83\8b\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\r
+$set{'base_cgi'} = './upload.cgi'; # \82±\82Ì\83X\83N\83\8a\83v\83g\96¼ http://\81`\82Ì\8ew\92è\89Â\94\\r
+$set{'http_html_path'} = './'; # html\8eQ\8fÆ httpPATH http://\81`\82Ì\8ew\92è\89Â\94\\r
+$set{'http_src_path'} = './src/'; # file\8eQ\8fÆ httpPATH http://\81`\82Ì\8ew\92è\89Â\94\\r
+\r
+$set{'dlkey'} = 0; # DLKey\82ð\8eg\97p\82·\82é=1,DLkey\95K\90{=2\r
+$set{'up_ext'} = 'txt,lzh,zip,rar,gca,mpg,mp3,avi,swf,bmp,jpg,gif,png'; #\83A\83b\83v\83\8d\81[\83h\82Å\82«\82é\8aî\96{\8ag\92£\8eq \94¼\8ap\89p\90\94\8f¬\95¶\8e\9a ,\82Å\8bæ\90Ø\82é\r
+$set{'up_all'} = 0; #\93o\98^\88È\8aO\82Ì\82à\82Ì\82àUP\82³\82¹\82ç\82ê\82é\82æ\82¤\82É\82·\82é=1\r
+$set{'ext_org'} = 0; #$set{'up_all'}\82ª1\82Ì\8e\9e\83I\83\8a\83W\83i\83\8b\82Ì\8ag\92£\8eq\82É\82·\82é=1\r
+$set{'deny_ext'} = 'php,php3,phtml,rb,sh,bat,dll'; #\93\8a\8de\8bÖ\8e~\82Ì\8ag\92£\8eq \94¼\8ap\89p\90\94\8f¬\95¶\8e\9a ,\82Å\8bæ\90Ø\82é\r
+$set{'change_ext'} = 'cgi->txt,pl->txt,log->txt,jpeg->jpg,mpeg->mpg'; #\8ag\92£\8eq\95Ï\8a· \91O->\8cã \94¼\8ap\89p\90\94\8f¬\95¶\8e\9a ,\82Å\8bæ\90Ø\82é\r
+\r
+$set{'home_url'} = ''; #[HOME]\82Ì\83\8a\83\93\83N\90æ \91\8a\91Î\83p\83X\96\94\82Í http://\82©\82ç\8en\82Ü\82é\90â\91Î\83p\83X\r
+$set{'html_all'} = 1; #[ALL]\82ð\8fo\82·=1\r
+$set{'dummy_html'} = 0; #\83t\83@\83C\83\8b\8cÂ\95ÊHTML\82ð\8dì\90¬\82·\82é \92Ê\8fí\83t\83@\83C\83\8b\82Ì\82Ý=1,DLKey\90Ý\92è\83t\83@\83C\83\8b\82Ì\82Ý=2,\82·\82×\82Ä=3\r
+$set{'find_crypt'} = 1; #\88Ã\8d\86\89»ZIP\82ð\8c\9f\8fo\82·\82é=1\r
+$set{'binary_compare'} = 0; #\8aù\91¶\83t\83@\83C\83\8b\82Æ\83o\83C\83i\83\8a\94ä\8ar\82·\82é=1\r
+$set{'post_flag'} = 0; #PostKey\82ð\8eg\97p\82·\82é=1\r
+$set{'post_key'} = 'postkey'; #PostKey ,\82Å\8bæ\90Ø\82é\82Æ\95¡\90\94\8ew\92è ex.(postkey1,postkey2)\r
+$set{'disp_error'} = 1; #\83\86\81[\83U\81[\82É\83G\83\89\81[\82ð\95\\8e¦\82·\82é=1\r
+$set{'error_level'} = 1; #\83G\83\89\81[\83\8d\83O\82ð\8bL\98^\82·\82é=1\r
+$set{'error_log'} = './error.cgi'; #\83G\83\89\81[\83\8d\83O\83t\83@\83C\83\8b\96¼\r
+$set{'error_size'} = 1024; # \83G\83\89\81[\83\8d\83O\8dÅ\91å\97e\97Ê(KB) \90§\8cÀ\82È\82µ=0\r
+$set{'zero_clear'} = 1; #\83t\83@\83C\83\8b\82ª\8c©\82Â\82©\82ç\82È\82¢\8fê\8d\87\83\8d\83O\82©\82ç\8dí\8f\9c\82·\82é=1\r
+\r
+$set{'disp_comment'} = 1; #\83R\83\81\83\93\83g\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_date'} = 1; #\93ú\95t\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_size'} = 1; #\83T\83C\83Y\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_mime'} = 1; #MIMETYPE\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_orgname'} = 1; #\83I\83\8a\83W\83i\83\8b\83t\83@\83C\83\8b\96¼\82ð\95\\8e¦\82·\82é=1\r
+\r
+$set{'per_upfile'} = 0666; #\83A\83b\83v\83\8d\81[\83h\83t\83@\83C\83\8b\82Ì\83p\81[\83~\83b\83V\83\87\83\93 suexec=0604,other=0666\r
+$set{'per_dir'} = 0777; #\83\\81[\83X\83A\83b\83v\83f\83B\83\8c\83N\83g\83\8a\82Ì\83p\81[\83~\83b\83V\83\87\83\93 suexec=0701,other=0777\r
+$set{'per_logfile'} = 0666; #\83\8d\83O\83t\83@\83C\83\8b\82Ì\83p\81[\83~\83b\83V\83\87\83\93\81@suexec=0600,other=0666\r
+$set{'link_target'} = ''; #target\91®\90«\r
+\r
+#------\r
+$set{'ver'} = '2005/10/10e CGI.pm';\r
+$set{'char_delname'} = 'D';\r
+\r
+$in{'time'} = time(); $in{'date'} = conv_date($in{'time'});\r
+$in{'addr'} = $ENV{'REMOTE_ADDR'};\r
+$in{'host'} = gethostbyaddr(pack('C4',split(/\./, $in{'addr'})), 2) || $ENV{'REMOTE_HOST'} || '(none)';\r
+if($in{'addr'} eq $in{'host'}){ $in{'host'} = '(none)'; }\r
+\r
+$set{'html_head'} =<<"EOM";\r
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
+<html lang="ja">\r
+<HEAD>\r
+<META name="robots" content="noindex,nofollow">\r
+<META name="ROBOTS" content="NOINDEX,NOFOLLOW">\r
+<META http-equiv="Content-type" content="text/html; charset=Shift_JIS">\r
+<META http-equiv="Pragma" content="no-cache">\r
+<META http-equiv="Cache-Control" content="no-cache">\r
+<META http-equiv="Expires" content="0">\r
+<TITLE>Uploader</TITLE>\r
+EOM\r
+\r
+$set{'html_css'} =<<"EOM";\r
+<META http-equiv="Content-Style-Type" content="text/css">\r
+<STYLE type="text/css"><!--\r
+input,td{ font-size: 10pt;font-family:Chicago,Verdana,Arial,sans-serif,"\82l\82r \82o\83S\83V\83b\83N"; }\r
+a:hover { background-color:#EECCCC; }\r
+input,textarea{ border-top : 1px solid ; border-bottom : 1px solid ; border-left : 1px solid ; border-right : 1px solid ;font-size:10pt;background-color:#FFFFFF; }\r
+-->\r
+</STYLE>\r
+EOM\r
+\r
+unless(-e $set{'log_file'}){ &init; }\r
+unless(-e $set{'base_html'}){ &makehtml; }\r
+\r
+{ #\83f\83R\81[\83h\r
+ if ($ENV{'REQUEST_METHOD'} eq "POST" && $ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/i){\r
+ if ($ENV{'CONTENT_LENGTH'} > ($set{'max_size'} * 1024 + 1024)){ if($ENV{'SERVER_SOFTWARE'} =~ /IIS/){ while(read(STDIN,my $buff,8192)){} } &error(106,$ENV{'CONTENT_LENGTH'});}\r
+ }else{\r
+ if ($ENV{'CONTENT_LENGTH'} > 1024*100){ error(98); }\r
+ }\r
+ my %ck; foreach(split(/;/,$ENV{'HTTP_COOKIE'})){ my($key,$val) = split(/=/); $key =~ s/\s//g; $ck{$key} = $val;}\r
+ my @ck = split(/<>/,$ck{'SN_USER'});\r
+ if(length($ck[0]) < 5){ \r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/'); srand;\r
+ my $salt = $salt[int(rand(@salt))] . $salt[int(rand(@salt))];\r
+ $in{'user'} = crypt($in{'addr'}.$in{'time'}, $salt);\r
+ }else{ $in{'user'} = $ck[0]; }\r
+ \r
+ my $q = new CGI;\r
+ $in{'upfile'} = $q->param('upfile');\r
+ $in{'tmpfile'} = $q->tmpFileName($in{'upfile'});\r
+ $in{'type'} = $q->uploadInfo($in{'upfile'})->{'Content-Type'} if ($in{'upfile'});\r
+ $in{'pass'} = $q->param('pass'); $in{'mode'} = $q->param('mode'); \r
+ $in{'delno'} = $q->param('delno'); $in{'comment'} = $q->param('comment');\r
+ $in{'jcode'} = $q->param('jcode'); $in{'delpass'} = $q->param('delpass');\r
+ $in{'orgname'} = $in{'upfile'}; $in{'postkey'} = $q->param('postkey');\r
+ $in{'org_pass'} = $in{'pass'};\r
+ $in{'checkmode'} = $q->param('checkmode');\r
+ $in{'file'} = $q->param('file'); $in{'dlkey'} = $q->param('dlkey');\r
+ $in{'admin_delno'} = join(',',$q->param('admin_delno'));\r
+ my @denyhost = split(/,/,$set{'deny_host'});\r
+ foreach my $value (@denyhost){\r
+ if ($in{'addr'} =~ /$value/ || $in{'host'} =~ /$value/){ &error(101);}\r
+ }\r
+\r
+ my @form = ($in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'});\r
+ foreach my $value (@form) {\r
+ if (length($value) > 128) { $value = substr($value,0,128).'...'; }\r
+# $value =~ s/&/&/g;\r
+ $value =~ s/"/"/g;\r
+ $value =~ s/</</g;\r
+ $value =~ s/>/>/g;\r
+ $value =~ s/\r//g;\r
+ $value =~ s/\n//g;\r
+ $value =~ s/\t//g;\r
+ $value =~ s/\0//g;\r
+ }\r
+ ($in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'}) = @form;\r
+ $in{'tmpfile2'} = &filewrite() if ($in{'upfile'});\r
+}\r
+\r
+if($in{'delno'} eq $set{'admin_name'} && $in{'delpass'} eq $set{'admin_pass'}){ &admin_mode(); }\r
+if(!$in{'delno'} && $in{'delpass'} eq $set{'admin_pass'}){ &makehtml(); &quit(); }\r
+if($in{'mode'} eq 'dl'){ &dlfile;} #DL\r
+if($in{'mode'} eq 'delete'){ &delete(); &quit(); }\r
+\r
+{#\83\81\83C\83\93\8f\88\97\9d\r
+ if(!$in{'upfile'}){ &error(99); }\r
+ if($set{'post_flag'} && !check_postkey($in{'postkey'})){ error(109); }\r
+ if($set{'dlkey'} == 2 && !$in{'dlkey'}){ unlink("$in{'tmpfile2'}"); &error(61); }\r
+ open(IN,$set{'log_file'})||&error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+ my ($no,$lastip,$lasttime) = split(/<>/,$log[0]);\r
+\r
+ if($set{'interval'} && $set{'interval'} && $in{'time'} <= ($lasttime + $set{'interval'}) && $in{'addr'} eq $lastip){ &error(203);}\r
+ $in{'ext'} = extfind($in{'orgname'}); if(!$in{'ext'} && $in{'upfile'}){ &error(202); }\r
+\r
+ my $orgname;\r
+ if(split(/\//,$in{'orgname'}) > split(/\\/,$in{'orgname'})){ my @name = split(/\//,$in{'orgname'}); $orgname = $name[$#name]; }\r
+ else{ my @name = split(/\\/,$in{'orgname'}); $orgname = $name[$#name];}\r
+ \r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/');\r
+ srand;\r
+ my $salt = $salt[int(rand(@salt))] . $salt[int(rand(@salt))];\r
+ $in{'pass'} = crypt($in{'pass'}, $salt);\r
+\r
+ if($set{'binary_compare'}){\r
+ my @files = globfile("$set{'src_dir'}",".*");\r
+ my @dir = globdir("$set{'src_dir'}",".*");\r
+ foreach my $dir (@dir){ push(@files,globfile($dir."/",".*")); }\r
+ foreach my $value (@files){\r
+ next if($value =~ /\.temporary$/);\r
+ if(binarycmp($in{'tmpfile2'},$value)){ unlink($in{'tmpfile2'}); &error(205,$value);}\r
+ }\r
+ }\r
+\r
+ if($set{'find_crypt'}){\r
+ open(FILE,$in{'tmpfile'}); binmode(FILE); seek(FILE,0,0); read(FILE,my $buff,4); my $crypt_flag = 0;\r
+ if($buff =~ /^\x50\x4b\x03\x04$/){ seek(FILE,6,0); read(FILE,my $buff,1); $crypt_flag = 1 if(($buff & "\x01") eq "\x01"); }\r
+ close(FILE);\r
+ $in{'comment'} = '<font color="#FF0000">*</font>'.$in{'comment'} if($crypt_flag);\r
+ }\r
+\r
+ open(IN,$set{'log_file'})||&error(303);\r
+ @log = <IN>;\r
+ close(IN);\r
+ ($no,$lastip,$lasttime) = split(/<>/,$log[0]);\r
+ shift(@log);\r
+ $no++;\r
+ my $tmpno = sprintf("%04d",$no);\r
+\r
+ my $dlsalt;\r
+ my $filedir;\r
+ my $allsize = (-s $in{'tmpfile2'});\r
+\r
+ if($set{'dlkey'} && $in{'dlkey'}){\r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9'); srand;\r
+ for (my $c = 1; $c <= 20; ++$c) { $dlsalt .= $salt[int(rand(@salt))]; }\r
+ $filedir = "$set{'src_dir'}$set{'file_pre'}${tmpno}.$in{'ext'}_$dlsalt/";\r
+ mkdir($filedir,$set{'per_dir'});\r
+ rename("$in{'tmpfile2'}","$filedir$set{'file_pre'}$tmpno.$in{'ext'}");\r
+ open(OUT,">${filedir}index.html");\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"${filedir}index.html");\r
+ $in{'comment'} = '<font color="#FF0000">[DLKey] </font>'.$in{'comment'};\r
+ }else{\r
+ undef $in{'dlkey'};\r
+ rename("$in{'tmpfile2'}","$set{'src_dir'}$set{'file_pre'}$tmpno.$in{'ext'}");\r
+ }\r
+\r
+ if (length($orgname) > 128) { $orgname = substr($orgname,0,128).'...'; }\r
+\r
+ my @note;\r
+ if($set{'post_flag'} && $set{'post_key'}){\r
+ push(@note,'PostKey:'.$in{'postkey'});\r
+ }\r
+ if($ENV{'SERVER_SOFTWARE'} =~ /Apache|IIS/){\r
+ my $disptime;\r
+ my $time = time() - $in{'time'};\r
+ my @str = ('Upload:','\95b');\r
+ my $disptime = $time.$str[1];\r
+ push(@note,$str[0].$disptime);\r
+ }\r
+ if($in{'dlkey'}){\r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/'); srand;\r
+ my $salt = $salt[int(rand(@salt))] . $salt[int(rand(@salt))];\r
+ my $crypt_dlkey = crypt($in{'dlkey'}, $salt);\r
+ push(@note,"DLKey<!-- DLKey:".$crypt_dlkey." --><!-- DLpath:".$dlsalt." -->");\r
+ }\r
+ my $note = join(',',@note);\r
+ my $usersalt = substr($in{'user'},0,2);\r
+ my $userid = crypt($in{'user'},$usersalt);\r
+ $in{'time'} = time();\r
+# $in{'date'} = conv_date(time());\r
+ my @new;\r
+ $new[0] = "$no<>$in{'addr'}<>$in{'time'}<>1\n";\r
+ my $addlog = "$no<>$in{'ext'}<>$in{'date'}<>$in{'comment'}<>$in{'type'}<>$orgname<>$in{'addr'}<>$in{'host'}<>$in{'pass'},$userid<>$set{'file_pre'}<>$note<>1\n";\r
+ $new[1] = $addlog;\r
+\r
+# open(OUT,">>./alllog.cgi"); print OUT $addlog; close(OUT);\r
+\r
+ my $i = 2;\r
+\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value);\r
+ if(!$dummy){ $filepre = $set{'file_pre'};}\r
+ $no = sprintf("%04d",$no);\r
+\r
+ my $filename;\r
+ my $filedir;\r
+ if($note =~ /DLpath:(.+)\s/){\r
+ my $dlpath = $1;\r
+ $filename = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/$filepre$no.$ext";\r
+ $filedir = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/";\r
+ }else{\r
+ $filename = "$set{'src_dir'}$filepre$no.$ext";\r
+ }\r
+ $allsize += (-s $filename);\r
+ \r
+ if($i <= $set{'max_log'} && !($set{'max_all_flag'} && $set{'max_all_size'}*1024 < $allsize)){ \r
+ if((-e $filename)||!$set{'zero_clear'}){ push(@new,$value); $i++; }\r
+ }else{\r
+ if(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } } rmdir($filedir);\r
+ }elsif(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } } rmdir($filedir);\r
+ }elsif(-e $filename){\r
+ push(@new,$value);\r
+ }else{\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } } rmdir($filedir);\r
+ }\r
+ }\r
+ }\r
+ logwrite(@new);\r
+ if($in{'dlkey'} && ( $set{'dummy_html'} == 2 || $set{'dummy_html'} == 3)){\r
+ &makedummyhtml("$set{'file_pre'}$tmpno.$in{'ext'}",$in{'comment'},"$set{'file_pre'}$tmpno.$in{'ext'}",$dlsalt,$in{'date'},$in{'type'},$orgname,$no);\r
+ }elsif(!$in{'dlkey'} && ($set{'dummy_html'} == 1 || $set{'dummy_html'} == 3)){\r
+ &makedummyhtml("$set{'file_pre'}$tmpno.$in{'ext'}");\r
+ }\r
+ &makehtml(); &quit();\r
+}\r
+\r
+sub makehtml{\r
+\r
+ my ($buff,$init,$postval,$dlkey);\r
+ my $page = 0; my $i = 1;\r
+ \r
+ open(IN,$set{'log_file'})||&error(303);\r
+ my $log = my @log = <IN>;\r
+ close(IN);\r
+ \r
+ if($log == 1){ $log++; $init++;}\r
+ my $lastpage = int(($log - 2)/$set{'pagelog'}) + 1;\r
+ $postval = ' obj.postkey.value = unescape(p[1]);' if($set{'post_flag'});\r
+ my $header =<<"EOM";\r
+$set{'html_head'}<META http-equiv="Content-Script-Type" content="text/javascript">\r
+<script type="text/javascript">\r
+<!--\r
+function getCookie(obj,cookiename){\r
+ var i,str; c = new Array(); p = new Array("",""); str = document.cookie;c = str.split(";");\r
+ for (i = 0; i < c.length; i++) { if (c[i].indexOf(cookiename+"=") >= 0) { p = (c[i].substr(c[i].indexOf("=")+1)).split("<>"); break; }}\r
+ if(cookiename == "SN_UPLOAD"){ obj.pass.value = unescape(p[0]);$postval }\r
+ else if(cookiename == "SN_DEL"){ obj.delpass.value = unescape(p[0]);}\r
+ return true;\r
+}\r
+function delnoin(no){\r
+ document.Del.delno.value = no;\r
+ document.Del.del.focus();\r
+}\r
+//-->\r
+</script>\r
+$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF" onload="getCookie(document.Form,'SN_UPLOAD');getCookie(document.Del,'SN_DEL');">\r
+<table summary="title" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Uploader</font></strong></td></tr></table>\r
+<p>\r
+Now.. Testing..\r
+</p>\r
+EOM\r
+ my $maxsize = 'Max '.dispsize($set{'max_size'}*1024);\r
+ my ($minsize,$total);\r
+ if($set{'min_flag'}){ $minsize = 'Min '.dispsize($set{'min_size'}*1024).' - '; }\r
+ if($set{'max_all_flag'}){ $total .= ' Total '.dispsize($set{'max_all_size'}*1024);}\r
+ $header .= qq|<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="$set{'base_cgi'}" name="Form">FILE $minsize$maxsize (*$set{'max_log'}Files$total)<br>|;\r
+ $header .='<INPUT TYPE=file SIZE="40" NAME="upfile">';\r
+ $header .= ' DLKey: <INPUT TYPE=text SIZE="8" NAME="dlkey" maxlength="8">' if($set{'dlkey'});\r
+ $header .= '\r
+DELKey: <INPUT TYPE=password SIZE="10" NAME="pass" maxlength="8"><br>\r
+COMMENT<br>\r
+<INPUT TYPE=text SIZE="45" NAME="comment">\r
+<INPUT TYPE=hidden NAME="jcode" VALUE="\8a¿\8e\9a">\r
+<INPUT TYPE=submit VALUE="Upload"><INPUT TYPE=reset VALUE="Cancel"><br>\r
+';\r
+ if($set{'post_flag'}){ $header .= 'PostKey<br><INPUT TYPE=password SIZE="10" NAME="postkey" maxlength="10">'; }\r
+ $header .= '</FORM>';\r
+\r
+ my $allsize = 0;\r
+ my @files = globfile("$set{'src_dir'}",".*");\r
+ my @dir = globdir("$set{'src_dir'}",".*");\r
+ foreach my $dir (@dir){ push(@files,globfile($dir."/",".*")); }\r
+ foreach my $value (@files){ $allsize += (-s "$value"); }\r
+\r
+ $allsize = dispsize($allsize);\r
+\r
+ my $footer = "</table><HR size=1>Used ${allsize}\n<br>";\r
+ if($set{'up_all'} && !$set{'ext_org'}){ $footer .= $set{'up_ext'}.' +'; }\r
+ elsif(!$set{'up_all'}){ $footer .= $set{'up_ext'}; }\r
+ $footer .= "\n<table summary=\"footer\" width=\"100%\"><tr><td><div align=left><FORM METHOD=POST ACTION=\"$set{'base_cgi'}\" name=\"Del\"><span style='font-size:9pt'><input type=hidden name=mode value=delete>No.<input type=text size=4 name=delno> key<input type=password size=4 name=delpass> <input type=submit value=\"del\" name=del></span></form></div>\n";\r
+ $footer .= "</td><td><div align=right><!-- $set{'ver'} --><a href=\"http://sugachan.dip.jp/download/\" target=\"_blank\"><small>Sn Uploader</small></a></div></td></tr></table>\n</body>\n</html>";\r
+\r
+ my $info_title = "<table summary=\"upinfo\" width=\"100%\">\n<tr><td></td><td>NAME</td>";\r
+ if($set{'disp_comment'}){ $info_title .= "<td>COMMENT</td>"; } if($set{'disp_size'}){ $info_title .= "<td>SIZE</td>"; } if($set{'disp_date'}){ $info_title .= "<td>DATE</td>"; }\r
+ if($set{'disp_mime'}){ $info_title .= "<td>MIME</td>"; } if($set{'disp_orgname'}){ $info_title .= "<td>ORIG</td>"; }\r
+ $info_title .= "</tr>\n";\r
+\r
+ my $home_url_link;\r
+ if($set{'home_url'}){ $home_url_link = qq|<a href="$set{'home_url'}">[HOME]</a> |;}\r
+ if($set{'html_all'}){\r
+ my $buff; my $no = 1; my $time = time; my $subheader;\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$dummy) = split(/<>/,$value);\r
+ if(!$dummy){ next; }\r
+ $buff .= makeitem($value);\r
+ }\r
+ $subheader .= "[ALL] ";\r
+ while($no <= $lastpage){\r
+ if($no == $page) { $subheader .= "\[$no\] ";}\r
+ else{ if($no == 1){ $subheader .= "<a href=\"$set{'http_html_path'}$set{'base_html'}?$time\">\[$no\]</a> "}\r
+ else{$subheader .= "<a href=\"$set{'http_html_path'}$no.html?$time\">\[$no\]</a> ";} }\r
+ $no++;\r
+ }\r
+ $subheader .= $info_title;\r
+ open(OUT,">$set{'html_dir'}all.html")||&error(306,"$set{'html_dir'}all.html");\r
+ print OUT $header."<hr size=1>".$home_url_link.$subheader."<hr size=1>".$buff.$footer;\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'html_dir'}all.html");\r
+ }else{ unlink("$set{'html_dir'}all.html"); }\r
+ \r
+ while($log > $i){\r
+ $buff .= makeitem($log[$i]) unless($init);\r
+ if(($i % $set{'pagelog'}) == 0||$i == $log -1){\r
+ $page++; my $subheader; my $no = 1; my $time = time;\r
+ if($set{'html_all'}){ $subheader .= "<a href=\"./all.html?$time\">[ALL]</a> "; }\r
+ while($no <= $lastpage){\r
+ if($no == $page) { $subheader .= "\[$no\] ";}\r
+ else{ if($no == 1){ $subheader .= "<a href=\"$set{'http_html_path'}$set{'base_html'}?$time\">\[$no\]</a> "}\r
+ else{$subheader .= "<a href=\"$set{'http_html_path'}$no.html?$time\">\[$no\]</a> ";}\r
+ }\r
+ $no++;\r
+ }\r
+ $subheader .= $info_title;\r
+ my $loghtml;\r
+ if($page == 1){ $loghtml = "$set{'html_dir'}$set{'base_html'}"; }\r
+ else{ $loghtml = "$set{'html_dir'}$page.html"; }\r
+\r
+ open(OUT,">$loghtml") || &error(306,"$loghtml");\r
+ print OUT $header."<hr size=1>".$home_url_link.$subheader."<hr size=1>".$buff.$footer;\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},$loghtml);\r
+ undef $buff;\r
+ }\r
+ $i++;\r
+ }\r
+\r
+ while($page < 1000){\r
+ $page ++;\r
+ if(-e "$set{'html_dir'}$page.html"){ unlink("$set{'html_dir'}$page.html"); }else{ last; }\r
+ }\r
+}\r
+\r
+sub filewrite{\r
+ my $random = int(rand(900000)) + 100000;\r
+ if(-e "$set{'src_dir'}$random.temporary"){ $random++; }\r
+ if(-e "$set{'src_dir'}$random.temporary"){ &error(204); }\r
+ open (FILE,">$set{'src_dir'}$random.temporary") || &error(204);\r
+ binmode(FILE);\r
+ eval{ while(my $read = read($in{'upfile'}, my $buff, 8192)){ print FILE $buff; }};\r
+ close(FILE);\r
+ chmod($set{'per_upfile'},"$set{'src_dir'}$random.temporary");\r
+ if((-s "$set{'src_dir'}$random.temporary") == 0){ unlink("$set{'src_dir'}$random.temporary"); &error(99); }\r
+ my $size = (-s "$set{'src_dir'}$random.temporary");\r
+ if($set{'min_flag'} && ($size < $set{'min_size'} * 1024)){ unlink("$set{'src_dir'}$random.temporary"); &error(107,$size);}\r
+ if($size > $set{'max_size'} * 1024){ unlink("$set{'src_dir'}$random.temporary"); &error(106,$size);}\r
+ eval { close($in{'upfile'});};\r
+ unlink($in{'tmpfile'});\r
+ return("$set{'src_dir'}$random.temporary");\r
+}\r
+\r
+sub delete{\r
+ my $mode = $_[0];\r
+ my @delno = split(/,/,$_[1]);\r
+ my $delno; my $flag = 0; my $tmpaddr;\r
+ my $delnote;\r
+\r
+ if($in{'delno'} =~ /(\d+)/){ $delno = $1; }\r
+ if($mode ne 'admin' && !$in{'delno'}){ return; }\r
+ elsif($mode ne 'admin' && !$delno){ &error(401,$in{'delno'}); }\r
+\r
+ open(IN,$set{'log_file'})|| &error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+\r
+ if($in{'addr'} =~ /(\d+).(\d+).(\d+).(\d+)/){ $tmpaddr = "$1.$2.$3."; }\r
+ my $findflag = 0;\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value);\r
+ $delnote = $note;\r
+ my $delflag = 0;\r
+ if(!$addr){ next; }\r
+ if($mode eq 'admin'){\r
+ foreach my $delno (@delno){ if($no == $delno){ $delflag = 1; last; } }\r
+ }elsif($no == $delno){\r
+ $findflag = 1;\r
+ unless ($addr =~ /^$tmpaddr/){\r
+ my ($pass,$id) = split(/,/,$pass);\r
+ my $delpass = $in{'delpass'} || $in{'addr'}.time();\r
+ my $salt = substr($pass, 0, 2); $delpass = crypt($delpass,$salt);\r
+ my $usersalt = substr($in{'user'},0,2); my $userid = crypt($in{'user'},$usersalt);\r
+ if ($in{'delpass'} ne $set{'admin_pass'} && $delpass ne $pass && $userid ne $id){ \r
+ if($mode ne 'admin'){ if(!$dummy){ $filepre = $set{'file_pre'};} $no = sprintf("%04d",$no); &error(404,"$filepre$no.$ext");}\r
+ }\r
+ }\r
+ $delflag = 1;\r
+ }\r
+ if($delflag){\r
+# open(OUT,">>./del.cgi"); print OUT $value; close(OUT);\r
+ $flag = 1;\r
+ if(!$dummy){ $filepre = $set{'file_pre'};}\r
+ $no = sprintf("%04d",$no);\r
+ my $filename;\r
+ my ($dlpath,$filedir);\r
+ if($delnote =~ /DLpath:(.+)\s/){\r
+ $dlpath = $1;\r
+ $filename = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/$filepre$no.$ext";\r
+ $filedir = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/";\r
+ }else{\r
+ $filename = "$set{'src_dir'}$filepre$no.$ext";\r
+ }\r
+ \r
+ if(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } rmdir($filedir);} undef $value;\r
+ }elsif(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } rmdir($filedir);} undef $value;\r
+ }elsif(!(-e $filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } rmdir($filedir);} undef $value;\r
+ }else{\r
+ if($mode ne 'admin'){ &error(403,"$filepre$no.$ext");}\r
+ }\r
+ }\r
+ }\r
+ if($mode ne 'admin' && !$findflag){ &error(402,$delno); }\r
+ if($flag){\r
+ logwrite(@log);\r
+ &makehtml();\r
+ }\r
+}\r
+\r
+sub quit{\r
+ my ($cookiename,$buff);\r
+ my $flag = 0;\r
+ my @tmpfiles = globfile("$set{'src_dir'}","\.temporary");\r
+ foreach my $value (@tmpfiles){ if((stat($value))[10] < time - 60*60){ unlink("$value"); $flag++; } }\r
+ &makehtml() if($flag);\r
+ $buff =<<"EOM";\r
+$set{'html_head'}<META HTTP-EQUIV="Refresh" CONTENT="1;URL=$set{'http_html_path'}$set{'base_html'}">\r
+EOM\r
+ if($in{'jcode'} || $in{'mode'} eq 'delete'){\r
+ $buff .=<<"EOM";\r
+<META HTTP-EQUIV="Set-Cookie" content="SN_USER=$in{'user'}<>1; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT">\r
+<META HTTP-EQUIV="CONTENT-SCRIPT-TYPE" CONTENT="text/javascript">\r
+<script type="text/javascript">\r
+<!--\r
+setCookie();\r
+function setCookie() {\r
+ var key1,key2;\r
+ var tmp = "path=/; expires=Tue, 31-Dec-2030 23:59:59; ";\r
+EOM\r
+ if($in{'jcode'}){\r
+ my %ck; foreach(split(/;/,$ENV{'HTTP_COOKIE'})){ my($key,$val) = split(/=/); $key =~ s/\s//g; $ck{$key} = $val;}\r
+ my @ck = split(/<>/,$ck{'SN_DEL'});\r
+ if(!$ck[0] && $in{'org_pass'}){ $buff .= qq|\tdocument.cookie = "SN_DEL="+escape('$in{'org_pass'}')+"<>;"+ tmp;\n|;}\r
+ $cookiename = 'SN_UPLOAD'; $buff .= "\tkey1 = escape('$in{'org_pass'}'); key2 = escape('$in{'postkey'}');\n";}\r
+ else{ $cookiename = 'SN_DEL'; $buff .= "\tkey1 = escape('$in{'delpass'}'); key2 = '';\n"; }\r
+ $buff .= qq|\tdocument.cookie = "$cookiename="+key1+"<>"+key2+"; "+ tmp;\n}\n//-->\n</script>\n|;\r
+ }\r
+ $buff .=<<"EOM";\r
+<body>\r
+<br><br><div align=center><font size="+1"><br><br>\r
+<a href="$set{'http_html_path'}$set{'base_html'}?$in{'time'}">click here!</a></font><br>\r
+</div>\r
+</body></html>\r
+EOM\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ exit;\r
+}\r
+\r
+sub admin_mode{\r
+ &errorclear() if($in{'mode'} eq 'errorclear');\r
+ &delete('admin',$in{'admin_delno'}) if($in{'mode'} eq 'delete');\r
+\r
+ open(IN,$set{'log_file'})||error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+\r
+ my ($header,$buff,$footer,$value);\r
+ $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+EOM\r
+\r
+ $buff .= leaddisp(0,1,1).'<a name="up"></a><table summary="title" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Upload Info</font></strong></td></tr></table>';\r
+ $buff .= qq|<table summary="check"><tr><td><form action="$set{'base_cgi'}" method="POST"><input type=hidden name="checkmode" value="allcheck"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\82·\82×\82Ä\83`\83F\83b\83N"></form></td><td><form action="$set{'base_cgi'}" method="POST"><input type=hidden name="checkmode" value="nocheck"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\82·\82×\82Ä\8aO\82·"></form></td><td><form action="$set{'base_cgi'}" method="POST"><input type=hidden name=delpass value="$set{'admin_pass'}"><input type=submit value="HTML\82ð\8dX\90V\82·\82é/\83\8d\83O\83A\83E\83g"></form></td></tr></table>\n<form action="$set{'base_cgi'}" method="POST"><input type=hidden name="mode" value="delete"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\83`\83F\83b\83N\82µ\82½\82à\82Ì\82ð\8dí\8f\9c"><br>\n|."<table summary=\"upinfo\" width=\"100%\">\n<tr><td>DEL</td><td>NAME</td><td>COMMENT</td><td>SIZE</td><td>ADDR</td><td>HOST</td><td>DATE</td><td>NOTE</td><td>MIME</td><td>ORIG</td></tr>\n";\r
+ shift(@log);\r
+ foreach (@log){ $buff .= makeitem($_,'admin'); }\r
+ $buff .= '</table></form><br><br>';\r
+\r
+ if($set{'error_level'}){\r
+ $buff .= leaddisp(-1,0,1).'<a name="error"></a><table summary="errortitle" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Error Info</font></strong></td></tr></table>';\r
+ $buff .= qq|<form action="$set{'base_cgi'}" method="POST"><input type=hidden name=mode value="errorclear"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\83G\83\89\81[\83\8d\83O\83N\83\8a\83A"></form>|;\r
+ $buff .= "<table summary=\"errorinfo\" width=\"100%\">\n<tr><td>DATE</td><td>ADDR</td><td>HOST</td><td>NOTE</td></tr>\n";\r
+ if(open(IN,$set{'error_log'})){ @log = reverse(<IN>); close(IN); foreach (@log){ my ($date,$no,$note,$addr,$host) = split(/<>/); $buff .= "<tr><td>$date</td><td>$addr</td><td>$host</td><td>$note</td></tr>\n"; }}\r
+ $buff .= "</table><br><br>\n";\r
+ }\r
+\r
+ $buff .= leaddisp(-1,-1,0);\r
+ $buff .= '<a name="set"></a><table summary="settitle" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Setting Info</font></strong></td></tr></table>'."\n<table summary=\"setting\">\n";\r
+ $buff .= tablestr('\83X\83N\83\8a\83v\83gVer',$set{'ver'});\r
+ $buff .= tablestr('\83\81\83C\83\93\83\8d\83O\83t\83@\83C\83\8b',$set{'log_file'});\r
+ if($set{'error_level'}){\r
+ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\83t\83@\83C\83\8b',$set{'error_log'});\r
+ if($set{'error_size'}){ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\8dÅ\91å\97e\97Ê',dispsize($set{'error_size'}*1024).' '.($set{'error_size'}*1024).'Bytes'); }\r
+ else{ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\8dÅ\91å\97e\97Ê\90§\8cÀ','\96³'); }\r
+ }else{ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\8bL\98^','\96³'); }\r
+ $buff .= tablestr('\95Û\8e\9d\8c\8f\90\94',$set{'max_log'});\r
+ $buff .= tablestr('\8dÅ\91å\93\8a\8de\97e\97Ê',dispsize($set{'max_size'}*1024).' '.($set{'max_size'}*1024).'Bytes');\r
+\r
+ if($set{'min_flag'}){ $buff .= tablestr('\8dÅ\8f¬\90§\8cÀ\97e\97Ê',dispsize($set{'min_size'}*1024).' '.($set{'min_size'}*1024).'Bytes'); }\r
+ else{ $buff .= tablestr('\8dÅ\8f¬\90§\8cÀ\97e\97Ê',"\96³"); }\r
+ if($set{'max_all_flag'}){ $buff .= tablestr('\91\8d\97e\97Ê\90§\8cÀ',dispsize($set{'max_all_size'}*1024).' '.($set{'max_all_size'}*1024).'Bytes'); }\r
+ else{ $buff .= tablestr('\91\8d\97e\97Ê\90§\8cÀ',"\96³"); }\r
+\r
+ $buff .= tablestr("\83t\83@\83C\83\8b\90Ú\93ª\8e«",$set{'file_pre'});\r
+ $buff .= tablestr("HTML\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a",$set{'html_dir'});\r
+ $buff .= tablestr("\83t\83@\83C\83\8b\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a",$set{'src_dir'});\r
+ if($set{'http_html_path'} && $set{'html_dir'} ne $set{'http_html_path'}){ $buff .= "<tr><td>HTTP_HTML_PATH</td><td>$set{'http_html_path'}</td></tr>\n";}\r
+ if($set{'http_src_path'} && $set{'src_dir'} ne $set{'http_src_path'}){ $buff .= "<tr><td>HTTP_SRC_PATH</td><td>$set{'http_src_path'}</td></tr>\n";}\r
+ $buff .= tablestr('1\83y\81[\83W\82É\95\\8e¦\82·\82é\83t\83@\83C\83\8b\90\94',$set{'pagelog'});\r
+ if($set{'interval'} > 0){ $value = $set{'interval'}.'\95b'; }else{ $value = '\96³'; }\r
+ $buff .= tablestr('\93¯\88êIP\93\8a\8de\8aÔ\8au\95b\90\94\90§\8cÀ',$value);\r
+ if($set{'up_ext'}){ $set{'up_ext'} =~ s/,/ /g; $buff .= tablestr('\93\8a\8de\89Â\94\\8aî\96{\8ag\92£\8eq',$set{'up_ext'}); }\r
+ if($set{'deny_ext'}){ $set{'deny_ext'} =~ s/,/ /g; $buff .= tablestr('\93\8a\8de\8bÖ\8e~\8ag\92£\8eq',$set{'deny_ext'}); }\r
+ if($set{'change_ext'}){ $set{'change_ext'} =~ s/,/ /g; $set{'change_ext'} =~ s/>/>/g; $buff .= tablestr('\8ag\92£\8eq\95Ï\8a·',$set{'change_ext'}); }\r
+\r
+ if($set{'up_all'}){ $buff .= tablestr('\8ew\92è\8aO\8ag\92£\8eq\83A\83b\83v\83\8d\81[\83h\8b\96\89Â','\97L'); if($set{'ext_org'}){ $buff .= tablestr('\8ew\92è\8aO\83t\83@\83C\83\8b\8ag\92£\8eq','\83I\83\8a\83W\83i\83\8b'); }else{ $buff .= tablestr('\8ew\92è\8aO\83t\83@\83C\83\8b\8ag\92£\8eq','bin'); }}\r
+ else{$buff .= tablestr('\8ew\92è\8aO\8ag\92£\8eq\83A\83b\83v\83\8d\81[\83h\8b\96\89Â','\96³');}\r
+\r
+ if($set{'find_crypt'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\88Ã\8d\86\89»\83A\81[\83J\83C\83u\8c\9f\8fo(ZIP)',$value);\r
+ if($set{'binary_compare'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\83o\83C\83i\83\8a\94ä\8ar',$value);\r
+ if($set{'post_flag'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('PostKey\93\8a\8de\90§\8cÀ',$value);\r
+ if($set{'dlkey'}){ if($set{'dlkey'} == 2){$value = '\95K\90{'}else{$value = '\94C\88Ó';}}else{ $value = '\96³';}\r
+ $buff .= tablestr('DLkey',$value);\r
+ if($set{'dummy_html'}){ if($set{'dummy_html'} == 3){$value = 'ALL'}elsif($set{'dummy_html'} == 2){$value = 'DLKey\82Ì\82Ý';}else{$value = '\92Ê\8fí\83t\83@\83C\83\8b\82Ì\82Ý';}}else{ $value = '\96³';}\r
+ $buff .= tablestr('\8cÂ\95ÊHTML\83L\83\83\83b\83V\83\85',$value);\r
+ if($set{'disp_error'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\83\86\81[\83U\83G\83\89\81[\95\\8e¦',$value);\r
+ if($set{'zero_clear'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\8dí\8f\9c\8dÏ\83t\83@\83C\83\8b\83\8a\83X\83g\8e©\93®\8fÁ\8b\8e',$value);\r
+ if($set{'home_url'}){ $buff .= "<tr><td>HOMEURL</td><td>$set{'home_url'}</td></tr>\n";}\r
+\r
+ $buff .= '</table></body></html>';\r
+\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ exit;\r
+}\r
+\r
+sub extfind{\r
+ my $orgname = @_[0];\r
+ my @filename = split(/\./,$orgname);\r
+ my $ext = $filename[$#filename];\r
+ $ext =~ tr/[A-Z]/[a-z]/;\r
+ foreach my $value (split(/,/,$set{'change_ext'})){ my ($src,$dst) = split(/->/,$value); if($ext eq $src){ $ext = $dst; last; }}\r
+ foreach my $value (split(/,/,$set{'deny_ext'})){ if($ext eq $value){ &error(206,$ext); }}\r
+ foreach my $value (split(/,/,$set{'up_ext'})){ if ($ext eq $value) { return $value; } }\r
+ if(length($ext) >= 5 || length($ext) == 0){ $ext = 'bin'; }\r
+ unless ($ext =~ /^[A-Za-z0-9]+$/){ $ext = 'bin'; }\r
+ if($set{'up_all'} && $set{'ext_org'}){ return $ext;}\r
+ elsif($set{'up_all'}){ return 'bin'; }\r
+ return 0;\r
+}\r
+\r
+sub conv_date{\r
+ my @date = gmtime($_[0] + 9*60*60);\r
+ $date[5] -= 100; $date[4]++;\r
+ if ($date[5] < 10) { $date[5] = "0$date[5]" ; } if ($date[4] < 10) { $date[4] = "0$date[4]" ; }\r
+ if ($date[3] < 10) { $date[3] = "0$date[3]" ; } if ($date[2] < 10) { $date[2] = "0$date[2]" ; }\r
+ if ($date[1] < 10) { $date[1] = "0$date[1]" ; } if ($date[0] < 10) { $date[0] = "0$date[0]" ; }\r
+ my @w = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\r
+ return ("$date[5]/$date[4]/$date[3]($w[$date[6]]),$date[2]:$date[1]:$date[0]");\r
+}\r
+\r
+sub dispsize{\r
+ my $size = $_[0];\r
+ if($size >= 1024*1024*1024*100){ $size = int($size/1024/1024/1024).'GB';}\r
+ elsif($size >= 1024*1024*1024*10){ $size = sprintf("%.1fGB",$size/1024/1024/1024);}\r
+ elsif($size > 1024*1024*1024){ $size = sprintf("%.2fGB",$size/1024/1024/1024);}\r
+ elsif($size >= 1024*1024*100){ $size = int($size/1024/1024).'MB'; }\r
+ elsif($size > 1024*1024){ $size = sprintf("%.1fMB",$size/1024/1024); }\r
+ elsif($size > 1024){ $size = int($size/1024).'KB'; }\r
+ else{ $size = int($size).'B';}\r
+ return $size;\r
+}\r
+\r
+sub makeitem{\r
+ my ($src,$mode) = @_; my ($buff,$check,$target);\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$src);\r
+ if(!$dummy){ $filepre = $set{'file_pre'}; }\r
+ my $orgno = $no;\r
+ $no = sprintf("%04d",$no);\r
+ my $size = 0;\r
+ my $dlpath = 0;\r
+\r
+ if($note =~ /DLpath:(.+)\s/){\r
+ $dlpath = $1;\r
+ $size = dispsize(-s "$set{'src_dir'}$filepre$no.${ext}_$dlpath/$filepre$no.$ext");\r
+ }else{\r
+ $size = dispsize(-s "$set{'src_dir'}$filepre$no.$ext");\r
+ }\r
+\r
+ my $path = $set{'http_src_path'} || $set{'src_dir'};\r
+ if($set{'link_target'}){ $target = qq| target="$set{'link_target'}"|; }\r
+ if($mode eq 'admin'){\r
+ if($dlpath){ $path .= "$filepre$no.${ext}_$dlpath/"; }\r
+ if($addr eq $host){ undef $host; }\r
+ if($in{'checkmode'} eq 'allcheck'){$check = ' checked';}\r
+ $buff = "<tr><td><INPUT TYPE=checkbox NAME=\"admin_delno\" VALUE=\"$no\"$check></td><td><a href=\"$path$filepre$no.$ext\"$target>$filepre$no.$ext</a></td><td>$comment</td><td>$size</td><td>$addr</td><td>$host</td><td>$date</td><td>$note</td><td>$mime</td><td>$orgname</td></tr>\n";\r
+ }else{\r
+ my($d_com,$d_date,$d_size,$d_mime,$d_org);\r
+ if($set{'disp_comment'}){ $d_com = "<td>$comment</td>"; } if($set{'disp_size'}){ $d_size = "<td>$size</td>"; } if($set{'disp_date'}){ $d_date= "<td>$date</td>"; }\r
+ if($set{'disp_mime'}){ $d_mime = "<td>$mime</td>"; } if($set{'disp_orgname'}){ $d_org = "<td>$orgname</td>"; }\r
+ if(-e "$set{'src_dir'}$filepre$no.$ext.html"){$buff = "<tr><td><SCRIPT type=\"text/javascript\" Language=\"JavaScript\"><!--\ndocument.write(\"<a href=\\\"javascript:delnoin($orgno)\\\">$set{'char_delname'}<\\/a>\");\n// --></SCRIPT></td><td><a href=\"$path$filepre$no.$ext.html\"$target>$filepre$no.$ext</a></td>$d_com$d_size$d_date$d_mime$d_org</tr>\n";}\r
+ elsif($dlpath){$buff = "<tr><td><SCRIPT type=\"text/javascript\" Language=\"JavaScript\"><!--\ndocument.write(\"<a href=\\\"javascript:delnoin($orgno)\\\">$set{'char_delname'}<\\/a>\");\n// --></SCRIPT></td><td><a href=\"$set{'base_cgi'}?mode=dl&file=$orgno\">$filepre$no.$ext</a></td>$d_com$d_size$d_date$d_mime$d_org</tr>\n";}\r
+ else{ $buff = "<tr><td><SCRIPT type=\"text/javascript\" Language=\"JavaScript\"><!--\ndocument.write(\"<a href=\\\"javascript:delnoin($orgno)\\\">$set{'char_delname'}<\\/a>\");\n// --></SCRIPT></td><td><a href=\"$path$filepre$no.$ext\"$target>$filepre$no.$ext</a></td>$d_com$d_size$d_date$d_mime$d_org</tr>\n";}\r
+ }\r
+ return $buff;\r
+}\r
+\r
+sub makedummyhtml{\r
+ my ($filename,$com,$file,$orgdlpath,$date,$mime,$orgname,$no) = @_;\r
+ my $buff;\r
+\r
+ if(!$no){\r
+ $buff = "<html><head><title>$filename</title></head><body>";\r
+ $buff .= qq|Download <a href="./$filename">$filename</a>|;\r
+ $buff .= '</body></html>';\r
+ }else{\r
+ $buff = cryptfiledl($com,$file,$orgdlpath,$date,$mime,$orgname,$no);\r
+ }\r
+\r
+ open(OUT,">$set{'src_dir'}$filename.html")||&error(307,"$set{'src_dir'}$filename.html");\r
+ print OUT $buff;\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'src_dir'}$filename.html");\r
+ return 1;\r
+}\r
+\r
+sub logwrite{\r
+ my @log = @_;\r
+ open(OUT,"+>$set{'log_file'}")||&error(304);\r
+ eval{ flock(OUT, 2);};\r
+ eval{ truncate(OUT, 0);};\r
+ seek(OUT, 0, 0);\r
+ print OUT @log;\r
+ eval{ flock(OUT, 8);};\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},$set{'log_file'});\r
+ return 1;\r
+}\r
+\r
+sub binarycmp{\r
+ my ($src,$dst) = @_;\r
+ return 0 if (-s $src != -s $dst);\r
+ open(SRC,$src)||return 0; open(DST,$dst)||return 0;\r
+ my ($buff,$buff2);\r
+ binmode(SRC); binmode(DST); seek(SRC,0,0); seek(DST,0,0); \r
+ while(read(SRC,$buff,8192)){ read(DST,$buff2,8192); if($buff ne $buff2){ close(SRC); close(DST); return 0; } }\r
+ close(SRC); close(DST);\r
+ return 1;\r
+}\r
+\r
+sub init{\r
+ my $buff;\r
+ if(open(OUT,">$set{'log_file'}")){\r
+ print OUT "0<>0<>0<>1\n";\r
+ close(OUT);\r
+ chmod($set{'per_logfile'},$set{'log_file'});\r
+ }else{\r
+ $buff = "<tr><td>\83\81\83C\83\93\83\8d\83O\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>";\r
+ }\r
+ \r
+ unless (-d "$set{'src_dir'}"){\r
+ if(mkdir("$set{'src_dir'}",$set{'per_dir'})){\r
+ chmod($set{'per_dir'},"$set{'src_dir'}");\r
+ open(OUT,">$set{'src_dir'}index.html");\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'src_dir'}index.html");\r
+ }else{\r
+ $buff .= "<tr><td>Source\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>";\r
+ }\r
+ }\r
+\r
+ unless (-d "$set{'html_dir'}"){\r
+ if(mkdir("$set{'html_dir'}",$set{'per_dir'})){\r
+ chmod($set{'per_dir'},"$set{'html_dir'}");\r
+ }else{\r
+ $buff .= "<tr><td>HTML\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>";\r
+ }\r
+ }\r
+\r
+ if($buff){\r
+ $buff .= "<tr><td>\83f\83B\83\8c\83N\83g\83\8a\82É\8f\91\82«\8d\9e\82Ý\8c \8cÀ\82ª\82 \82é\82©\8am\94F\82µ\82Ä\82\82¾\82³\82¢</td></tr>";\r
+ &error_disp($buff,'init');\r
+ }\r
+}\r
+\r
+sub check_postkey{\r
+ my $inputkey = @_[0];\r
+ my @key = split(/,/,$set{'post_key'});\r
+ foreach my $key (@key){ if($inputkey eq $key){ return 1; } }\r
+ return 0;\r
+}\r
+\r
+sub leaddisp{\r
+ my @src = @_;\r
+ my ($str,$count);\r
+ foreach my $value (@src){\r
+ my ($mark,$name,$link); $count++;\r
+ if($count == 1){ $name = 'Upload Info'; $link = 'up'; }\r
+ elsif($count == 2){ $name = 'Error Info'; $link = 'error'; next if(!$set{'error_level'}); }\r
+ elsif($count == 3){ $name = 'Setting Info'; $link = 'set'; }\r
+ if($value){ if($value > 0){ $mark = '\81¥'; }else{ $mark = '\81£'; } $str .= qq|<a href="#$link">${mark}${name}</a> |; }\r
+ else{ $str .= qq|[$name] |; }\r
+ }\r
+ return $str;\r
+}\r
+\r
+sub errorclear{\r
+ open(OUT,">$set{'error_log'}")||return 0;\r
+ eval{ flock(OUT, 2);}; eval{ truncate(OUT, 0);}; seek(OUT, 0, 0); eval{ flock(OUT, 8);}; close(OUT);\r
+ chmod($set{'per_upfile'},$set{'log_file'});\r
+ return 1;\r
+}\r
+\r
+sub tablestr{\r
+ my ($value1,$value2) = @_;\r
+ return ("<tr><td>$value1</td><td>$value2</td></tr>\n");\r
+}\r
+\r
+sub globfile{\r
+ my ($src_dir,$filename) = @_;\r
+ opendir(DIR,$src_dir)||return 0; my @dir = readdir(DIR); closedir(DIR);\r
+ my @new = (); foreach my $value (@dir){ push(@new,"$src_dir$value") if($value =~ /$filename/ && !(-d "$src_dir$value")); }\r
+ return @new;\r
+}\r
+\r
+sub globdir{\r
+ my ($src_dir,$dir) = @_;\r
+ opendir(DIR,$src_dir)||return 0; my @dir = readdir(DIR); closedir(DIR);\r
+ my @new = (); foreach my $value (@dir){ if($value eq '.' ||$value eq '..' ){ next; } push(@new,"$src_dir$value") if($value =~ /$dir/ && (-d "$src_dir$value")); }\r
+ return @new;\r
+}\r
+\r
+sub error_disp{\r
+ my ($message,$mode) = @_;\r
+ my $url;\r
+ if($mode eq 'init'){ $url = qq|<a href="$set{'base_cgi'}">[\83\8a\83\8d\81[\83h]</a>|; }else{ $url = qq|<a href="$set{'http_html_path'}$set{'base_html'}">[\96ß\82é]</a>|; }\r
+ my $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+<div align="center">\r
+<table summary="error">\r
+$message\r
+<tr><td></td></tr>\r
+<tr><td><div align="center">$url</div></td></tr>\r
+</table>\r
+<br><br>\r
+<table summary="info">\r
+<tr>\r
+<td>DATE</td><td>$in{'date'}</td></tr>\r
+<tr><td>ADDR</td><td>$in{'addr'}</td></tr>\r
+<tr><td>HOST</td><td>$in{'host'}</td></tr>\r
+</table>\r
+</div>\r
+</body></html>\r
+EOM\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ exit;\r
+}\r
+\r
+sub error{\r
+ my ($no,$note) = @_;\r
+ if (length($note) > 64) { $note = substr($note,0,64).'...'; }\r
+ $note =~ s/&/&/g; $note =~ s/\"/"/g; $note =~ s/</</g; $note =~ s/>/>/g; $note =~ s/\r//g; $note =~ s/\n//g; $note =~ s/\t//g; $note =~ s/\0//g;\r
+ my ($message,$dispmsg,$flag);\r
+ if($no == 98){ $message = ""; }\r
+ elsif($no == 99){ $message = "UpFile\82È\82µ"; }\r
+ elsif($no == 101){ $message = "\93\8a\8de\8bÖ\8e~HOST"; }\r
+ elsif($no == 106){ $flag = 1; $message = "POST\83T\83C\83Y\92´\89ß"; $note = dispsize($note); $dispmsg= '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\83A\83b\83v\83\8d\81[\83h\83t\83@\83C\83\8b('.$note.')\82Í \8dÅ\91å\97e\97Ê\90Ý\92è('.dispsize($set{'max_size'}*1024).')\82ð\89z\82¦\82Ä\82¢\82Ü\82·</td></tr>';}\r
+ elsif($no == 107){ $flag = 1; $message = "POST\83T\83C\83Y\89ß\8f¬"; $note = dispsize($note); $dispmsg= '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\83A\83b\83v\83\8d\81[\83h\83t\83@\83C\83\8b('.$note.')\82Í \8dÅ\8f¬\97e\97Ê\90Ý\92è('.dispsize($set{'min_size'}*1024).')\96¢\96\9e\82Å\82·</td></tr>';}\r
+# elsif($no == 108){ $flag = 1; $message = "POST\83f\81[\83^\95s\8a®\91S"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>POST\83f\81[\83^\82ª\95s\8a®\91S\82Å\82·</td></tr>';}\r
+ elsif($no == 109){ $flag = 1; $message = "POSTKey\95s\88ê\92v"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>POSTKey\82ª\88ê\92v\82µ\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 202){ $flag = 1; $message = "\8ag\92£\8eq\8d\87\82í\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\93\8a\8de\82Å\82«\82é\8ag\92£\8eq\82Í'.$set{'up_ext'}.'\82Å\82·</td></tr>';}\r
+ elsif($no == 203){ $flag = 1; $message = "\93\8a\8de\91\81\82·\82¬"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\93¯\88êIP\83A\83h\83\8c\83X\82©\82ç'.$set{'interval'}.'\95b\88È\93à\82É\8dÄ\93\8a\8de\82Å\82«\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 204){ $flag = 1; $message = "\88ê\8e\9e\83t\83@\83C\83\8b\8f\91\82«\8d\9e\82ß\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\88ê\8e\9e\83t\83@\83C\83\8b\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>';}\r
+ elsif($no == 205){ $flag = 1; $message = "\93¯\88ê\83t\83@\83C\83\8b\91¶\8dÝ"; $note =~ /([^\/]+)$/; my $filename = $1; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\93¯\88ê\83t\83@\83C\83\8b\82ª '.$filename.' \82É\91¶\8dÝ\82µ\82Ü\82·</td></tr>';}\r
+ elsif($no == 206){ $flag = 1; $message = "\8bÖ\8e~\8ag\92£\8eq"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\8ag\92£\8eq '.$note.' \82Í\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 303){ $flag = 1; $message = "\83\8d\83O\83t\83@\83C\83\8b\82É\93Ç\82Ý\8d\9e\82ß\82¸"; $dispmsg = '<tr><td>\83\81\83C\83\93\83\8d\83O\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>';}\r
+ elsif($no == 304){ $flag = 1; $message = "\83\8d\83O\83t\83@\83C\83\8b\82É\8f\91\82«\8d\9e\82ß\82¸"; $dispmsg = '<tr><td>\83\81\83C\83\93\83\8d\83O\82Ì\8f\91\82«\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>';}\r
+ elsif($no == 306){ $message = "\83t\83@\83C\83\8b\83\8a\83X\83gHTML\8f\91\82«\8d\9e\82ß\82¸";}\r
+ elsif($no == 307){ $message = "\83t\83@\83C\83\8bHTML\83t\83@\83C\83\8b\8f\91\82«\8d\9e\82ß\82¸";}\r
+ elsif($no == 401){ $flag = 1; $message = "\8dí\8f\9cNo.\8c\9f\8fo\82Å\82«\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$note.' \82©\82ç\8dí\8f\9cNo.\82ð\8c\9f\8fo\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$set{'file_pre'}.'0774.zip\82Ì\8fê\8d\87 No.\82É\82Í 774 \82ð\93ü\97Í\82µ\82Ü\82·</td></tr>';}\r
+ elsif($no == 402){ $flag = 1; $note = sprintf("%04d",int($note)); $message = "\8dí\8f\9cNo.\91¶\8dÝ\82¹\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$set{'file_pre'}.$note.'.*** \82Í\83\81\83C\83\93\83\8d\83O\82É\91¶\8dÝ\82µ\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 403){ $flag = 1; $message = "\8dí\8f\9c\83A\83N\83Z\83X\8b\91\94Û"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\83t\83@\83C\83\8b\8dí\8f\9c\8fð\8c\8f\82Í\96\9e\82½\82µ\82Ä\82¢\82Ü\82·\82ª '.$note.' \82Ì\83t\83@\83C\83\8b\82Ì\8dí\8f\9c\82ª\8b\91\94Û\82³\82ê\82Ü\82µ\82½</td></tr><tr><td>\83A\83N\83Z\83X\82ª\89ß\8fè\82È\8fê\8d\87\93\99\82Í\8e\9e\8aÔ\82ð\92u\82¢\82Ä\8dÄ\91\80\8dì\82·\82é\82Æ\8dí\8f\9c\82Å\82«\82é\82±\82Æ\82ª\82 \82è\82Ü\82·</td></tr>';}\r
+ elsif($no == 404){ $flag = 1; $message = "\8dí\8f\9cKey\95s\88ê\92v"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$note.' \8dí\8f\9cKey\82ª\88ê\92v\82µ\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr>';}\r
+\r
+ elsif($no == 51){ $flag = 1; $message = "[DLMode] No.\8c©\82Â\82©\82ç\82¸"; $dispmsg = '<tr><td>[DLMode] \83t\83@\83C\83\8b\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$note.' \82©\82ç\83t\83@\83C\83\8bNo.\82ð\8c\9f\8fo\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr>'; }\r
+ elsif($no == 52){ $flag = 1; $message = "[DLMode] File\8c©\82Â\82©\82ç\82¸"; $dispmsg = '<tr><td>[DLMode] \83t\83@\83C\83\8b\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$set{'file_pre'}.$note.'.*** \82Í\83\81\83C\83\93\83\8d\83O\82É\91¶\8dÝ\82µ\82Ü\82¹\82ñ</td></tr>'; }\r
+ elsif($no == 53){ $flag = 1; $message = "[DLMode] DLkey\96¢\90Ý\92è"; $dispmsg = '<tr><td>[DLMode] orgDLkeyError</td></tr><tr><td>'.$note.' DLKey\82ª\96¢\90Ý\92è\82Å\82·</td></tr>'; }\r
+ elsif($no == 54){ $flag = 1; $message = "[DLMode] DLkey\95s\88ê\92v"; $dispmsg = '<tr><td>[DLMode] orgDLkeyError</td></tr><tr><td>'.$note.' DLKey\82ª\88ê\92v\82µ\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr>'; }\r
+ elsif($no == 55){ $flag = 1; $message = "[DLMode] File Oepn Error"; $dispmsg = '<tr><td>[DLMode] Open Error</td></tr><tr><td>'.$note.' \83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>'; }\r
+ elsif($no == 56){ $flag = 1; $message = "[DLMode] File Not Found"; $dispmsg = '<tr><td>[DLMode] Not Found</td></tr><tr><td>'.$note.' \83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ</td></tr>'; }\r
+\r
+ elsif($no == 61){ $flag = 1; $message = "DLkey\96¢\90Ý\92è"; $dispmsg = '<tr><td>DLKey\82ª\96¢\90Ý\92è\82Å\82·</td></tr>'; }\r
+\r
+ if($note){$message .= ' ';}\r
+ eval { close($in{'upfile'}); };\r
+ unlink($in{'tmpfile'});\r
+ if($set{'error_level'} && $no > 100){\r
+ unless(-e $set{'error_log'}){\r
+ open(OUT,">$set{'error_log'}");\r
+ close(OUT);\r
+ chmod($set{'per_logfile'},$set{'error_log'});\r
+ }\r
+ if($set{'error_size'} && ((-s $set{'error_log'}) > $set{'error_size'} * 1024)){\r
+ my $err_bkup = "$set{'error_log'}.bak.cgi";\r
+ unlink($err_bkup);\r
+ rename($set{'error_log'},$err_bkup);\r
+ open(OUT,">$set{'error_log'}");\r
+ close(OUT);\r
+ chmod($set{'per_logfile'},$set{'error_log'});\r
+ }\r
+ open(OUT,">>$set{'error_log'}");\r
+ print OUT "$in{'date'}<>$no<>$message$note<>$in{'addr'}<>$in{'host'}<>1\n";\r
+ close(OUT);\r
+ }\r
+ &error_disp($dispmsg) if($flag && $set{'disp_error'});\r
+ &quit();\r
+}\r
+\r
+sub dlfile{\r
+ my $msg;\r
+ my ($orgdlkey,$orgdlpath);\r
+ my ($dlext,$dlfilepre);\r
+ my ($dl_date,$dl_comment,$dl_size,$dl_mime,,$dl_orgname);\r
+ my $dlno = 0;\r
+ my $findflag;\r
+\r
+ open(IN,$set{'log_file'})||&error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+ shift(@log);\r
+\r
+ if($in{'file'} =~ /(\d+)/){ $dlno = $1; }\r
+ if($dlno == 0) { &error(51,$in{'file'}); }\r
+\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value);\r
+ my @note = split(/,/,$note);\r
+ if(int($dlno) == $no){\r
+ $dl_comment = $comment;\r
+ $dl_mime = $mime;\r
+ $dl_date = $date;\r
+ $dl_orgname = $orgname;\r
+ $dlext = $ext;\r
+ $dlfilepre = $filepre;\r
+ foreach my $tmpnote (@note){\r
+ if($tmpnote =~ /\!--\sDLKey:(.+)\s--.*\!--\sDLpath:(.+)\s--/){\r
+ $orgdlkey = $1;\r
+ $orgdlpath = $2;\r
+ last;\r
+ }\r
+ }\r
+ $findflag = 1;\r
+ last;\r
+ }\r
+ }\r
+\r
+ my $dlfile = $dlfilepre.sprintf("%04d",int($dlno)).'.'.$dlext;\r
+ if(!(-e "$set{'src_dir'}${dlfile}_$orgdlpath/$dlfile")){ &error(56,"$dlfile----$set{'src_dir'}${dlfile}_$orgdlpath/$dlfile"); }\r
+\r
+ if($in{'dlkey'}){\r
+ my $dlsalt = substr($orgdlkey,0,2);\r
+ my $dlkey = crypt($in{'dlkey'},$dlsalt);\r
+\r
+ if($findflag == 0){ &error(52,$dlfile); }\r
+ elsif(!$orgdlkey){ &error(53,$dlfile); }\r
+ elsif($orgdlkey ne $dlkey && $set{'admin_pass'} ne $in{'dlkey'}){ &error(54,$dlfile); }\r
+ #print "Location: $set{'http_src_path'}${dlfile}_$orgdlpath/$dlfile\n\n";\r
+ my $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}\r
+<META HTTP-EQUIV="Refresh" CONTENT="1;URL=$set{'http_src_path'}${dlfile}_$orgdlpath/$dlfile">\r
+</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+<div align="center">\r
+<br>\r
+<table summary="dlfrom">\r
+<tr><td>\94ò\82Î\82È\82¢\8fê\8d\87\82Í <a href="$set{'http_src_path'}${dlfile}_$orgdlpath/$dlfile">\82±\82¿\82ç</a> \82©\82ç</td></tr>\r
+</table>\r
+</div>\r
+</body></html>\r
+EOM\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ }else{\r
+ my $buff = cryptfiledl($dl_comment,$dlfile,$orgdlpath,$dl_date,$dl_mime,$dl_orgname,$dlno);\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ }\r
+ exit;\r
+}\r
+\r
+sub cryptfiledl{\r
+ my($com,$file,$orgdlpath,$date,$mime,$orgname,$no) = @_;\r
+ my($d_com,$d_date,$d_size,$d_mime,$d_org);\r
+\r
+ if($set{'disp_comment'}){ $d_com = "<tr><td>COMMENT</td><td>$com</td></td>"; } if($set{'disp_size'}){ $d_size = "<tr><td>SIZE</td><td>".dispsize(-s "$set{'src_dir'}${file}_$orgdlpath/$file")." (".(-s "$set{'src_dir'}${file}_$orgdlpath/$file")."bytes)"."</td></tr>"; } if($set{'disp_date'}){ $d_date= "<tr><td>DATE</td><td>$date</td></tr>"; }\r
+ if($set{'disp_mime'}){ $d_mime = "<tr><td>ORGMIME</td><td>$mime</td></tr>"; } if($set{'disp_orgname'}){ $d_org = "<tr><td>ORGNAME</td><td>$orgname</td></tr>"; }\r
+\r
+ my $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+<div align="center">\r
+<br>\r
+$file \82É\82ÍDLKey\82ª\90Ý\92è\82³\82ê\82Ä\82¢\82Ü\82·\r
+<table summary="dlform">\r
+<tr><td></td></tr>\r
+<FORM METHOD=POST ACTION="$set{'base_cgi'}" name="DL">\r
+<tr><td>\r
+<input type=hidden name=file value=$no>\r
+<input type=hidden name=jcode value="\8a¿\8e\9a">\r
+<input type=hidden name=mode value=dl></td></tr>\r
+$d_com$d_date$d_size$d_mime$d_org\r
+<tr><td>DLKey:<input type=text size=8 name="dlkey"></td></tr>\r
+<tr><td><input type=submit value="DownLoad"></td></tr>\r
+</FORM>\r
+</table>\r
+</div>\r
+</body></html>\r
+EOM\r
+\r
+ return $buff;\r
+}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/perl\r
+use vars qw(%set %in);\r
+use strict;\r
+$set{'log_file'} = './log.cgi'; #\83\8d\83O\83t\83@\83C\83\8b\96¼\r
+$set{'max_log'} = 30; #\95Û\8e\9d\8c\8f\90\94\r
+$set{'max_size'} = 1*1024; #\8dÅ\91å\93\8a\8de\97e\97Ê(KB)\r
+$set{'min_flag'} = 0; #\8dÅ\8f¬\97e\97Ê\90§\8cÀ\82ð\8eg\97p\82·\82é=1\r
+$set{'min_size'} = 100; #\8dÅ\8f¬\93\8a\8de\97e\97Ê(KB)\r
+$set{'max_all_flag'} = 0; #\91\8d\97e\97Ê\90§\8cÀ\82ð\8eg\97p\82·\82é=1\r
+$set{'max_all_size'} = 20*1024; #\91\8d\90§\8cÀ\97e\97Ê(KB)\r
+$set{'file_pre'} = 'up'; #\83t\83@\83C\83\8b\90Ú\93ª\8e«\r
+$set{'pagelog'} = 10; #1\83y\81[\83W\82É\95\\8e¦\82·\82é\83t\83@\83C\83\8b\90\94\r
+$set{'base_html'} = 'upload.html'; #1\83y\81[\83W\96Ú\82Ì\83t\83@\83C\83\8b\96¼\r
+$set{'interval'} = 0; #\93¯\88êIP\93\8a\8de\8aÔ\8au\95b\90\94\r
+$set{'deny_host'} = ''; #\93\8a\8de\8bÖ\8e~IP/HOST ,\82Å\8bæ\90Ø\82é ex.(bbtec.net,219.119.66,ac.jp)\r
+$set{'admin_name'} = 'admin'; #\8aÇ\97\9d\8eÒ\83\8d\83O\83C\83\93ID\r
+$set{'admin_pass'} = '1234'; #\8aÇ\97\9d\8eÒ\83p\83X\83\8f\81[\83h\r
+\r
+# \88È\89º5\8d\80\96Ú\82ð\8dÄ\90Ý\92è\82·\82é\8dÛ\82É\82ÍPATH\81C\83f\83B\83\8c\83N\83g\83\8a\82Í / \82Å\8fI\82í\82é\82±\82Æ\r
+# $set{'html_dir'},$set{'base_cgi'}\82ð ./ \88È\8aO\82É\90Ý\92è\82·\82é\8fê\8d\87,\r
+# \82Ü\82½\82ÍDLkey\82ð\8eg\97p\82µ \82È\82¨\82©\82ÂHTML\83L\83\83\83b\83V\83\85($set{'dummy_html'} = 2 or 3)\82ð\8eg\97p\82·\82é\8fê\8d\87\82Í\r
+# $set{'base_cgi'} , $set{'http_html_path'} , $set{'http_src_path'} \82ð\83t\83\8b\83p\83X(http://\81`\81` or /\81`\81`)\82Å\8bL\8fq\82·\82é\r
+$set{'html_dir'} = './'; # \93à\95\94HTML\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\r
+$set{'src_dir'} = './src/'; # \93à\95\94\83t\83@\83C\83\8b\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\r
+$set{'base_cgi'} = './upload.cgi'; # \82±\82Ì\83X\83N\83\8a\83v\83g\96¼ http://\81`\82Ì\8ew\92è\89Â\94\\r
+$set{'http_html_path'} = './'; # html\8eQ\8fÆ httpPATH http://\81`\82Ì\8ew\92è\89Â\94\\r
+$set{'http_src_path'} = './src/'; # file\8eQ\8fÆ httpPATH http://\81`\82Ì\8ew\92è\89Â\94\\r
+\r
+$set{'dlkey'} = 0; # DLKey\82ð\8eg\97p\82·\82é=1,DLkey\95K\90{=2\r
+$set{'up_ext'} = 'txt,lzh,zip,rar,gca,mpg,mp3,avi,swf,bmp,jpg,gif,png'; #\83A\83b\83v\83\8d\81[\83h\82Å\82«\82é\8aî\96{\8ag\92£\8eq \94¼\8ap\89p\90\94\8f¬\95¶\8e\9a ,\82Å\8bæ\90Ø\82é\r
+$set{'up_all'} = 0; #\93o\98^\88È\8aO\82Ì\82à\82Ì\82àUP\82³\82¹\82ç\82ê\82é\82æ\82¤\82É\82·\82é=1\r
+$set{'ext_org'} = 0; #$set{'up_all'}\82ª1\82Ì\8e\9e\83I\83\8a\83W\83i\83\8b\82Ì\8ag\92£\8eq\82É\82·\82é=1\r
+$set{'deny_ext'} = 'php,php3,phtml,rb,sh,bat,dll'; #\93\8a\8de\8bÖ\8e~\82Ì\8ag\92£\8eq \94¼\8ap\89p\90\94\8f¬\95¶\8e\9a ,\82Å\8bæ\90Ø\82é\r
+$set{'change_ext'} = 'cgi->txt,pl->txt,log->txt,jpeg->jpg,mpeg->mpg'; #\8ag\92£\8eq\95Ï\8a· \91O->\8cã \94¼\8ap\89p\90\94\8f¬\95¶\8e\9a ,\82Å\8bæ\90Ø\82é\r
+\r
+$set{'home_url'} = ''; #[HOME]\82Ì\83\8a\83\93\83N\90æ \91\8a\91Î\83p\83X\96\94\82Í http://\82©\82ç\8en\82Ü\82é\90â\91Î\83p\83X\r
+$set{'html_all'} = 1; #[ALL]\82ð\8fo\82·=1\r
+$set{'dummy_html'} = 0; #\83t\83@\83C\83\8b\8cÂ\95ÊHTML\82ð\8dì\90¬\82·\82é \92Ê\8fí\83t\83@\83C\83\8b\82Ì\82Ý=1,DLKey\90Ý\92è\83t\83@\83C\83\8b\82Ì\82Ý=2,\82·\82×\82Ä=3\r
+$set{'find_crypt'} = 1; #\88Ã\8d\86\89»ZIP\82ð\8c\9f\8fo\82·\82é=1\r
+$set{'binary_compare'} = 0; #\8aù\91¶\83t\83@\83C\83\8b\82Æ\83o\83C\83i\83\8a\94ä\8ar\82·\82é=1\r
+$set{'post_flag'} = 0; #PostKey\82ð\8eg\97p\82·\82é=1\r
+$set{'post_key'} = 'postkey'; #PostKey ,\82Å\8bæ\90Ø\82é\82Æ\95¡\90\94\8ew\92è ex.(postkey1,postkey2)\r
+$set{'disp_error'} = 1; #\83\86\81[\83U\81[\82É\83G\83\89\81[\82ð\95\\8e¦\82·\82é=1\r
+$set{'error_level'} = 1; #\83G\83\89\81[\83\8d\83O\82ð\8bL\98^\82·\82é=1\r
+$set{'error_log'} = './error.cgi'; #\83G\83\89\81[\83\8d\83O\83t\83@\83C\83\8b\96¼\r
+$set{'error_size'} = 1024; # \83G\83\89\81[\83\8d\83O\8dÅ\91å\97e\97Ê(KB) \90§\8cÀ\82È\82µ=0\r
+$set{'zero_clear'} = 1; #\83t\83@\83C\83\8b\82ª\8c©\82Â\82©\82ç\82È\82¢\8fê\8d\87\83\8d\83O\82©\82ç\8dí\8f\9c\82·\82é=1\r
+\r
+$set{'disp_comment'} = 1; #\83R\83\81\83\93\83g\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_date'} = 1; #\93ú\95t\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_size'} = 1; #\83T\83C\83Y\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_mime'} = 1; #MIMETYPE\82ð\95\\8e¦\82·\82é=1\r
+$set{'disp_orgname'} = 1; #\83I\83\8a\83W\83i\83\8b\83t\83@\83C\83\8b\96¼\82ð\95\\8e¦\82·\82é=1\r
+\r
+$set{'per_upfile'} = 0666; #\83A\83b\83v\83\8d\81[\83h\83t\83@\83C\83\8b\82Ì\83p\81[\83~\83b\83V\83\87\83\93 suexec=0604,other=0666\r
+$set{'per_dir'} = 0777; #\83\\81[\83X\83A\83b\83v\83f\83B\83\8c\83N\83g\83\8a\82Ì\83p\81[\83~\83b\83V\83\87\83\93 suexec=0701,other=0777\r
+$set{'per_logfile'} = 0666; #\83\8d\83O\83t\83@\83C\83\8b\82Ì\83p\81[\83~\83b\83V\83\87\83\93\81@suexec=0600,other=0666\r
+$set{'link_target'} = ''; #target\91®\90«\r
+\r
+#------\r
+$set{'ver'} = '2005/10/10e';\r
+$set{'char_delname'} = 'D';\r
+\r
+$in{'time'} = time(); $in{'date'} = conv_date($in{'time'});\r
+$in{'addr'} = $ENV{'REMOTE_ADDR'};\r
+$in{'host'} = gethostbyaddr(pack('C4',split(/\./, $in{'addr'})), 2) || $ENV{'REMOTE_HOST'} || '(none)';\r
+\r
+if($in{'addr'} eq $in{'host'}){ $in{'host'} = '(none)'; }\r
+\r
+$set{'html_head'} =<<"EOM";\r
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
+<html lang="ja">\r
+<HEAD>\r
+<META name="robots" content="noindex,nofollow">\r
+<META name="ROBOTS" content="NOINDEX,NOFOLLOW">\r
+<META http-equiv="Content-type" content="text/html; charset=Shift_JIS">\r
+<META http-equiv="Pragma" content="no-cache">\r
+<META http-equiv="Cache-Control" content="no-cache">\r
+<META http-equiv="Expires" content="0">\r
+<TITLE>Uploader</TITLE>\r
+EOM\r
+\r
+$set{'html_css'} =<<"EOM";\r
+<META http-equiv="Content-Style-Type" content="text/css">\r
+<STYLE type="text/css"><!--\r
+input,td{ font-size: 10pt;font-family:Chicago,Verdana,Arial,sans-serif,"\82l\82r \82o\83S\83V\83b\83N"; }\r
+a:hover { background-color:#EECCCC; }\r
+input,textarea{ border-top : 1px solid ; border-bottom : 1px solid ; border-left : 1px solid ; border-right : 1px solid ;font-size:10pt;background-color:#FFFFFF; }\r
+-->\r
+</STYLE>\r
+EOM\r
+\r
+unless(-e $set{'log_file'}){ &init; }\r
+unless(-e $set{'base_html'}){ &makehtml; }\r
+{ #\83f\83R\81[\83h\r
+ my $readbuffsize = 1024*8;\r
+ if ($ENV{'REQUEST_METHOD'} eq "POST" && $ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/i){\r
+ if ($ENV{'CONTENT_LENGTH'} > ($set{'max_size'} * 1024 + 1024)){ if($ENV{'SERVER_SOFTWARE'} =~ /IIS/){ while(read(STDIN,my $buff,$readbuffsize)){} } &error(106,$ENV{'CONTENT_LENGTH'});}\r
+ }else{\r
+ if ($ENV{'CONTENT_LENGTH'} > 1024*100){ error(98); }\r
+ }\r
+ my %ck; foreach(split(/;/,$ENV{'HTTP_COOKIE'})){ my($key,$val) = split(/=/); $key =~ s/\s//g; $ck{$key} = $val;}\r
+ my @ck = split(/<>/,$ck{'SN_USER'});\r
+ if(length($ck[0]) < 5){ \r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/'); srand;\r
+ my $salt = $salt[int(rand(@salt))] . $salt[int(rand(@salt))];\r
+ $in{'user'} = crypt($in{'addr'}.$in{'time'}, $salt);\r
+ }else{ $in{'user'} = $ck[0]; }\r
+\r
+ if($ENV{'REQUEST_METHOD'} eq "POST" && $ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/i){\r
+ my %FORM; my $subbuff; my $filename; my $valuename;\r
+ my $upflag; my $valueflag; my $bound; my $mime;\r
+ my $readlength = 0;\r
+ my $random = int(rand(900000)) + 100000;\r
+ my $endflag = 0;\r
+ binmode(STDIN);\r
+ while(<STDIN>){ $readlength += length($_); if(/(--.*)\r\n$/){ $bound = $1; last; }}\r
+ if(-e "$set{'src_dir'}$random.temporary"){ $random++; }\r
+ if(-e "$set{'src_dir'}$random.temporary"){ $random++; }\r
+ if(-e "$set{'src_dir'}$random.temporary"){ &error(204); }\r
+\r
+ open(OUT,">$set{'src_dir'}$random.temporary");\r
+ binmode(OUT);\r
+ my $formbuff;\r
+ while(my $buff = <STDIN>){\r
+ $readlength += length($buff);\r
+ if($upflag == 1){ if($buff =~ /Content-Type:\s(.*)\r\n$/i){ $mime = $1; } $upflag++; next;}\r
+ if($upflag == 2){\r
+ while(1){\r
+ my $readblen; my $filebuff;\r
+ if($ENV{'CONTENT_LENGTH'} - $readlength < $readbuffsize){ $readblen = $ENV{'CONTENT_LENGTH'} - $readlength; }\r
+ else{ $readblen = $readbuffsize; }\r
+ if(!read(STDIN,$filebuff,$readblen)){ last };\r
+ $readlength += length($filebuff);\r
+ if($ENV{'CONTENT_LENGTH'} - $readlength < $readbuffsize){\r
+ my $readblen = $ENV{'CONTENT_LENGTH'} - $readlength;\r
+ read(STDIN,my $subbuff,$readblen);\r
+ $readlength += length($subbuff);\r
+ $filebuff .= $subbuff;\r
+ $endflag = 1;\r
+ }\r
+ my $offset = index($filebuff,$bound);\r
+ if($offset >= 0){\r
+ $buff = substr($filebuff,0,$offset-2); my $subbuff = substr($filebuff,$offset);\r
+ print OUT $buff; $upflag = 0; $formbuff .= $subbuff; last;\r
+ }else{ print OUT $filebuff; }\r
+ }\r
+ if($endflag){ last; }\r
+ next;\r
+ }\r
+ if($buff =~ /^Content-Disposition:\sform-data;\sname=\"upfile\";\sfilename=\"(.*)\"\r\n$/i){\r
+ $filename = $1; $upflag = 1; next;\r
+ }\r
+ $formbuff .= $buff;\r
+ }\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'src_dir'}$random.temporary");\r
+ { my $value;\r
+ foreach my $buff(split(/\r\n/,$formbuff)){\r
+ $buff .= "\r\n";\r
+ if($buff =~ /^$bound\-\-/){ $FORM{$value} =~ s/\r\n$//; $valueflag = 0; last;}\r
+ if($buff =~ /^$bound/){ $FORM{$value} =~ s/\r\n$//; $valueflag = 0; next;}\r
+ if($valueflag == 1){ $valueflag++; next; }\r
+ if($valueflag == 2){ $FORM{$value} .= $buff; }\r
+ if($buff =~ /^Content-Disposition: form-data; name=\"(.+)\"\r\n$/){ $value = $1; $valueflag++; }\r
+ }\r
+ }\r
+ if($upflag || $valueflag){ unlink("$set{'src_dir'}$random.temporary"); &error(108);}\r
+\r
+ $in{'org_pass'} = $in{'pass'} = $FORM{'pass'};\r
+ $in{'dlkey'} = $FORM{'dlkey'};\r
+ $in{'comment'} = $FORM{'comment'};\r
+ $in{'jcode'} = $FORM{'jcode'};\r
+ $in{'postkey'} = $FORM{'postkey'};\r
+ $in{'upfile'} = $filename;\r
+ $in{'type'} = $mime;\r
+ $in{'tmpfile'} = "$set{'src_dir'}$random.temporary";\r
+ $in{'orgname'} = $in{'upfile'};\r
+ if(-s "$in{'tmpfile'}" == 0){ unlink("$in{'tmpfile'}"); &error(99) }\r
+ if($set{'min_flag'} && ((-s "$in{'tmpfile'}") < $set{'min_size'} * 1024)){ &error(107,(-s "$in{'tmpfile'}"));}\r
+ if((-s "$in{'tmpfile'}") > $set{'max_size'} * 1024){ &error(106,(-s "$in{'tmpfile'}"));}\r
+ if($set{'post_flag'} && !check_postkey($in{'postkey'})){ &error(109); }\r
+ if($set{'dlkey'} == 2 && !$in{'dlkey'}){ unlink("$in{'tmpfile'}"); &error(61); }\r
+ }else{\r
+ my ($buffer,%FORM,@admin_delno);\r
+ if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});}\r
+ else { $buffer = $ENV{'QUERY_STRING'}; }\r
+ my @pairs = split(/&/,$buffer);\r
+ foreach my $pair (@pairs) {\r
+ my ($name, $value) = split(/=/, $pair);\r
+ $value =~ tr/+/ /;\r
+ $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;\r
+ if($name eq 'admin_delno'){\r
+ push(@admin_delno,$value);\r
+ }else{\r
+ $FORM{$name} = $value;\r
+ }\r
+ }\r
+ $in{'delpass'} = $FORM{'delpass'};\r
+ $in{'delno'} = $FORM{'delno'};\r
+ $in{'file'} = $FORM{'file'};\r
+ $in{'dlkey'} = $FORM{'dlkey'};\r
+ $in{'mode'} = $FORM{'mode'};\r
+ $in{'checkmode'} = $FORM{'checkmode'};\r
+ $in{'admin_delno'} = join(',',@admin_delno);\r
+ if($in{'delno'} eq $set{'admin_name'} && $in{'delpass'} eq $set{'admin_pass'}){ &admin_mode(); }\r
+ if(!$in{'delno'} && $in{'delpass'} eq $set{'admin_pass'}){ &makehtml; &quit; }\r
+ }\r
+\r
+ my @denyhost = split(/,/,$set{'deny_host'});\r
+ foreach my $value (@denyhost){\r
+ if ($in{'addr'} =~ /$value/ || $in{'host'} =~ /$value/){ &error(101);}\r
+ }\r
+\r
+ my @form = ($in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'});\r
+ foreach my $value (@form) {\r
+ if (length($value) > 128) { $value = substr($value,0,128).'...'; }\r
+# $value =~ s/&/&/g;\r
+ $value =~ s/"/"/g;\r
+ $value =~ s/</</g;\r
+ $value =~ s/>/>/g;\r
+ $value =~ s/\r//g;\r
+ $value =~ s/\n//g;\r
+ $value =~ s/\t//g;\r
+ $value =~ s/\0//g;\r
+ }\r
+ ($in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'}) = @form;\r
+}\r
+\r
+\r
+if($in{'mode'} eq 'delete'){ &delete(); &quit(); }\r
+if($in{'mode'} eq 'dl'){ &dlfile;} #DL\r
+if(!$in{'upfile'}){ &error(99); }\r
+\r
+{#\83\81\83C\83\93\8f\88\97\9d\r
+\r
+ open(IN,$set{'log_file'})||&error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+ my ($no,$lastip,$lasttime) = split(/<>/,$log[0]);\r
+\r
+ if($set{'interval'} && $in{'time'} <= ($lasttime + $set{'interval'}) && $in{'addr'} eq $lastip){ &error(203);}\r
+ $in{'ext'} = extfind($in{'orgname'}); if(!$in{'ext'}){ &error(202); }\r
+\r
+ my $orgname;\r
+ if(split(/\//,$in{'orgname'}) > split(/\\/,$in{'orgname'})){ my @name = split(/\//,$in{'orgname'}); $orgname = $name[$#name]; }\r
+ else{ my @name = split(/\\/,$in{'orgname'}); $orgname = $name[$#name];}\r
+ \r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/');\r
+ srand;\r
+ my $salt = $salt[int(rand(@salt))] . $salt[int(rand(@salt))];\r
+ $in{'pass'} = crypt($in{'pass'}, $salt);\r
+\r
+ if($set{'binary_compare'}){\r
+ my @files = globfile("$set{'src_dir'}",".*");\r
+ my @dir = globdir("$set{'src_dir'}",".*");\r
+ foreach my $dir (@dir){ push(@files,globfile($dir."/",".*")); }\r
+ foreach my $value (@files){\r
+ next if($value =~ /\.temporary$/);\r
+ if(binarycmp($in{'tmpfile'},$value)){ unlink($in{'tmpfile'}); &error(205,$value);}\r
+ }\r
+ }\r
+\r
+ if($set{'find_crypt'}){\r
+ open(FILE,$in{'tmpfile'}); binmode(FILE); seek(FILE,0,0); read(FILE,my $buff,4); my $crypt_flag = 0;\r
+ if($buff =~ /^\x50\x4b\x03\x04$/){ seek(FILE,6,0); read(FILE,my $buff,1); $crypt_flag = 1 if(($buff & "\x01") eq "\x01"); }\r
+ close(FILE);\r
+ $in{'comment'} = '<font color="#FF0000">*</font>'.$in{'comment'} if($crypt_flag);\r
+ }\r
+\r
+ open(IN,$set{'log_file'})||&error(303);\r
+ @log = <IN>;\r
+ close(IN);\r
+ ($no,$lastip,$lasttime) = split(/<>/,$log[0]);\r
+ shift(@log);\r
+ $no++;\r
+ my $tmpno = sprintf("%04d",$no);\r
+\r
+ my $dlsalt;\r
+ my $filedir;\r
+ my $allsize = (-s $in{'tmpfile'});\r
+ \r
+ if($set{'dlkey'} && $in{'dlkey'}){\r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9'); srand;\r
+ for (my $c = 1; $c <= 20; ++$c) { $dlsalt .= $salt[int(rand(@salt))]; }\r
+ $filedir = "$set{'src_dir'}$set{'file_pre'}${tmpno}.$in{'ext'}_$dlsalt/";\r
+ mkdir($filedir,$set{'per_dir'});\r
+ rename("$in{'tmpfile'}","$filedir$set{'file_pre'}$tmpno.$in{'ext'}");\r
+ open(OUT,">${filedir}index.html");\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"${filedir}index.html");\r
+ $in{'comment'} = '<font color="#FF0000">[DLKey] </font>'.$in{'comment'};\r
+ }else{\r
+ undef $in{'dlkey'};\r
+ rename("$in{'tmpfile'}","$set{'src_dir'}$set{'file_pre'}$tmpno.$in{'ext'}");\r
+ }\r
+\r
+ if (length($orgname) > 128) { $orgname = substr($orgname,0,128).'...'; }\r
+\r
+ my @note;\r
+ if($set{'post_flag'} && $set{'post_key'}){\r
+ push(@note,'PostKey:'.$in{'postkey'});\r
+ }\r
+ if($ENV{'SERVER_SOFTWARE'} =~ /Apache|IIS/){\r
+ my $disptime;\r
+ my $time = time() - $in{'time'};\r
+ my @str = ('Upload:','\95b');\r
+ my $disptime = $time.$str[1];\r
+ push(@note,$str[0].$disptime);\r
+ }\r
+ if($in{'dlkey'}){\r
+ my @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/'); srand;\r
+ my $salt = $salt[int(rand(@salt))] . $salt[int(rand(@salt))];\r
+ my $crypt_dlkey = crypt($in{'dlkey'}, $salt);\r
+ push(@note,"DLKey<!-- DLKey:".$crypt_dlkey." --><!-- DLpath:".$dlsalt." -->");\r
+ }\r
+ my $note = join(',',@note);\r
+ my $usersalt = substr($in{'user'},0,2);\r
+ my $userid = crypt($in{'user'},$usersalt);\r
+ $in{'time'} = time();\r
+# $in{'date'} = conv_date(time());\r
+ my @new;\r
+ $new[0] = "$no<>$in{'addr'}<>$in{'time'}<>1\n";\r
+ my $addlog = "$no<>$in{'ext'}<>$in{'date'}<>$in{'comment'}<>$in{'type'}<>$orgname<>$in{'addr'}<>$in{'host'}<>$in{'pass'},$userid<>$set{'file_pre'}<>$note<>1\n";\r
+ $new[1] = $addlog;\r
+\r
+# open(OUT,">>./alllog.cgi"); print OUT $addlog; close(OUT);\r
+\r
+ my $i = 2;\r
+\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value);\r
+ if(!$dummy){ $filepre = $set{'file_pre'};}\r
+ $no = sprintf("%04d",$no);\r
+\r
+ my $filename;\r
+ my $filedir;\r
+ if($note =~ /DLpath:(.+)\s/){\r
+ my $dlpath = $1;\r
+ $filename = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/$filepre$no.$ext";\r
+ $filedir = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/";\r
+ }else{\r
+ $filename = "$set{'src_dir'}$filepre$no.$ext";\r
+ }\r
+ $allsize += (-s $filename);\r
+ \r
+ if($i <= $set{'max_log'} && !($set{'max_all_flag'} && $set{'max_all_size'}*1024 < $allsize)){ \r
+ if((-e $filename)||!$set{'zero_clear'}){ push(@new,$value); $i++; }\r
+ }else{\r
+ if(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } } rmdir($filedir);\r
+ }elsif(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } } rmdir($filedir);\r
+ }elsif(-e $filename){\r
+ push(@new,$value);\r
+ }else{\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } } rmdir($filedir);\r
+ }\r
+ }\r
+ }\r
+ logwrite(@new);\r
+ if($in{'dlkey'} && ( $set{'dummy_html'} == 2 || $set{'dummy_html'} == 3)){\r
+ &makedummyhtml("$set{'file_pre'}$tmpno.$in{'ext'}",$in{'comment'},"$set{'file_pre'}$tmpno.$in{'ext'}",$dlsalt,$in{'date'},$in{'type'},$orgname,$no);\r
+ }elsif(!$in{'dlkey'} && ($set{'dummy_html'} == 1 || $set{'dummy_html'} == 3)){\r
+ &makedummyhtml("$set{'file_pre'}$tmpno.$in{'ext'}");\r
+ }\r
+ &makehtml(); &quit();\r
+}\r
+\r
+sub makehtml{\r
+\r
+ my ($buff,$init,$postval,$dlkey);\r
+ my $page = 0; my $i = 1;\r
+ \r
+ open(IN,$set{'log_file'})||&error(303);\r
+ my $log = my @log = <IN>;\r
+ close(IN);\r
+ \r
+ if($log == 1){ $log++; $init++;}\r
+ my $lastpage = int(($log - 2)/$set{'pagelog'}) + 1;\r
+ $postval = ' obj.postkey.value = unescape(p[1]);' if($set{'post_flag'});\r
+ my $header =<<"EOM";\r
+$set{'html_head'}<META http-equiv="Content-Script-Type" content="text/javascript">\r
+<script type="text/javascript">\r
+<!--\r
+function getCookie(obj,cookiename){\r
+ var i,str; c = new Array(); p = new Array("",""); str = document.cookie;c = str.split(";");\r
+ for (i = 0; i < c.length; i++) { if (c[i].indexOf(cookiename+"=") >= 0) { p = (c[i].substr(c[i].indexOf("=")+1)).split("<>"); break; }}\r
+ if(cookiename == "SN_UPLOAD"){ obj.pass.value = unescape(p[0]);$postval }\r
+ else if(cookiename == "SN_DEL"){ obj.delpass.value = unescape(p[0]);}\r
+ return true;\r
+}\r
+function delnoin(no){\r
+ document.Del.delno.value = no;\r
+ document.Del.del.focus();\r
+}\r
+//-->\r
+</script>\r
+$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF" onload="getCookie(document.Form,'SN_UPLOAD');getCookie(document.Del,'SN_DEL');">\r
+<table summary="title" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Uploader</font></strong></td></tr></table>\r
+<p>\r
+Now.. Testing..\r
+</p>\r
+EOM\r
+ my $maxsize = 'Max '.dispsize($set{'max_size'}*1024);\r
+ my ($minsize,$total);\r
+ if($set{'min_flag'}){ $minsize = 'Min '.dispsize($set{'min_size'}*1024).' - '; }\r
+ if($set{'max_all_flag'}){ $total .= ' Total '.dispsize($set{'max_all_size'}*1024);}\r
+ $header .= qq|<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="$set{'base_cgi'}" name="Form">FILE $minsize$maxsize (*$set{'max_log'}Files$total)<br>|;\r
+ $header .='<INPUT TYPE=file SIZE="40" NAME="upfile">';\r
+ $header .= ' DLKey: <INPUT TYPE=text SIZE="8" NAME="dlkey" maxlength="8">' if($set{'dlkey'});\r
+ $header .= '\r
+DELKey: <INPUT TYPE=password SIZE="10" NAME="pass" maxlength="8"><br>\r
+COMMENT<br>\r
+<INPUT TYPE=text SIZE="45" NAME="comment">\r
+<INPUT TYPE=hidden NAME="jcode" VALUE="\8a¿\8e\9a">\r
+<INPUT TYPE=submit VALUE="Upload"><INPUT TYPE=reset VALUE="Cancel"><br>\r
+';\r
+ if($set{'post_flag'}){ $header .= 'PostKey<br><INPUT TYPE=password SIZE="10" NAME="postkey" maxlength="10">'; }\r
+ $header .= '</FORM>';\r
+\r
+ my $allsize = 0;\r
+ my @files = globfile("$set{'src_dir'}",".*");\r
+ my @dir = globdir("$set{'src_dir'}",".*");\r
+ foreach my $dir (@dir){ push(@files,globfile($dir."/",".*")); }\r
+ foreach my $value (@files){ $allsize += (-s "$value"); }\r
+\r
+ $allsize = dispsize($allsize);\r
+\r
+ my $footer = "</table><HR size=1>Used ${allsize}\n<br>";\r
+ if($set{'up_all'} && !$set{'ext_org'}){ $footer .= $set{'up_ext'}.' +'; }\r
+ elsif(!$set{'up_all'}){ $footer .= $set{'up_ext'}; }\r
+ $footer .= "\n<table summary=\"footer\" width=\"100%\"><tr><td><div align=left><FORM METHOD=POST ACTION=\"$set{'base_cgi'}\" name=\"Del\"><span style='font-size:9pt'><input type=hidden name=mode value=delete>No.<input type=text size=4 name=delno> key<input type=password size=4 name=delpass> <input type=submit value=\"del\" name=del></span></form></div>\n";\r
+ $footer .= "</td><td><div align=right><!-- $set{'ver'} --><a href=\"http://sugachan.dip.jp/download/\" target=\"_blank\"><small>Sn Uploader</small></a></div></td></tr></table>\n</body>\n</html>";\r
+\r
+ my $info_title = "<table summary=\"upinfo\" width=\"100%\">\n<tr><td></td><td>NAME</td>";\r
+ if($set{'disp_comment'}){ $info_title .= "<td>COMMENT</td>"; } if($set{'disp_size'}){ $info_title .= "<td>SIZE</td>"; } if($set{'disp_date'}){ $info_title .= "<td>DATE</td>"; }\r
+ if($set{'disp_mime'}){ $info_title .= "<td>MIME</td>"; } if($set{'disp_orgname'}){ $info_title .= "<td>ORIG</td>"; }\r
+ $info_title .= "</tr>\n";\r
+\r
+ my $home_url_link;\r
+ if($set{'home_url'}){ $home_url_link = qq|<a href="$set{'home_url'}">[HOME]</a> |;}\r
+ if($set{'html_all'}){\r
+ my $buff; my $no = 1; my $time = time; my $subheader;\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$dummy) = split(/<>/,$value);\r
+ if(!$dummy){ next; }\r
+ $buff .= makeitem($value);\r
+ }\r
+ $subheader .= "[ALL] ";\r
+ while($no <= $lastpage){\r
+ if($no == $page) { $subheader .= "\[$no\] ";}\r
+ else{ if($no == 1){ $subheader .= "<a href=\"$set{'http_html_path'}$set{'base_html'}?$time\">\[$no\]</a> "}\r
+ else{$subheader .= "<a href=\"$set{'http_html_path'}$no.html?$time\">\[$no\]</a> ";} }\r
+ $no++;\r
+ }\r
+ $subheader .= $info_title;\r
+ open(OUT,">$set{'html_dir'}all.html")||&error(306,"$set{'html_dir'}all.html");\r
+ print OUT $header."<hr size=1>".$home_url_link.$subheader."<hr size=1>".$buff.$footer;\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'html_dir'}all.html");\r
+ }else{ unlink("$set{'html_dir'}all.html"); }\r
+ \r
+ while($log > $i){\r
+ $buff .= makeitem($log[$i]) unless($init);\r
+ if(($i % $set{'pagelog'}) == 0||$i == $log -1){\r
+ $page++; my $subheader; my $no = 1; my $time = time;\r
+ if($set{'html_all'}){ $subheader .= "<a href=\"./all.html?$time\">[ALL]</a> "; }\r
+ while($no <= $lastpage){\r
+ if($no == $page) { $subheader .= "\[$no\] ";}\r
+ else{ if($no == 1){ $subheader .= "<a href=\"$set{'http_html_path'}$set{'base_html'}?$time\">\[$no\]</a> "}\r
+ else{$subheader .= "<a href=\"$set{'http_html_path'}$no.html?$time\">\[$no\]</a> ";}\r
+ }\r
+ $no++;\r
+ }\r
+ $subheader .= $info_title;\r
+ my $loghtml;\r
+ if($page == 1){ $loghtml = "$set{'html_dir'}$set{'base_html'}"; }\r
+ else{ $loghtml = "$set{'html_dir'}$page.html"; }\r
+\r
+ open(OUT,">$loghtml") || &error(306,"$loghtml");\r
+ print OUT $header."<hr size=1>".$home_url_link.$subheader."<hr size=1>".$buff.$footer;\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},$loghtml);\r
+ undef $buff;\r
+ }\r
+ $i++;\r
+ }\r
+\r
+ while($page < 1000){\r
+ $page ++;\r
+ if(-e "$set{'html_dir'}$page.html"){ unlink("$set{'html_dir'}$page.html"); }else{ last; }\r
+ }\r
+}\r
+\r
+sub delete{\r
+ my $mode = $_[0];\r
+ my @delno = split(/,/,$_[1]);\r
+ my $delno; my $flag = 0; my $tmpaddr;\r
+ my $delnote;\r
+\r
+ if($in{'delno'} =~ /(\d+)/){ $delno = $1; }\r
+ if($mode ne 'admin' && !$in{'delno'}){ return; }\r
+ elsif($mode ne 'admin' && !$delno){ &error(401,$in{'delno'}); }\r
+\r
+ open(IN,$set{'log_file'})|| &error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+\r
+ if($in{'addr'} =~ /(\d+).(\d+).(\d+).(\d+)/){ $tmpaddr = "$1.$2.$3."; }\r
+ my $findflag = 0;\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value);\r
+ $delnote = $note;\r
+ my $delflag = 0;\r
+ if(!$addr){ next; }\r
+ if($mode eq 'admin'){\r
+ foreach my $delno (@delno){ if($no == $delno){ $delflag = 1; last; } }\r
+ }elsif($no == $delno){\r
+ $findflag = 1;\r
+ unless ($addr =~ /^$tmpaddr/){\r
+ my ($pass,$id) = split(/,/,$pass);\r
+ my $delpass = $in{'delpass'} || $in{'addr'}.time();\r
+ my $salt = substr($pass, 0, 2); $delpass = crypt($delpass,$salt);\r
+ my $usersalt = substr($in{'user'},0,2); my $userid = crypt($in{'user'},$usersalt);\r
+ if ($in{'delpass'} ne $set{'admin_pass'} && $delpass ne $pass && $userid ne $id){ \r
+ if($mode ne 'admin'){ if(!$dummy){ $filepre = $set{'file_pre'};} $no = sprintf("%04d",$no); &error(404,"$filepre$no.$ext");}\r
+ }\r
+ }\r
+ $delflag = 1;\r
+ }\r
+ if($delflag){\r
+# open(OUT,">>./del.cgi"); print OUT $value; close(OUT);\r
+ $flag = 1;\r
+ if(!$dummy){ $filepre = $set{'file_pre'};}\r
+ $no = sprintf("%04d",$no);\r
+ my $filename;\r
+ my ($dlpath,$filedir);\r
+ if($delnote =~ /DLpath:(.+)\s/){\r
+ $dlpath = $1;\r
+ $filename = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/$filepre$no.$ext";\r
+ $filedir = "$set{'src_dir'}$filepre$no.${ext}_$dlpath/";\r
+ }else{\r
+ $filename = "$set{'src_dir'}$filepre$no.$ext";\r
+ }\r
+ \r
+ if(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } rmdir($filedir);} undef $value;\r
+ }elsif(unlink($filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } rmdir($filedir);} undef $value;\r
+ }elsif(!(-e $filename)){\r
+ unlink("$set{'src_dir'}$filepre$no.$ext.html"); if($filedir){ foreach(globfile($filedir,".*")){ unlink; } rmdir($filedir);} undef $value;\r
+ }else{\r
+ if($mode ne 'admin'){ &error(403,"$filepre$no.$ext");}\r
+ }\r
+ }\r
+ }\r
+ if($mode ne 'admin' && !$findflag){ &error(402,$delno); }\r
+ if($flag){\r
+ logwrite(@log);\r
+ &makehtml();\r
+ }\r
+}\r
+\r
+\r
+sub quit{\r
+ my ($cookiename,$buff);\r
+ my $flag = 0;\r
+ my @tmpfiles = globfile("$set{'src_dir'}","\.temporary");\r
+ foreach my $value (@tmpfiles){ if((stat($value))[10] < time - 60*60){ unlink("$value"); $flag++; } }\r
+ &makehtml() if($flag);\r
+ $buff =<<"EOM";\r
+$set{'html_head'}<META HTTP-EQUIV="Refresh" CONTENT="1;URL=$set{'http_html_path'}$set{'base_html'}">\r
+EOM\r
+ if($in{'jcode'} || $in{'mode'} eq 'delete'){\r
+ $buff .=<<"EOM";\r
+<META HTTP-EQUIV="Set-Cookie" content="SN_USER=$in{'user'}<>1; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT">\r
+<META HTTP-EQUIV="CONTENT-SCRIPT-TYPE" CONTENT="text/javascript">\r
+<script type="text/javascript">\r
+<!--\r
+setCookie();\r
+function setCookie() {\r
+ var key1,key2;\r
+ var tmp = "path=/; expires=Tue, 31-Dec-2030 23:59:59; ";\r
+EOM\r
+ if($in{'jcode'}){\r
+ my %ck; foreach(split(/;/,$ENV{'HTTP_COOKIE'})){ my($key,$val) = split(/=/); $key =~ s/\s//g; $ck{$key} = $val;}\r
+ my @ck = split(/<>/,$ck{'SN_DEL'});\r
+ if(!$ck[0] && $in{'org_pass'}){ $buff .= qq|\tdocument.cookie = "SN_DEL="+escape('$in{'org_pass'}')+"<>;"+ tmp;\n|;}\r
+ $cookiename = 'SN_UPLOAD'; $buff .= "\tkey1 = escape('$in{'org_pass'}'); key2 = escape('$in{'postkey'}');\n";}\r
+ else{ $cookiename = 'SN_DEL'; $buff .= "\tkey1 = escape('$in{'delpass'}'); key2 = '';\n"; }\r
+ $buff .= qq|\tdocument.cookie = "$cookiename="+key1+"<>"+key2+"; "+ tmp;\n}\n//-->\n</script>\n|;\r
+ }\r
+ $buff .=<<"EOM";\r
+<body>\r
+<br><br><div align=center><font size="+1"><br><br>\r
+<a href="$set{'http_html_path'}$set{'base_html'}?$in{'time'}">click here!</a></font><br>\r
+</div>\r
+</body></html>\r
+EOM\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ exit;\r
+}\r
+\r
+sub admin_mode{\r
+ &errorclear() if($in{'mode'} eq 'errorclear');\r
+ &delete('admin',$in{'admin_delno'}) if($in{'mode'} eq 'delete');\r
+\r
+ open(IN,$set{'log_file'})||error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+\r
+ my ($header,$buff,$footer,$value);\r
+ $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+EOM\r
+\r
+ $buff .= leaddisp(0,1,1).'<a name="up"></a><table summary="title" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Upload Info</font></strong></td></tr></table>';\r
+ $buff .= qq|<table summary="check"><tr><td><form action="$set{'base_cgi'}" method="POST"><input type=hidden name="checkmode" value="allcheck"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\82·\82×\82Ä\83`\83F\83b\83N"></form></td><td><form action="$set{'base_cgi'}" method="POST"><input type=hidden name="checkmode" value="nocheck"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\82·\82×\82Ä\8aO\82·"></form></td><td><form action="$set{'base_cgi'}" method="POST"><input type=hidden name=delpass value="$set{'admin_pass'}"><input type=submit value="HTML\82ð\8dX\90V\82·\82é/\83\8d\83O\83A\83E\83g"></form></td></tr></table>\n<form action="$set{'base_cgi'}" method="POST"><input type=hidden name="mode" value="delete"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\83`\83F\83b\83N\82µ\82½\82à\82Ì\82ð\8dí\8f\9c"><br>\n|."<table summary=\"upinfo\" width=\"100%\">\n<tr><td>DEL</td><td>NAME</td><td>COMMENT</td><td>SIZE</td><td>ADDR</td><td>HOST</td><td>DATE</td><td>NOTE</td><td>MIME</td><td>ORIG</td></tr>\n";\r
+ shift(@log);\r
+ foreach (@log){ $buff .= makeitem($_,'admin'); }\r
+ $buff .= '</table></form><br><br>';\r
+\r
+ if($set{'error_level'}){\r
+ $buff .= leaddisp(-1,0,1).'<a name="error"></a><table summary="errortitle" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Error Info</font></strong></td></tr></table>';\r
+ $buff .= qq|<form action="$set{'base_cgi'}" method="POST"><input type=hidden name=mode value="errorclear"><input type=hidden name=delno value="$in{'delno'}"><input type=hidden name=delpass value="$in{'delpass'}"><input type=submit value="\83G\83\89\81[\83\8d\83O\83N\83\8a\83A"></form>|;\r
+ $buff .= "<table summary=\"errorinfo\" width=\"100%\">\n<tr><td>DATE</td><td>ADDR</td><td>HOST</td><td>NOTE</td></tr>\n";\r
+ if(open(IN,$set{'error_log'})){ @log = reverse(<IN>); close(IN); foreach (@log){ my ($date,$no,$note,$addr,$host) = split(/<>/); $buff .= "<tr><td>$date</td><td>$addr</td><td>$host</td><td>$note</td></tr>\n"; }}\r
+ $buff .= "</table><br><br>\n";\r
+ }\r
+\r
+ $buff .= leaddisp(-1,-1,0);\r
+ $buff .= '<a name="set"></a><table summary="settitle" width="100%"><tr><td bgcolor="#caccff"><strong><font size="4" color="#3366cc">Setting Info</font></strong></td></tr></table>'."\n<table summary=\"setting\">\n";\r
+ $buff .= tablestr('\83X\83N\83\8a\83v\83gVer',$set{'ver'});\r
+ $buff .= tablestr('\83\81\83C\83\93\83\8d\83O\83t\83@\83C\83\8b',$set{'log_file'});\r
+ if($set{'error_level'}){\r
+ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\83t\83@\83C\83\8b',$set{'error_log'});\r
+ if($set{'error_size'}){ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\8dÅ\91å\97e\97Ê',dispsize($set{'error_size'}*1024).' '.($set{'error_size'}*1024).'Bytes'); }\r
+ else{ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\8dÅ\91å\97e\97Ê\90§\8cÀ','\96³'); }\r
+ }else{ $buff .= tablestr('\83G\83\89\81[\83\8d\83O\8bL\98^','\96³'); }\r
+ $buff .= tablestr('\95Û\8e\9d\8c\8f\90\94',$set{'max_log'});\r
+ $buff .= tablestr('\8dÅ\91å\93\8a\8de\97e\97Ê',dispsize($set{'max_size'}*1024).' '.($set{'max_size'}*1024).'Bytes');\r
+\r
+ if($set{'min_flag'}){ $buff .= tablestr('\8dÅ\8f¬\90§\8cÀ\97e\97Ê',dispsize($set{'min_size'}*1024).' '.($set{'min_size'}*1024).'Bytes'); }\r
+ else{ $buff .= tablestr('\8dÅ\8f¬\90§\8cÀ\97e\97Ê',"\96³"); }\r
+ if($set{'max_all_flag'}){ $buff .= tablestr('\91\8d\97e\97Ê\90§\8cÀ',dispsize($set{'max_all_size'}*1024).' '.($set{'max_all_size'}*1024).'Bytes'); }\r
+ else{ $buff .= tablestr('\91\8d\97e\97Ê\90§\8cÀ',"\96³"); }\r
+\r
+ $buff .= tablestr("\83t\83@\83C\83\8b\90Ú\93ª\8e«",$set{'file_pre'});\r
+ $buff .= tablestr("HTML\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a",$set{'html_dir'});\r
+ $buff .= tablestr("\83t\83@\83C\83\8b\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a",$set{'src_dir'});\r
+ if($set{'http_html_path'} && $set{'html_dir'} ne $set{'http_html_path'}){ $buff .= "<tr><td>HTTP_HTML_PATH</td><td>$set{'http_html_path'}</td></tr>\n";}\r
+ if($set{'http_src_path'} && $set{'src_dir'} ne $set{'http_src_path'}){ $buff .= "<tr><td>HTTP_SRC_PATH</td><td>$set{'http_src_path'}</td></tr>\n";}\r
+ $buff .= tablestr('1\83y\81[\83W\82É\95\\8e¦\82·\82é\83t\83@\83C\83\8b\90\94',$set{'pagelog'});\r
+ if($set{'interval'} > 0){ $value = $set{'interval'}.'\95b'; }else{ $value = '\96³'; }\r
+ $buff .= tablestr('\93¯\88êIP\93\8a\8de\8aÔ\8au\95b\90\94\90§\8cÀ',$value);\r
+ if($set{'up_ext'}){ $set{'up_ext'} =~ s/,/ /g; $buff .= tablestr('\93\8a\8de\89Â\94\\8aî\96{\8ag\92£\8eq',$set{'up_ext'}); }\r
+ if($set{'deny_ext'}){ $set{'deny_ext'} =~ s/,/ /g; $buff .= tablestr('\93\8a\8de\8bÖ\8e~\8ag\92£\8eq',$set{'deny_ext'}); }\r
+ if($set{'change_ext'}){ $set{'change_ext'} =~ s/,/ /g; $set{'change_ext'} =~ s/>/>/g; $buff .= tablestr('\8ag\92£\8eq\95Ï\8a·',$set{'change_ext'}); }\r
+\r
+ if($set{'up_all'}){ $buff .= tablestr('\8ew\92è\8aO\8ag\92£\8eq\83A\83b\83v\83\8d\81[\83h\8b\96\89Â','\97L'); if($set{'ext_org'}){ $buff .= tablestr('\8ew\92è\8aO\83t\83@\83C\83\8b\8ag\92£\8eq','\83I\83\8a\83W\83i\83\8b'); }else{ $buff .= tablestr('\8ew\92è\8aO\83t\83@\83C\83\8b\8ag\92£\8eq','bin'); }}\r
+ else{$buff .= tablestr('\8ew\92è\8aO\8ag\92£\8eq\83A\83b\83v\83\8d\81[\83h\8b\96\89Â','\96³');}\r
+\r
+ if($set{'find_crypt'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\88Ã\8d\86\89»\83A\81[\83J\83C\83u\8c\9f\8fo(ZIP)',$value);\r
+ if($set{'binary_compare'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\83o\83C\83i\83\8a\94ä\8ar',$value);\r
+ if($set{'post_flag'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('PostKey\93\8a\8de\90§\8cÀ',$value);\r
+ if($set{'dlkey'}){ if($set{'dlkey'} == 2){$value = '\95K\90{'}else{$value = '\94C\88Ó';}}else{ $value = '\96³';}\r
+ $buff .= tablestr('DLkey',$value);\r
+ if($set{'dummy_html'}){ if($set{'dummy_html'} == 3){$value = 'ALL'}elsif($set{'dummy_html'} == 2){$value = 'DLKey\82Ì\82Ý';}else{$value = '\92Ê\8fí\83t\83@\83C\83\8b\82Ì\82Ý';}}else{ $value = '\96³';}\r
+ $buff .= tablestr('\8cÂ\95ÊHTML\83L\83\83\83b\83V\83\85',$value);\r
+ if($set{'disp_error'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\83\86\81[\83U\83G\83\89\81[\95\\8e¦',$value);\r
+ if($set{'zero_clear'}){ $value = '\97L'; }else{ $value = '\96³';}\r
+ $buff .= tablestr('\8dí\8f\9c\8dÏ\83t\83@\83C\83\8b\83\8a\83X\83g\8e©\93®\8fÁ\8b\8e',$value);\r
+ if($set{'home_url'}){ $buff .= "<tr><td>HOMEURL</td><td>$set{'home_url'}</td></tr>\n";}\r
+\r
+ $buff .= '</table></body></html>';\r
+\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ exit;\r
+}\r
+\r
+sub extfind{\r
+ my $orgname = @_[0];\r
+ my @filename = split(/\./,$orgname);\r
+ my $ext = $filename[$#filename];\r
+ $ext =~ tr/[A-Z]/[a-z]/;\r
+ foreach my $value (split(/,/,$set{'change_ext'})){ my ($src,$dst) = split(/->/,$value); if($ext eq $src){ $ext = $dst; last; }}\r
+ foreach my $value (split(/,/,$set{'deny_ext'})){ if($ext eq $value){ &error(206,$ext); }}\r
+ foreach my $value (split(/,/,$set{'up_ext'})){ if ($ext eq $value) { return $value; } }\r
+ if(length($ext) >= 5 || length($ext) == 0){ $ext = 'bin'; }\r
+ unless ($ext =~ /^[A-Za-z0-9]+$/){ $ext = 'bin'; }\r
+ if($set{'up_all'} && $set{'ext_org'}){ return $ext;}\r
+ elsif($set{'up_all'}){ return 'bin'; }\r
+ return 0;\r
+}\r
+\r
+\r
+sub conv_date{\r
+ my @date = gmtime($_[0] + 9*60*60);\r
+ $date[5] -= 100; $date[4]++;\r
+ if ($date[5] < 10) { $date[5] = "0$date[5]" ; } if ($date[4] < 10) { $date[4] = "0$date[4]" ; }\r
+ if ($date[3] < 10) { $date[3] = "0$date[3]" ; } if ($date[2] < 10) { $date[2] = "0$date[2]" ; }\r
+ if ($date[1] < 10) { $date[1] = "0$date[1]" ; } if ($date[0] < 10) { $date[0] = "0$date[0]" ; }\r
+ my @w = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\r
+ return ("$date[5]/$date[4]/$date[3]($w[$date[6]]),$date[2]:$date[1]:$date[0]");\r
+}\r
+\r
+sub dispsize{\r
+ my $size = $_[0];\r
+ if($size >= 1024*1024*1024*100){ $size = int($size/1024/1024/1024).'GB';}\r
+ elsif($size >= 1024*1024*1024*10){ $size = sprintf("%.1fGB",$size/1024/1024/1024);}\r
+ elsif($size > 1024*1024*1024){ $size = sprintf("%.2fGB",$size/1024/1024/1024);}\r
+ elsif($size >= 1024*1024*100){ $size = int($size/1024/1024).'MB'; }\r
+ elsif($size > 1024*1024){ $size = sprintf("%.1fMB",$size/1024/1024); }\r
+ elsif($size > 1024){ $size = int($size/1024).'KB'; }\r
+ else{ $size = int($size).'B';}\r
+ return $size;\r
+}\r
+\r
+sub makeitem{\r
+ my ($src,$mode) = @_; my ($buff,$check,$target);\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$src);\r
+ if(!$dummy){ $filepre = $set{'file_pre'}; }\r
+ my $orgno = $no;\r
+ $no = sprintf("%04d",$no);\r
+ my $size = 0;\r
+ my $dlpath = 0;\r
+\r
+ if($note =~ /DLpath:(.+)\s/){\r
+ $dlpath = $1;\r
+ $size = dispsize(-s "$set{'src_dir'}$filepre$no.${ext}_$dlpath/$filepre$no.$ext");\r
+ }else{\r
+ $size = dispsize(-s "$set{'src_dir'}$filepre$no.$ext");\r
+ }\r
+\r
+ my $path = $set{'http_src_path'} || $set{'src_dir'};\r
+ if($set{'link_target'}){ $target = qq| target="$set{'link_target'}"|; }\r
+ if($mode eq 'admin'){\r
+ if($dlpath){ $path .= "$filepre$no.${ext}_$dlpath/"; }\r
+ if($addr eq $host){ undef $host; }\r
+ if($in{'checkmode'} eq 'allcheck'){$check = ' checked';}\r
+ $buff = "<tr><td><INPUT TYPE=checkbox NAME=\"admin_delno\" VALUE=\"$no\"$check></td><td><a href=\"$path$filepre$no.$ext\"$target>$filepre$no.$ext</a></td><td>$comment</td><td>$size</td><td>$addr</td><td>$host</td><td>$date</td><td>$note</td><td>$mime</td><td>$orgname</td></tr>\n";\r
+ }else{\r
+ my($d_com,$d_date,$d_size,$d_mime,$d_org);\r
+ if($set{'disp_comment'}){ $d_com = "<td>$comment</td>"; } if($set{'disp_size'}){ $d_size = "<td>$size</td>"; } if($set{'disp_date'}){ $d_date= "<td>$date</td>"; }\r
+ if($set{'disp_mime'}){ $d_mime = "<td>$mime</td>"; } if($set{'disp_orgname'}){ $d_org = "<td>$orgname</td>"; }\r
+ if(-e "$set{'src_dir'}$filepre$no.$ext.html"){$buff = "<tr><td><SCRIPT type=\"text/javascript\" Language=\"JavaScript\"><!--\ndocument.write(\"<a href=\\\"javascript:delnoin($orgno)\\\">$set{'char_delname'}<\\/a>\");\n// --></SCRIPT></td><td><a href=\"$path$filepre$no.$ext.html\"$target>$filepre$no.$ext</a></td>$d_com$d_size$d_date$d_mime$d_org</tr>\n";}\r
+ elsif($dlpath){$buff = "<tr><td><SCRIPT type=\"text/javascript\" Language=\"JavaScript\"><!--\ndocument.write(\"<a href=\\\"javascript:delnoin($orgno)\\\">$set{'char_delname'}<\\/a>\");\n// --></SCRIPT></td><td><a href=\"$set{'base_cgi'}?mode=dl&file=$orgno\">$filepre$no.$ext</a></td>$d_com$d_size$d_date$d_mime$d_org</tr>\n";}\r
+ else{ $buff = "<tr><td><SCRIPT type=\"text/javascript\" Language=\"JavaScript\"><!--\ndocument.write(\"<a href=\\\"javascript:delnoin($orgno)\\\">$set{'char_delname'}<\\/a>\");\n// --></SCRIPT></td><td><a href=\"$path$filepre$no.$ext\"$target>$filepre$no.$ext</a></td>$d_com$d_size$d_date$d_mime$d_org</tr>\n";}\r
+ }\r
+ return $buff;\r
+}\r
+\r
+sub makedummyhtml{\r
+ my ($filename,$com,$file,$orgdlpath,$date,$mime,$orgname,$no) = @_;\r
+ my $buff;\r
+\r
+ if(!$no){\r
+ $buff = "<html><head><title>$filename</title></head><body>";\r
+ $buff .= qq|Download <a href="./$filename">$filename</a>|;\r
+ $buff .= '</body></html>';\r
+ }else{\r
+ $buff = cryptfiledl($com,$file,$orgdlpath,$date,$mime,$orgname,$no);\r
+ }\r
+\r
+ open(OUT,">$set{'src_dir'}$filename.html")||&error(307,"$set{'src_dir'}$filename.html");\r
+ print OUT $buff;\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'src_dir'}$filename.html");\r
+ return 1;\r
+}\r
+\r
+\r
+sub logwrite{\r
+ my @log = @_;\r
+ open(OUT,"+>$set{'log_file'}")||&error(304);\r
+ eval{ flock(OUT, 2);};\r
+ eval{ truncate(OUT, 0);};\r
+ seek(OUT, 0, 0);\r
+ print OUT @log;\r
+ eval{ flock(OUT, 8);};\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},$set{'log_file'});\r
+ return 1;\r
+}\r
+\r
+sub binarycmp{\r
+ my ($src,$dst) = @_;\r
+ return 0 if (-s $src != -s $dst);\r
+ open(SRC,$src)||return 0; open(DST,$dst)||return 0;\r
+ my ($buff,$buff2);\r
+ binmode(SRC); binmode(DST); seek(SRC,0,0); seek(DST,0,0); \r
+ while(read(SRC,$buff,8192)){ read(DST,$buff2,8192); if($buff ne $buff2){ close(SRC); close(DST); return 0; } }\r
+ close(SRC); close(DST);\r
+ return 1;\r
+}\r
+\r
+sub init{\r
+ my $buff;\r
+ if(open(OUT,">$set{'log_file'}")){\r
+ print OUT "0<>0<>0<>1\n";\r
+ close(OUT);\r
+ chmod($set{'per_logfile'},$set{'log_file'});\r
+ }else{\r
+ $buff = "<tr><td>\83\81\83C\83\93\83\8d\83O\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>";\r
+ }\r
+ \r
+ unless (-d "$set{'src_dir'}"){\r
+ if(mkdir("$set{'src_dir'}",$set{'per_dir'})){\r
+ chmod($set{'per_dir'},"$set{'src_dir'}");\r
+ open(OUT,">$set{'src_dir'}index.html");\r
+ close(OUT);\r
+ chmod($set{'per_upfile'},"$set{'src_dir'}index.html");\r
+ }else{\r
+ $buff .= "<tr><td>Source\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>";\r
+ }\r
+ }\r
+\r
+ unless (-d "$set{'html_dir'}"){\r
+ if(mkdir("$set{'html_dir'}",$set{'per_dir'})){\r
+ chmod($set{'per_dir'},"$set{'html_dir'}");\r
+ }else{\r
+ $buff .= "<tr><td>HTML\95Û\91¶\83f\83B\83\8c\83N\83g\83\8a\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>";\r
+ }\r
+ }\r
+\r
+ if($buff){\r
+ $buff .= "<tr><td>\83f\83B\83\8c\83N\83g\83\8a\82É\8f\91\82«\8d\9e\82Ý\8c \8cÀ\82ª\82 \82é\82©\8am\94F\82µ\82Ä\82\82¾\82³\82¢</td></tr>";\r
+ &error_disp($buff,'init');\r
+ }\r
+}\r
+\r
+sub check_postkey{\r
+ my $inputkey = @_[0];\r
+ my @key = split(/,/,$set{'post_key'});\r
+ foreach my $key (@key){ if($inputkey eq $key){ return 1; } }\r
+ return 0;\r
+}\r
+\r
+sub leaddisp{\r
+ my @src = @_;\r
+ my ($str,$count);\r
+ foreach my $value (@src){\r
+ my ($mark,$name,$link); $count++;\r
+ if($count == 1){ $name = 'Upload Info'; $link = 'up'; }\r
+ elsif($count == 2){ $name = 'Error Info'; $link = 'error'; next if(!$set{'error_level'}); }\r
+ elsif($count == 3){ $name = 'Setting Info'; $link = 'set'; }\r
+ if($value){ if($value > 0){ $mark = '\81¥'; }else{ $mark = '\81£'; } $str .= qq|<a href="#$link">${mark}${name}</a> |; }\r
+ else{ $str .= qq|[$name] |; }\r
+ }\r
+ return $str;\r
+}\r
+\r
+sub errorclear{\r
+ open(OUT,">$set{'error_log'}")||return 0;\r
+ eval{ flock(OUT, 2);}; eval{ truncate(OUT, 0);}; seek(OUT, 0, 0); eval{ flock(OUT, 8);}; close(OUT);\r
+ chmod($set{'per_upfile'},$set{'log_file'});\r
+ return 1;\r
+}\r
+\r
+sub tablestr{\r
+ my ($value1,$value2) = @_;\r
+ return ("<tr><td>$value1</td><td>$value2</td></tr>\n");\r
+}\r
+\r
+sub globfile{\r
+ my ($src_dir,$filename) = @_;\r
+ opendir(DIR,$src_dir)||return 0; my @dir = readdir(DIR); closedir(DIR);\r
+ my @new = (); foreach my $value (@dir){ push(@new,"$src_dir$value") if($value =~ /$filename/ && !(-d "$src_dir$value")); }\r
+ return @new;\r
+}\r
+\r
+sub globdir{\r
+ my ($src_dir,$dir) = @_;\r
+ opendir(DIR,$src_dir)||return 0; my @dir = readdir(DIR); closedir(DIR);\r
+ my @new = (); foreach my $value (@dir){ if($value eq '.' ||$value eq '..' ){ next; } push(@new,"$src_dir$value") if($value =~ /$dir/ && (-d "$src_dir$value")); }\r
+ return @new;\r
+}\r
+\r
+sub error_disp{\r
+ my ($message,$mode) = @_;\r
+ my $url;\r
+ if($mode eq 'init'){ $url = qq|<a href="$set{'base_cgi'}">[\83\8a\83\8d\81[\83h]</a>|; }else{ $url = qq|<a href="$set{'http_html_path'}$set{'base_html'}">[\96ß\82é]</a>|; }\r
+ my $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+<div align="center">\r
+<table summary="error">\r
+$message\r
+<tr><td></td></tr>\r
+<tr><td><div align="center">$url</div></td></tr>\r
+</table>\r
+<br><br>\r
+<table summary="info">\r
+<tr>\r
+<td>DATE</td><td>$in{'date'}</td></tr>\r
+<tr><td>ADDR</td><td>$in{'addr'}</td></tr>\r
+<tr><td>HOST</td><td>$in{'host'}</td></tr>\r
+</table>\r
+</div>\r
+</body></html>\r
+EOM\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ exit;\r
+}\r
+\r
+sub error{\r
+ my ($no,$note) = @_;\r
+ if (length($note) > 64) { $note = substr($note,0,64).'...'; }\r
+ $note =~ s/&/&/g; $note =~ s/\"/"/g; $note =~ s/</</g; $note =~ s/>/>/g; $note =~ s/\r//g; $note =~ s/\n//g; $note =~ s/\t//g; $note =~ s/\0//g;\r
+ my ($message,$dispmsg,$flag);\r
+ \r
+ if($no == 98){ $message = ""; }\r
+ elsif($no == 99){ $message = "UpFile\82È\82µ"; }\r
+ elsif($no == 101){ $message = "\93\8a\8de\8bÖ\8e~HOST"; }\r
+ elsif($no == 106){ $flag = 1; $message = "POST\83T\83C\83Y\92´\89ß"; $note = dispsize($note); $dispmsg= '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\83A\83b\83v\83\8d\81[\83h\83t\83@\83C\83\8b('.$note.')\82Í \8dÅ\91å\97e\97Ê\90Ý\92è('.dispsize($set{'max_size'}*1024).')\82ð\89z\82¦\82Ä\82¢\82Ü\82·</td></tr>';}\r
+ elsif($no == 107){ $flag = 1; $message = "POST\83T\83C\83Y\89ß\8f¬"; $note = dispsize($note); $dispmsg= '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\83A\83b\83v\83\8d\81[\83h\83t\83@\83C\83\8b('.$note.')\82Í \8dÅ\8f¬\97e\97Ê\90Ý\92è('.dispsize($set{'min_size'}*1024).')\96¢\96\9e\82Å\82·</td></tr>';}\r
+ elsif($no == 108){ $flag = 1; $message = "POST\83f\81[\83^\95s\8a®\91S"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>POST\83f\81[\83^\82ª\95s\8a®\91S\82Å\82·</td></tr>';}\r
+ elsif($no == 109){ $flag = 1; $message = "POSTKey\95s\88ê\92v"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>POSTKey\82ª\88ê\92v\82µ\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 202){ $flag = 1; $message = "\8ag\92£\8eq\8d\87\82í\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\93\8a\8de\82Å\82«\82é\8ag\92£\8eq\82Í'.$set{'up_ext'}.'\82Å\82·</td></tr>';}\r
+ elsif($no == 203){ $flag = 1; $message = "\93\8a\8de\91\81\82·\82¬"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\93¯\88êIP\83A\83h\83\8c\83X\82©\82ç'.$set{'interval'}.'\95b\88È\93à\82É\8dÄ\93\8a\8de\82Å\82«\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 204){ $flag = 1; $message = "\88ê\8e\9e\83t\83@\83C\83\8b\8f\91\82«\8d\9e\82ß\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\88ê\8e\9e\83t\83@\83C\83\8b\82Ì\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>';}\r
+ elsif($no == 205){ $flag = 1; $message = "\93¯\88ê\83t\83@\83C\83\8b\91¶\8dÝ"; $note =~ /([^\/]+)$/; my $filename = $1; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\93¯\88ê\83t\83@\83C\83\8b\82ª '.$filename.' \82É\91¶\8dÝ\82µ\82Ü\82·</td></tr>';}\r
+ elsif($no == 206){ $flag = 1; $message = "\8bÖ\8e~\8ag\92£\8eq"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\8ag\92£\8eq '.$note.' \82Í\83A\83b\83v\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 303){ $flag = 1; $message = "\83\8d\83O\83t\83@\83C\83\8b\82É\93Ç\82Ý\8d\9e\82ß\82¸"; $dispmsg = '<tr><td>\83\81\83C\83\93\83\8d\83O\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>';}\r
+ elsif($no == 304){ $flag = 1; $message = "\83\8d\83O\83t\83@\83C\83\8b\82É\8f\91\82«\8d\9e\82ß\82¸"; $dispmsg = '<tr><td>\83\81\83C\83\93\83\8d\83O\82Ì\8f\91\82«\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>';}\r
+ elsif($no == 306){ $message = "\83t\83@\83C\83\8b\83\8a\83X\83gHTML\8f\91\82«\8d\9e\82ß\82¸";}\r
+ elsif($no == 307){ $message = "\83t\83@\83C\83\8bHTML\83t\83@\83C\83\8b\8f\91\82«\8d\9e\82ß\82¸";}\r
+ elsif($no == 401){ $flag = 1; $message = "\8dí\8f\9cNo.\8c\9f\8fo\82Å\82«\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$note.' \82©\82ç\8dí\8f\9cNo.\82ð\8c\9f\8fo\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$set{'file_pre'}.'0774.zip\82Ì\8fê\8d\87 No.\82É\82Í 774 \82ð\93ü\97Í\82µ\82Ü\82·</td></tr>';}\r
+ elsif($no == 402){ $flag = 1; $note = sprintf("%04d",int($note)); $message = "\8dí\8f\9cNo.\91¶\8dÝ\82¹\82¸"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$set{'file_pre'}.$note.'.*** \82Í\83\81\83C\83\93\83\8d\83O\82É\91¶\8dÝ\82µ\82Ü\82¹\82ñ</td></tr>';}\r
+ elsif($no == 403){ $flag = 1; $message = "\8dí\8f\9c\83A\83N\83Z\83X\8b\91\94Û"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>\83t\83@\83C\83\8b\8dí\8f\9c\8fð\8c\8f\82Í\96\9e\82½\82µ\82Ä\82¢\82Ü\82·\82ª '.$note.' \82Ì\83t\83@\83C\83\8b\82Ì\8dí\8f\9c\82ª\8b\91\94Û\82³\82ê\82Ü\82µ\82½</td></tr><tr><td>\83A\83N\83Z\83X\82ª\89ß\8fè\82È\8fê\8d\87\93\99\82Í\8e\9e\8aÔ\82ð\92u\82¢\82Ä\8dÄ\91\80\8dì\82·\82é\82Æ\8dí\8f\9c\82Å\82«\82é\82±\82Æ\82ª\82 \82è\82Ü\82·</td></tr>';}\r
+ elsif($no == 404){ $flag = 1; $message = "\8dí\8f\9cKey\95s\88ê\92v"; $dispmsg = '<tr><td>\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$note.' \8dí\8f\9cKey\82ª\88ê\92v\82µ\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr>';}\r
+\r
+ elsif($no == 51){ $flag = 1; $message = "[DLMode] No.\8c©\82Â\82©\82ç\82¸"; $dispmsg = '<tr><td>[DLMode] \83t\83@\83C\83\8b\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$note.' \82©\82ç\83t\83@\83C\83\8bNo.\82ð\8c\9f\8fo\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr>'; }\r
+ elsif($no == 52){ $flag = 1; $message = "[DLMode] File\8c©\82Â\82©\82ç\82¸"; $dispmsg = '<tr><td>[DLMode] \83t\83@\83C\83\8b\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr><tr><td>'.$set{'file_pre'}.$note.'.*** \82Í\83\81\83C\83\93\83\8d\83O\82É\91¶\8dÝ\82µ\82Ü\82¹\82ñ</td></tr>'; }\r
+ elsif($no == 53){ $flag = 1; $message = "[DLMode] DLkey\96¢\90Ý\92è"; $dispmsg = '<tr><td>[DLMode] orgDLkeyError</td></tr><tr><td>'.$note.' DLKey\82ª\96¢\90Ý\92è\82Å\82·</td></tr>'; }\r
+ elsif($no == 54){ $flag = 1; $message = "[DLMode] DLkey\95s\88ê\92v"; $dispmsg = '<tr><td>[DLMode] orgDLkeyError</td></tr><tr><td>'.$note.' DLKey\82ª\88ê\92v\82µ\82Ü\82¹\82ñ\82Å\82µ\82½</td></tr>'; }\r
+ elsif($no == 55){ $flag = 1; $message = "[DLMode] File Oepn Error"; $dispmsg = '<tr><td>[DLMode] Open Error</td></tr><tr><td>'.$note.' \83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½</td></tr>'; }\r
+ elsif($no == 56){ $flag = 1; $message = "[DLMode] File Not Found"; $dispmsg = '<tr><td>[DLMode] Not Found</td></tr><tr><td>'.$note.' \83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ</td></tr>'; }\r
+\r
+ elsif($no == 61){ $flag = 1; $message = "DLkey\96¢\90Ý\92è"; $dispmsg = '<tr><td>DLKey\82ª\96¢\90Ý\92è\82Å\82·</td></tr>'; }\r
+\r
+ unlink($in{'tmpfile'});\r
+ if($note){$message .= ' ';}\r
+ if($set{'error_level'} && $no > 100){\r
+ unless(-e $set{'error_log'}){\r
+ open(OUT,">$set{'error_log'}");\r
+ close(OUT);\r
+ chmod($set{'per_logfile'},$set{'error_log'});\r
+ }\r
+ if($set{'error_size'} && ((-s $set{'error_log'}) > $set{'error_size'} * 1024)){\r
+ my $err_bkup = "$set{'error_log'}.bak.cgi";\r
+ unlink($err_bkup);\r
+ rename($set{'error_log'},$err_bkup);\r
+ open(OUT,">$set{'error_log'}");\r
+ close(OUT);\r
+ chmod($set{'per_logfile'},$set{'error_log'});\r
+ }\r
+ open(OUT,">>$set{'error_log'}");\r
+ print OUT "$in{'date'}<>$no<>$message$note<>$in{'addr'}<>$in{'host'}<>1\n";\r
+ close(OUT);\r
+ }\r
+ &error_disp($dispmsg) if($flag && $set{'disp_error'});\r
+ &quit();\r
+}\r
+\r
+sub dlfile{\r
+ my $msg;\r
+ my ($orgdlkey,$orgdlpath);\r
+ my ($dlext,$dlfilepre);\r
+ my ($dl_date,$dl_comment,$dl_size,$dl_mime,,$dl_orgname);\r
+ my $dlno = 0;\r
+ my $findflag;\r
+\r
+ open(IN,$set{'log_file'})||&error(303);\r
+ my @log = <IN>;\r
+ close(IN);\r
+ shift(@log);\r
+\r
+ if($in{'file'} =~ /(\d+)/){ $dlno = $1; }\r
+ if($dlno == 0) { &error(51,$in{'file'}); }\r
+\r
+ foreach my $value (@log){\r
+ my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value);\r
+ my @note = split(/,/,$note);\r
+ if(int($dlno) == $no){\r
+ $dl_comment = $comment;\r
+ $dl_mime = $mime;\r
+ $dl_date = $date;\r
+ $dl_orgname = $orgname;\r
+ $dlext = $ext;\r
+ $dlfilepre = $filepre;\r
+ foreach my $tmpnote (@note){\r
+ if($tmpnote =~ /\!--\sDLKey:(.+)\s--.*\!--\sDLpath:(.+)\s--/){\r
+ $orgdlkey = $1;\r
+ $orgdlpath = $2;\r
+ last;\r
+ }\r
+ }\r
+ $findflag = 1;\r
+ last;\r
+ }\r
+ }\r
+\r
+ my $dlfile = $dlfilepre.sprintf("%04d",int($dlno)).'.'.$dlext;\r
+ if(!(-e "$set{'src_dir'}${dlfile}_$orgdlpath/$dlfile")){ &error(56,"$dlfile----$set{'src_dir'}${dlfile}_$orgdlpath/$dlfile"); }\r
+\r
+ if($in{'dlkey'}){\r
+ my $dlsalt = substr($orgdlkey,0,2);\r
+ my $dlkey = crypt($in{'dlkey'},$dlsalt);\r
+\r
+ if($findflag == 0){ &error(52,$dlfile); }\r
+ elsif(!$orgdlkey){ &error(53,$dlfile); }\r
+ elsif($orgdlkey ne $dlkey && $set{'admin_pass'} ne $in{'dlkey'}){ &error(54,$dlfile); }\r
+ #print "Location: $set{'http_src_path'}${dlfile}_$orgdlpath/$dlfile\n\n";\r
+ my $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}\r
+<META HTTP-EQUIV="Refresh" CONTENT="1;URL=$set{'http_src_path'}${dlfile}_$orgdlpath/$dlfile">\r
+</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+<div align="center">\r
+<br>\r
+<table summary="dlfrom">\r
+<tr><td>\94ò\82Î\82È\82¢\8fê\8d\87\82Í <a href="$set{'http_src_path'}${dlfile}_$orgdlpath/$dlfile">\82±\82¿\82ç</a> \82©\82ç</td></tr>\r
+</table>\r
+</div>\r
+</body></html>\r
+EOM\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ }else{\r
+ my $buff = cryptfiledl($dl_comment,$dlfile,$orgdlpath,$dl_date,$dl_mime,$dl_orgname,$dlno);\r
+ print "Content-type: text/html\n\n";\r
+ print $buff;\r
+ }\r
+ exit;\r
+}\r
+\r
+sub cryptfiledl{\r
+ my($com,$file,$orgdlpath,$date,$mime,$orgname,$no) = @_;\r
+ my($d_com,$d_date,$d_size,$d_mime,$d_org);\r
+\r
+ if($set{'disp_comment'}){ $d_com = "<tr><td>COMMENT</td><td>$com</td></td>"; } if($set{'disp_size'}){ $d_size = "<tr><td>SIZE</td><td>".dispsize(-s "$set{'src_dir'}${file}_$orgdlpath/$file")." (".(-s "$set{'src_dir'}${file}_$orgdlpath/$file")."bytes)"."</td></tr>"; } if($set{'disp_date'}){ $d_date= "<tr><td>DATE</td><td>$date</td></tr>"; }\r
+ if($set{'disp_mime'}){ $d_mime = "<tr><td>ORGMIME</td><td>$mime</td></tr>"; } if($set{'disp_orgname'}){ $d_org = "<tr><td>ORGNAME</td><td>$orgname</td></tr>"; }\r
+\r
+ my $buff =<<"EOM";\r
+$set{'html_head'}$set{'html_css'}</HEAD>\r
+<body bgcolor="#ffffff" text="#000000" LINK="#6060FF" VLINK="#6060FF" ALINK="#6060FF">\r
+<div align="center">\r
+<br>\r
+$file \82É\82ÍDLKey\82ª\90Ý\92è\82³\82ê\82Ä\82¢\82Ü\82·\r
+<table summary="dlform">\r
+<tr><td></td></tr>\r
+<FORM METHOD=POST ACTION="$set{'base_cgi'}" name="DL">\r
+<tr><td>\r
+<input type=hidden name=file value=$no>\r
+<input type=hidden name=jcode value="\8a¿\8e\9a">\r
+<input type=hidden name=mode value=dl></td></tr>\r
+$d_com$d_date$d_size$d_mime$d_org\r
+<tr><td>DLKey:<input type=text size=8 name="dlkey"></td></tr>\r
+<tr><td><input type=submit value="DownLoad"></td></tr>\r
+</FORM>\r
+</table>\r
+</div>\r
+</body></html>\r
+EOM\r
+\r
+ return $buff;\r
+}
\ No newline at end of file