¤¤¤Ä¤â¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£¤ß¤Î¤ë¤Ç¤¹¡£ > ¡Öpasswd(SYSTEM): ¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È does not exist ¥¢¥¯¥»¥¹¸¢¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£¡×¤Î·ï¡£ ¥ê¥ó¥¯Åù¡¢¸µ¤ËÌ᤹Á°¤Ë¡¢"passwd"¥³¥Þ¥ó¥ÉÉü³è¤·¤Þ¤·¤¿¡£¸½ºß¡¢°Ê²¼¤Î¾õÂ֤Ǥ¹¡£ 313666 -r-sr-sr-x 3 root 96392 Feb 24 1999 nispasswd* 313666 -r-sr-sr-x 3 root 96392 Feb 24 1999 passwd* 313666 -r-sr-sr-x 3 root 96392 Feb 24 1999 yppasswd* ¤¿¤À¡¢¸¶°ø¤Ï¤Þ¤À²ò¤ê¤Þ¤»¤ó¡£truss¤¬»È¤¨¤¿¤Î¤Ç¡¢¸«¤Æ¤ß¤Æ¤Ï¤¤¤ë¤Î¤Ç¤¹¤¬¡¢ÉÔÌÀ¤Ç¤¹¡£ ¤³¤³¤Ç¼ÁÌä¤Ê¤Î¤Ç¤¹¤¬¡¢"root"°Ê³°¤Î¥æ¡¼¥¶¤Ç¤â¡¢¥³¥Þ¥ó¥É½ñ´¹¡Ê¤â¤·¤¯¤Ï¥¢¥¯¥»¥¹¸¢ÉÕÍ¿¡Ë¤Ï ²Äǽ¤Ç¤·¤ç¤¦¤«¡©»ä¤É¤â¤Î¥µ¡¼¥Ð¥»¥¥å¥ê¥Æ¥£¾å¤ËÌäÂ꤬¤¢¤ë¤è¤¦¤Êµ¤¤¬¤·¤Æ¤Ê¤ê¤Þ¤»¤ó¡£ |
> truss¤¬»È¤¨¤¿¤Î¤Ç ¤Ê¤ë¤Û¤É¡£root ¤Ê¤é»È¤¨¤ë¤ó¤Ç¤¹¤Í¡£ > "root"°Ê³°¤Î¥æ¡¼¥¶¤Ç¤â¡¢¥³¥Þ¥ó¥É½ñ´¹¡Ê¤â¤·¤¯¤Ï > ¥¢¥¯¥»¥¹¸¢ÉÕÍ¿¡Ë¤Ï²Äǽ¤Ç¤·¤ç¤¦¤«¡© root °Ê³°¤Î°ìÈ̥桼¥¶¤¬ /usr/bin/passwd ¤ò½ñ¤´¹¤¨¤¿¤ê¡¢ ¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤òÊѹ¹¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¤«¡¢¤È¤¤¤¦¤³¤È¤Ç¤¹¤«? ¤â¤Á¤í¤óÉáÄ̤ÏÉÔ²Äǽ¤Ç¤¹¤¬¡¢¥»¥¥å¥ê¥Æ¥£¥Û¡¼¥ë¤¬¤¢¤ë¾ì¹ç¤Ï ¤½¤Î¸Â¤ê¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¡Öpasswd ¤¬¸ú¤«¤Ê¤¯¤Ê¤Ã¤¿¡á¥¯¥é¥Ã¥¯¡×¤È¤¤¤¦¤ï¤±¤Ç¤â ¤Ê¤¤¤Î¤Ç¡¢¤·¤Ð¤é¤¯ÍͻҤò¸«¤Æ¤Ï¤É¤¦¤Ç¤·¤ç¤¦¡£ |
>68user 1999/11/17(¿å) 18:50 >> CGI¤¬¡Ö¼«Ê¬ ¥°¥ë¡¼¥× ¾¿Í¡×¤Î¡Ö¾¿Í¡×¤Î¸¢¸Â¤ÇÆ°¤¯¤ó¤Ç¤¹¡£ >Àµ³Î¤Ë¤Ï¡¢nobody ¸¢¸Â¤ÇÆ°¤¯¡¢¤Ç¤·¤ç¤¦¤Í¡£ nobody¸¢¸Â¤È¤¤¤¦¤ó¤Ç¤¹¤«¡£¡£ ÃΤé¤Ê¤«¤Ã¤¿(^^; >> ¤È¤³¤í¤¬CGI¤¬Â¾¿Í¤Î¸¢¸Â¤ÇÆ°¤¯¤Î¤Ï¤Þ¤º¤¤¤é¤·¤¤¤Î¤Ç >¤³¤ì¤Ï´ÉÍý¼Ô¤ÎÊý¿Ë¤Ë¤è¤ê¤Þ¤¹¡£ ¤à¤à¡¼ ¤Ê¤ë¤Û¤É¡£ ¥±¡¼¥¹¥Ð¥¤¥±¡¼¥¹¤È¤«¤¤¤¦¤ä¤Ä¤Ç¤¹¤«¡£ >¤Ç¡¢·ëÏÀ¤È¤·¤Æ¤Ï >¡¡http://japache.infoscience.co.jp/japanese_1_3/manual/suexec.html >¤ò»È¤¤¤Þ¤¹¡£¤³¤ì¤ò»È¤¦¤È CGI/SSI ¤È¤â¤Ë³Æ¥æ¡¼¥¶¸¢¸Â¤ÇÆ°¤¤Þ¤¹¡£ > >Ĺ¡¹¤È¸ì¤Ã¤Æ¤ª¤¤¤Æ¥¢¥ì¤Ç¤¹¤¬¡¢ËÍ¤Ï suExec ¤òÀßÄꤷ¤¿¤³¤È¤Ï¤Ê¤¤¤Ç¤¹¡£ >¾å¤Î¥ê¥ó¥¯¤Ë¤Ï¥³¥ó¥Ñ¥¤¥ë¤¬¤É¤¦¤³¤¦¤Ã¤Æ½ñ¤¤¤Æ¤¢¤ê¤Þ¤¹¤¬¡¢É¬ÍפʤΤ«¤Ê¤¡¡£ >¥½¡¼¥¹»ý¤Ã¤Æ¤¤Æ >¡¡% ./configure --enable-suexec >¤È¤¹¤ë¤Î¤Ç¤Ï¥À¥á¤Ê¤ó¤Ç¤·¤ç¤¦¤«¡£¤¤¤í¤¤¤í»î¤·¤Æ¤ß¤Æ²¼¤µ¤¤¡£ suEXEC¡£¤³¤ì¤Ç¤¹¤« Apache¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤È¤È¤â¤Ë»î¤·¤Æ¤ß¤Þ¤¹¡£ ¾å¼ê¤¯¤¤¤Ã¤¿¤éÊó¹ð¤Ë»²¤ê¤¿¤¤¤È»×¤¤¤Þ¤¹¡£ >¤³¤ì¤È¤ÏÊ̤ˡ¢cgiwrap ¤È¤¤¤¦¤Î¤ò»È¤¦ÊýË¡¤â¤¢¤ê¤Þ¤¹¡£ >¡¡ftp://ftp.win.or.jp/pub/network/www/cgiwrap > >¤³¤ì¤À¤È CGI ¤À¤±³Æ¥æ¡¼¥¶¸¢¸Â¤ÇÆ°¤¤Þ¤¹¡£¥³¥ó¥Ñ¥¤¥ë¤·¤Æ >/usr/local/apache/cgi-bin/cgiwrap ¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¡¢ >¡¡http://localhost/cgi-bin/cgiwrap/~username/cginame.cgi >¤È¤¹¤ë¤È¡¢/~username/cginame.cgi ¤¬ username ¤Î¸¢¸Â¤ÇÆ°¤¤Þ¤¹¡£ >httpd.conf ¤Ë >¡¡AliasMatch "^/([^/]+)/cgi-bin/(.*)$" "/cgi-bin/cgiwrap/$1/$2" >¤Ê¤É¤È½ñ¤¤¤Æ¤ª¤¯¤È¡¢/~username/cgi-bin/hoge.cgi ¤Ë¥¢¥¯¥»¥¹¤·¤¿¤À¤±¤Ç >³Æ¥æ¡¼¥¶¸¢¸Â¤ÇÆ°¤«¤¹¤³¤È¤â¤Ç¤¤Þ¤¹¤Í¡£ suEXEC¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë¼ºÇÔ¤·¤¿¤é¤³¤Á¤é¤â»î¤·¤Æ¤ß¤Þ¤¹¡£ |
> http://japache.infoscience.co.jp/japanese_1_3/manual/suexec.html ¤ä¤Ã¤Ñ¤ê¤³¤ì¤Ã¤Æ¸Å¤¤¤Î¤Í¡£±Ñ¸ìÈǤÎÊý¤ò¸«¤Æ²¼¤µ¤¤¡£ http://japache.infoscience.co.jp/apache/docs/suexec.html ¤¦¤Á¤Ç¤â apache1.3.9 ¤òÆþ¤ì¤Æ¤ß¤Þ¤·¤¿¤¬¡¢configure,make,make install ¤Ç ´Êñ¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤ (configure¤Î¥ª¥×¥·¥ç¥ó¤òÉÕ¤±¤¿¤ê¡¢httpd.conf ¤Î ¼êľ¤·¤Ï¤·¤Þ¤·¤¿¤¬)¡¢suExec ¤â¤¦¤Þ¤¯Æ°¤¤Þ¤·¤¿¡£ > nobody¸¢¸Â¤È¤¤¤¦¤ó¤Ç¤¹¤«¡£¡£ ¤ï¤«¤Ã¤Æ¤ª¤é¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬Ç°¤Î¤¿¤á½ñ¤¤¤Æ¤ª¤¤Þ¤¹¤È¡¢Â¾¿Í¤Î¸¢¸Â¤Ç Æ°¤¯¤³¤È¤ò¡Önobody ¸¢¸Â¡×¤È¸Æ¤Ö¤Î¤Ç¤Ï¤Ê¤¤¤Ç¤¹¡£¼ÂºÝ¤Ë nobody ¤È¤¤¤¦ ¥¢¥«¥¦¥ó¥È¤Ï¼Âºß¤·¤Æ¤ª¤ê (see /etc/passwd)¡¢¤½¤Î¸¢¸Â¤Ç httpd ¤ÏÆ°¤¤¤Æ¤¤¤ë¡¢ ¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ ¤Ê¤ó¤Ç nobody ¤ÇÆ°¤¯¤«¤È¤¤¤¦¤È¡¢httpd.conf ¤Ë User nobody ¤È½ñ¤¤¤Æ¤¢¤ë¤«¤é¤Ç¤¹¡£ |
¤Á¤ç¤Ã¤È»þ´Ö¤¬¼è¤ì¤Ê¤¯¤Æ ÊÖ»öÃÙ¤ì¤Þ¤·¤¿¡£(_ _) apache1.3.9¤ÏÉáÄ̤Ë? configure,make,make install ¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤¤Þ¤·¤¿¡£ suEXEC¤â̵»ö¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤¤Þ¤·¤¿¡£ CGI¤Ê¤É¤¬³Æ¥æ¡¼¥¶¡¼¸¢¸Â¤ÇÆ°¤¤¤Æ¤Þ¤·¤¿¡£ ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£ >¤ï¤«¤Ã¤Æ¤ª¤é¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬Ç°¤Î¤¿¤á½ñ¤¤¤Æ¤ª¤¤Þ¤¹¤È¡¢Â¾¿Í¤Î¸¢¸Â¤Ç >Æ°¤¯¤³¤È¤ò¡Önobody ¸¢¸Â¡×¤È¸Æ¤Ö¤Î¤Ç¤Ï¤Ê¤¤¤Ç¤¹¡£¼ÂºÝ¤Ë nobody ¤È¤¤¤¦ >¥¢¥«¥¦¥ó¥È¤Ï¼Âºß¤·¤Æ¤ª¤ê (see /etc/passwd)¡¢¤½¤Î¸¢¸Â¤Ç httpd ¤ÏÆ°¤¤¤Æ¤¤¤ë¡¢ >¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ ¤¨¤§¡£¤½¤ÎÊÕ¤ÏÂç¾æÉפǤ¹¡£ |
¥¸¥§¥À¥¤¥Ê¥¤¥È¡¢£¹Ì̤Υ·¡¼¥¯¥ì¥Ã¥È¥¨¥ê¥¢Ã¯¤«¶µ¤¨¤Æ²¼¤µ¤¤¡£ |
¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°¤Î´ðÁÃÃμ±¡¢À¨¤¤¤Ç¤¹¡£ÁÇÀ²¤é¤·¤¤¤Ç¤¹¡£ »ä¤Î¤è¤¦¤Ê̵ÃΤˤǤâ¤Ç¤¤Æ¤·¤Þ¤Ã¤Æ¤Á¤ç¤Ã¤ÈÉݤ¤¤Ç¤¹¡£ ¡Ê¤Û¤È¤ó¤ÉÀڤꎤê¾õÂ֤ʤó¤Ç¤¹¤¬¡¦¡¦¡Ë FTP¤Î¹à¤Ë¤Ä¤¤¤Æ¤Ê¤ó¤Ç¤¹¤¬ ¡Ö# FTP¥µ¡¼¥Ð¤Ë¡¢»Ò¥×¥í¥»¥¹¤¬ÂԤäƤ¤¤ëIP¥¢¥É¥ì¥¹¤È¥Ý¡¼¥È¤Î¾ðÊó¤òÅϤ¹¡× ¤È¤¤¤¦¤Î¤¬¤¢¤ê¤Þ¤¹¤è¤Í¡£ftptras.pl¤Ç½é¤á¤Æ»Ò¥×¥í¥»¥¹¤Ï½Ð¤Æ¤¯¤ë¤Î¤Ç¤Ï¡£ ¤½¤ì°ÊÁ°¤ÎÎ㼨¤Ë¤Ï¡Ö»Ò¥×¥í¥»¥¹¡×¤È¤¤¤¦¥³¥á¥ó¥È¤ÏɬÍ×̵¤¤¤Î¤Ç¤Ï¡£ ¡Ê¤Á¤ç¤Ã¤È¤³¤³¤ÇǺ¤ó¤Ç¤·¤Þ¤Ã¤¿¤Î¤Ç¡¦¡¦¡¦¡£¡Ë |
> ¤½¤ì°ÊÁ°¤ÎÎ㼨¤Ë¤Ï¡Ö»Ò¥×¥í¥»¥¹¡×¤È¤¤¤¦¥³¥á¥ó¥È¤ÏɬÍ×̵¤¤¤Î¤Ç¤Ï¡£ ¤É¤â¤É¤â¡£¥ß¥¹¤Ç¤¹¤Í¡£Ä¾¤·¤Æ¤ª¤¤Þ¤¹¡£ ºÇ½é¤Ï fork ¤·¤Ê¤¤¤È ftp ¥¯¥é¥¤¥¢¥ó¥È¤Ïºî¤ì¤Ê¤¤¤È»×¤Ã¤Æ¤Þ¤·¤¿¡£ ·ë¶É¤½¤ì¤Ï¸í²ò¤À¤Ã¤¿¤Î¤Ç½ñ¤Ä¾¤·¤¿¤Î¤Ç¤¹¤¬¡¢¥³¥á¥ó¥È¤Î½¤Àµ¤ò ˺¤ì¤Æ¤¿¤è¤¦¤Ç¤¹¡£ # ftptrans ¤Ç fork ¤·¤Æ¤ë¤Î¤â²ø¤·¤¤¡£¤Û¤ó¤È¤Ë1¥×¥í¥»¥¹¤Ç # ¤Ç¤¤Ê¤¤¤Î¤«¤Ê¤¡? |
¤¦¡Á¡Á¤ó¡£ ¥í¡¼¥«¥ë¤Î¥Û¥¹¥È̾¤òÆÀ¤ë¤Ë¤Ï¤É¤¦¤¹¤ì¤ÐÎɤ¤¤Ç¤¹¤«¡© ³«¤¤¤¿SOCKET¤«¤é¼ê¤ËÆþ¤ì¤ë°Ê³°¤ËŬÅö¤ÊÊýË¡¤Æ̵¤¤¤Ç¤¹¤«¤·¤é¤ó¡£ ¥·¥§¥ë¥³¥Þ¥ó¥É¤Ï»È¤ï¤º¤Ëperl¤Î´Ø¿ô¤À¤±¤Ç¡£ RFC¤ÎÆüËܸìÌõ¤Ã¤Æ¤Û¤ó¤ÈÊØÍø¤Ç¤¹¤è¤Í¡£´¶¼Õ¤·¤Ê¤¬¤éÆɤó¤Ç¤Þ¤¹¡£ PASV¤ÎÊÖ»ö¤Æ227¤À¤±¤ß¤¿¤¤¤Ç¤¹¤Í¡£¤¢¤È¤ÏÁ´Éô¥¨¥é¡¼¤ß¤¿¤¤¡£ ¤½¤ì¤È(x,x,x,x,x,x)¤Î¡Ö³ç¸Ì¡×¤¬ÉÕ¤«¤Ê¤¤¾ì¹ç¤â¤¢¤ë¤è¤¦¤Ç¤¹¤Í¡£ Àµµ¬É½¸½¤â¤à¤Ä¤«¤·¤¤¤±¤É´èÄ¥¤Ã¤Æ¤ë¤È¤³¤ª¤í¤Ç¤¹¡£ |
> ¥í¡¼¥«¥ë¤Î¥Û¥¹¥È̾¤òÆÀ¤ë¤Ë¤Ï¤É¤¦¤¹¤ì¤ÐÎɤ¤¤Ç¤¹¤«¡© »î¤·¤Æ¤Þ¤»¤ó¤¬¡¢¤È¤ê¤¢¤¨¤º http://www.kt.rim.or.jp/~ksk/sock-faq/unix-socket-faq-ja-2.html#ss2.24 http://www.kt.rim.or.jp/%7ekbk/perl5.005/perlfaq9.html#How_do_I_find_out_my_hostname_do ¤³¤³¤é¤¢¤¿¤ê¤Ç¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¤Ç¤¹¤«? > ¤¢¤È¤ÏÁ´Éô¥¨¥é¡¼¤ß¤¿¤¤¡£ > ¤½¤ì¤È(x,x,x,x,x,x)¤Î¡Ö³ç¸Ì¡×¤¬ÉÕ¤«¤Ê¤¤¾ì¹ç¤â¤¢¤ë¤è¤¦¤Ç¤¹¤Í¡£ ¤Ê¤ë¤Û¤É¡£¤È¤³¤í¤Ç¡¢¤³¡¼¤æ¡¼¤Î¤¬¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥à¤Î¥ä¤Ê ¤È¤³¤í¤Ç¤¹¤è¤Í¡£Áê¼ê¤¬¤¢¤Ã¤Æ¤Î¤â¤Î¤À¤«¤é¡Ö¤³¤ì¤ÇÀµ¤·¤¤¤«¤É¤¦¤«¡× ¡Ö´°àú¤«¤É¤¦¤«¡×¤¬¤ï¤«¤é¤Ê¤¤¤È¤¤¤¦¡£ ¤¢¤È¡¢¿¿ÌÌÌܤ˺î¤Ã¤ÆÇÛÉۤǤ⤹¤ë¤Ä¤â¤ê¤Ê¤é http://hp.vector.co.jp/authors/VA002682/rfc1123j.htm ¤âÆɤó¤Ç²¼¤µ¤¤ (¤â¤¦Æɤó¤Ç¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬)¡£ # ¤¢¤È¡¢data-connection ¤Î peer-port ¤¬ 20(ftp-data) ¤«¤É¤¦¤«¤Î # ¥Á¥§¥Ã¥¯¤â¤Í¡£ |
68USER¤µ¤ó¤ÎÃæ¤ÇºÇ¤âÆÀ°Õ¤Ê¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Ï¤Ê¤ó¤Ç¤¹¤«? |
elisp ¤Ç¤¹¡£ ¡Ä¥¦¥½¤Ç¤¹¡£perl ¤« C ¤Ç¤¹¤±¤É¡¢¿Í¤Ë¸Ø¤ì¤ë¤Û¤É¤Î ¥ì¥Ù¥ë¤¸¤ã¤Ê¤¤¤Ç¤¹¡£Àº¿Ê¤»¤Í¤Ð¡£ |
¿§¡¹¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£ > 227¤À¤±¤ß¤¿¤¤ ¤¿¤·¤«¤Ë°ìÈÖ¾å¤Î·å¤À¤±¸«¤í¤Ã¤ÆRFC¤Ë½ñ¤¤¤Æ¤¢¤ê¤Þ¤·¤¿¡£ perl¤Æ²¶¤Î¤è¤¦¤Ê̵ÃΤʽ鿴¼Ô¤Ë¤âÍ¥¤·¤¤¸À¸ì¤Ç¤¹¤Í¡ª ¹½Ê¸µ¬Â§¤¬´Ë¤¤¤Ã¤Æ¤¤¤¦¤ó¤Ç¤¹¤«¡¢³ç¸Ì¤È¤«Å¬Åö¤Ç¤¤¤¤¤·¡£ ¤È¤ê¤¢¤¨¤º¹½Ê¸¤È´Ø¿ô¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤µ¤¨¤¢¤ì¤Ð¤Ê¤ó¤È¤Ê¤¯ ½ÐÍè¤Æ¤·¤Þ¤¦¡£¤¢¤ê¤¬¤¿¤¤¤³¤È¤Ç¤¹¡£ ¤Þ¤¢¡Ä¤½¤Î¤ª¤«¤²¤«perl»È¤¤¤Ê¿Í¤â²¶¤Î¤è¤¦¤ÊÂÌÌܥѡ¼¥é¤«¤é Ķ¥¹¥´¥¤¿Í¤Þ¤ÇÉå¤ë¤Û¤ÉÂô»³µï¤ë¤é¤·¤¯¤Æperl¤Ê¤ó¤«º£¹¹ ¡Ö¿¾¯¡×»È¤¨¤Æ¤â²¿¤Î¼«Ëý¤Ë¤â¤Ê¤é¤Ê¤¤¤ß¤¿¤¤¤Ê¤ó¤Ç¤¹¤¬¡Ä¡£ ¤Ç¤â¤Ç¤â¤³¤ì¤«¤é¤âperl¤ÇÍ·¤Ö¤¼¤¨¡Á¡£ ¤¸¤ã¤¢¤µ¤è¤Ê¤é¤¢¡Á¡£ |
°ÊÁ°¤ËPOST¤Ë´Ø¤·¤Æ¼ÁÌ䤷¤¿¼Ô¤Ç¤¹¡£ÃÙ¤¤¥ì¥¹¤Ç¤¹¤¬¡Ä¡Ê¡°¡°¡¨ ¤É¤¦¤ä¤é¡¢¥½¥±¥Ã¥È¤ËÁ÷¤ëPOST¡Á$message¤Ï¡¢ ¸ÄÊ̤ËÁ÷¤Ã¤¿¾ì¹ç¡¢ÅÓÃæ¤Î\r\n¤ËHTTPD¤¬È¿±þ¤·¤Æ¤·¤Þ¤¦¤è¤¦¤Ç¤¹¡£ ¤Ê¤Î¤Ç¡¢$send¤È¤«¡¢Å¬Åö¤ÊÊÑ¿ô¤ËÁ´Éô·Ò¤²¤ÆÂåÆþ¤·¡¢ print SOCKET $send; ¤È¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤è¤¦¤Ç¤¹¡£ HTTP/1.0¤ò»ØÄꤷ¡¢¹¹¤Ë¤³¤ÎÊýË¡¤Ç¤ä¤Ã¤Æ¤ß¤¿½ê¡¢POST¤¬À®¸ù¤·¤Þ¤·¤¿¡£ ¤Á¤Ê¤ß¤Ë¡¢HTTP¥Ð¡¼¥¸¥ç¥ó¤ò¾Êά¤·¤¿¾ì¹ç¤Ï HTTP/1.1¤È¤ß¤Ê¤µ¤ì¤ë¤ß¤¿¤¤¤Ç¤¹¡£¡ÊÁ´Éô¤½¤¦¤È¤Ï¸Â¤é¤Ê¤¤¡Ä¤«¤Ê¡©¡Ë |
> HTTP¥Ð¡¼¥¸¥ç¥ó¤ò¾Êά¤·¤¿¾ì¹ç¤Ï HTTP/1.1¤È¤ß¤Ê¤µ¤ì¤ë¤ß¤¿¤¤¤Ç¤¹¡£ ¾Êά¤¹¤ë¤È HTTP/0.9 ¤Ë¤Ê¤ê¤Þ¤¹¡£0.9 ¤Ç¤Ï GET °Ê³°»È¤¨¤Þ¤»¤ó¤·¡¢ ¥Ø¥Ã¥À¤âÁ÷¤ì¤Þ¤»¤ó¡£Î㤨¤Ð GET /~foo/index.html ¤òÁ÷¤Ã¤¿»þÅÀ¤Ç¡¢¥µ¡¼¥Ð¤«¤é¥ì¥¹¥Ý¥ó¥¹¤¬Ê֤äƤ¤Þ¤¹¡£¤Ê¤Î¤Ç¡¢ > ÅÓÃæ¤Î\r\n¤ËHTTPD¤¬È¿±þ¤·¤Æ¤·¤Þ¤¦¤è¤¦¤Ç¤¹¡£ ¤³¤ì¤Ï¤½¤¦¤¤¤¦¤³¤È¤¸¤ã¤Ê¤¤¤Ç¤·¤ç¤¦¤«? ¤Ê¤ª¡¢HTTP 0.9 ¤Ç POST /~foo/index.html ¤Ê¤É¤È¤·¤è¤¦¤È¤¹¤ë¤È¡¢405 Method Not Allowed ¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¹¡£ |
¤È¤¤¤¦¤ï¤±¤Ç¡¢ > $send¤È¤«¡¢Å¬Åö¤ÊÊÑ¿ô¤ËÁ´Éô·Ò¤²¤ÆÂåÆþ¤·¡¢ > print SOCKET $send; ¤È¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤ ¤È¤¤¤¦¤³¤È¤Ï¤¢¤êÆÀ¤Ê¤¤¤È»×¤¤¤Þ¤¹¤¬¡¢°ì±þ»î¤·¤Æ¤ß¤¿¤¤¤Î¤Ç ¤è¤í¤·¤±¤ì¤Ð¤½¤Î·Ç¼¨ÈĤΠURL ¤ò¶µ¤¨¤Æ²¼¤µ¤¤¡£ |
¤ª¤Ï¤è¤¦¤´¤¶¤¤¤Þ¤¹¡£ ¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°¤Î´ðÁÃÃμ±¤Î C¸À¸ì¤ÇHTTP¥¯¥é¥¤¥¢¥ó¥È¤òºî¤Ã¤Æ¤ß¤è¤¦(2) ¤Ç¤Ïperl¤È°ã¤¤¥Ø¥Ã¥ÀÉôʬ¤¬É½¼¨¤µ¤ì¤Æ¤Þ¤¹¤è¤Í¡© ¤¢¤ì¤òËÜÂÎÉô¤À¤±É½¼¨¤¹¤ë¤è¤¦¤Ë¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤¿¤é¤¤¤¤¤ó¤Ç¤·¤ç¤¦¡© ¿§¡¹¤ä¤Ã¤Æ¤ß¤Þ¤·¤¿¤¬¤É¤¦¤â¾å¼ê¤¯¤¤¤«¤Ê¤¯¤Æ¡Ä ¡ÖUNIX¤Î¾ì¹ç¡×¤Ïfgets´Ø¿ô¤ò¥½¥±¥Ã¥ÈÆɤ߽Ф·¤Ë¤â»È¤¨¤Þ¤¹¤±¤É Ë¿Windows¤Ï¾¡¼ê¤¬°ã¤¦¤ó¤Ç¤¹¡£¡£ ¡ô¡¡¤É¡¼¤ß¤Æ¤âUNIX¤ÎÊý¤¬¤ä¤ê¤ä¤¹¤¤ ¤É¤ó¤Ê´¶¤¸¤«¤È¤¤¤¦¤Î¤¬http://www.nakka.com/inet/httpc.html¤Î ÀַϤο§¤Ç ¡Ö/* ¥µ¡¼¥Ð¤«¤é¥Ç¡¼¥¿¤ò¼õ¿®¤¹¤ë½èÍý */¡× ¤È¤«½ñ¤«¤ì¤Æ¤ëÊÕ¤ê¤Ç¤¹¡£ ¤Ê¤ó¤È¤Ê¤¯¸«¤ë¤È¤ä¤ê¤Ë¤¯¤¤¤Î¤¬¤ï¤«¤ë¤«¤È^^;; ¤É¤¦¤¹¤ì¤Ð¤¤¤¤¤Ç¤·¤ç¤¦¤«¡© »×¤¤¤Ä¤¤¤¿¤Î¤Ç¤¤¤¤¤Ç¤¹¤«¤é¥ì¥¹¤¯¤À¤µ¤¤¡£ ¤É¤¦¤â¥¢¥¤¥Ç¥¢¤¬¡¦¡¦¡¦¡¦ |
while (1){ char buf[BUF_LEN]; int read_size; static int body_flg = 0; char *p; read_size = read(s,buf,BUF_LEN); if ( read_size > 0 ){ if ( body_flg ){ p = buf; } else if ( p = strstr(buf,"\r\n\r\n") ){ /* ¶õ¹Ô¤Ï¤¢¤ë¤«? */ p+=4; /* \r\n\r\n ¤ÎʬÀè¤Ë¿Ê¤á¤ë */ read_size -= p-buf; /* ¥µ¥¤¥ºÄ´À° */ body_flg = 1; } if ( body_flg ){ write(1,p,read_size); } } else { break; } } ¤³¤ó¤Ê´¶¤¸¤Ç¤É¤¦¤Ç¤·¤ç¤¦¤«? |
¤¢¡¢Á´Á³¥À¥á¤¸¤ã¤ó¡£ > } else if ( p = strstr(buf,"\r\n\r\n") ){ buf ¤Ï \0 ¤Ç terminate ¤µ¤ì¤Æ¤Ê¤¤¤·¡¢¤½¤â¤½¤â \r\n\r\n ¤¬1²ó¤ÇÆɤá¤ëÊݾڤϤʤ¯¤Æ¡¢¤Á¤ç¤¦¤É ¶³¦¤Ë¤Þ¤¿¤¬¤Ã¤Æ¤ë¤«¤â¤·¤ì¤Ê¤¤¡£ ¤Þ¡¢¤½¤³¤é¤Ø¤ó¤Ï¤è¤·¤Ê¤Ë¡£ |
ping¥³¥Þ¥ó¥É¤Ç¤Ï¡¢¥Û¥¹¥È̾¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢ ¤½¤Î¥Û¥¹¥È̾¡Ê¤Þ¤¿¤Ï£É£Ð¥¢¥É¥ì¥¹¡Ë¤È¤ÎÀܳ³Îǧ¤¬ ¤Ç¤¤Þ¤¹¡£ ¤³¤ì¤ÈƱÍͤˡ¢¤½¤Î¥Û¥¹¥È̾¡Ê¤Þ¤¿¤Ï£É£Ð¥¢¥É¥ì¥¹¡Ë¤Î ÆÃÄê¤Î¥Ý¡¼¥ÈÈÖ¹æ¤ËÂФ·¤Æ¡¢Àܳ³Îǧ¤ò¹Ô¤¤¤¿¤¤¤Î ¤Ç¤¹¤¬¡¢¤Ê¤Ë¤«Îɤ¤ÊýË¡¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡© |
¼ÂºÝ¤Ë connect ¤¹¤ë¤Î¤Ï¥À¥á¤Ê¤ó¤Ç¤¹¤«? ¤½¤ì°Ê³°¤ÎÊýË¡¤Ï¤Ê¤¤¤È»×¤¤¤Þ¤¹¡£Â¿Ê¬¡£ |
ËÜ¥µ¥¤¥È¤Ï¤¿¤Þ¤Ë¤Ç¤Ï¤¢¤ê¤Þ¤¹¤¬»²¹Í¤Ë¤µ¤»¤Æ¤¤¤¿¤À¤¤¤Æ¤ª¤ê¤Þ¤¹¡£ »ä¤â²¿¤«Åê¹Æ¤µ¤»¤Æ¤¤¤¿¤À¤¤¿¤¤¤È¹Í¤¨¤Æ¤ª¤ê¤Þ¤·¤¿¤¬¡¢¥×¥í¥°¥é¥ß¥ó¥°¥µ¡¼¥¯¥ë¡È¥ß¥ì¥Ë¥¢¥à¡É¤òΩ¤Á¾å¤²¤Þ¤·¤¿¤Î¤Ç¤´¾Ò²ð¤ò¤µ¤»¤Æ¤¤¤¿¤À¤¤¿¤¤¤È»×¤¤¤Þ¤¹¡£·Ç¼¨ÈĤΰƷï¤ÈľÀÜ´Ø·¸¤Ê¤¤¤È»×¤ï¤ì¤Þ¤¹¤¬ÍƼϴꤤ¤Þ¤¹¡£ ¥ß¥ì¥Ë¥¢¥à¤Ï¥µ¡¼¥¯¥ë¤È¤¤¤¦ÂμÁ¤òÀ¸¤«¤·¤Æ°åÎÅ¡¦Ê¡»ã¡¦¶µ°é¤ÎʬÌî¤Ç¹âµ¡Ç½¡¦Äã²Á³Ê¥Ó¥¸¥Í¥¹¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¹½ÃÛ¤òÌÜŪ¤È¤·¤¿¥×¥í¥°¥é¥ß¥ó¥°¥µ¡¼¥¯¥ë¤Ç¤¢¤ê¤Þ¤¹¡£ ¸½ºß¡¢¥á¥ó¥Ð¡¼¤Ï15̾ÄøÅ٤ǥۡ¼¥à¥Ú¡¼¥¸¤ò·úÀßÃæ¤Ç¤¢¤ê¡¢¸½ºßCGIÅù¤ÎÁȤá¤ëÊý¡¢VB¡¢VC++¡¢Delphi¡¢Java¡¢HTML¡¢DTP¡Ê¥Ç¥¶¥¤¥ó¡Ë¤ÎÆÀ°Õ¤ÊÊý¤òÊ罸Ãפ·¤Æ¤ª¤ê¤Þ¤¹¡£¥á¥ó¥Ð¡¼¤Ï¸½¿¦¤Î¥×¥í¥°¥é¥Þ¡¼¡¢DTP¹½ÃÛ¼Ô¡¢²ÈÄí¤Î¼çÉؤʤɤ¤¤í¤¤¤í¤ÊÊý¤Ç¹½À®¤µ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£ ¥ß¥ì¥Ë¥¢¥à¤Ë»²²Ã¤¹¤ë¾ò·ï¤È¤·¤Æ¤ÏËܿͤ˾Q¤ÈÀÕǤ´¶¤È¹¥´ñ¿´¤¬É¬ÍפǤ¢¤ê¤½¤Î¾¤ÏÌä¤ï¤ì¤Þ¤»¤ó¡£ ¶½Ì£¤¬¤´¤¶¤¤¤Þ¤·¤¿¤é¥á¡¼¥ë¤Ë¤Æ¤ªÊÖ»ö¤ª´ê¤¤¤¤¤¿¤·¤Þ¤¹¡£ ¼ºÎ餤¤¿¤·¤Þ¤·¤¿¡£²ò¤«¤é¤Ê¤¤¤³¤È¤¬¤¢¤ê¤Þ¤·¤¿¤é»ä¤âÅê¹Æ¤µ¤»¤Æ¤¤¤¿¤À¤¯¤«¤â¤·¤ì¤Þ¤»¤ó¤Î¤Ç¤è¤í¤·¤¯¤ª´ê¤¤¤¤¤¿¤·¤Þ¤¹ |
¤Ï¤¸¤á¤Þ¤·¤Æ¡¢¤¤¤Ä¤âHP¸«¤µ¤·¤Æ¤¤¤¿¤À¤¤¤Æ¤Þ¤¹ ´¶¼Õ winsock¤ò¡Ê£ã¸À¸ì¤Ç¡Ë»È¤Ã¤Æ¥Á¥ã¥Ã¥È¤Î¥×¥í¥°¥é¥à¤ò½ñ¤¤¤Æ¤ß¤è¤¦¤È»×¤Ã¤¿¤ó¤Ç¤¹¤±¤ì¤É¡¢¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¥¿¥¤¥×¤Î¥µ¡¼¥Ð¡¼¤Ç¥¯¥é¥¤¥¢¥ó¥È¤Ësend()¤¹¤ë»þ¡Ê¿ʬIP¥Þ¥ë¥Á¥¥ã¥¹¥È¤ÃÅÛ¤ò»È¤¦¤È»×¤¦¤ó¤Ç¤¹¤±¤É¡Ë¤Î¤ä¤êÊý¤Ë¤Ä¤¤¤Æ²¿¤«¾ðÊ󤪻ý¤Á¤Ç¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡© Àܳ¤µ¤ì¤¿¥¯¥é¥¤¥¢¥ó¥ÈÁ´¤Æ¤ËƱÊóÁ÷¿®¤Ç¤¤ë¤è¤¦¤Ë¤·¤¿¤¤¤ó¤Ç¤¹¤±¤ì¤É¡¢¤è¤í¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£ ¸å¡¢¾¡¼ê¤ËHP¤Ë¥ê¥ó¥¯Ä¥¤Ã¤Æ¤·¤Þ¤Ã¤¿¤ó¤Ç¤¹¤±¤É¤è¤í¤·¤«¤Ã¤¿¤Ç¤·¤ç¤¦¤«¡© ¤Þ¤º¤¤¤è¤¦¤À¤Ã¤¿¤éÏ¢Íí²¼¤µ¤¤ |
¥Þ¥ë¥Á¥¥ã¥¹¥È¤¹¤ë¤Ê¤é¡¢TCP ¤¸¤ã¤Ê¤¯¤Æ UDP ¤Ë¤Ê¤ë¤È»×¤¤¤Þ¤¹¤¬¡¢ ¤½¤³¤é¤Ø¤ó¤Î´ðÁÃÃμ±¤Ï¤¢¤ê¤Þ¤¹¤«? ¤¢¤È¡¢IPv4 ¤Ç¤Ï¥Þ¥ë¥Á¥¥ã¥¹¥È¤Ï optional ¤Ê¤ó¤Ç¤¹¤¬¡¢ÂçÄñ¤Î OS ¤Ë¤Ï¼ÂÁõ¤µ¤ì¤Æ¤ë¤Î¤«¤·¤é? ¤Ç¡¢Ëͤⶽ̣¤Ï¤¢¤ê¤Þ¤¹¤¬¡¢¤½¤³¤é¤Ø¤ó¤Ï¤Þ¤À¼«Ê¬¤Î¤â¤Î¤Ë¤·¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢ ÀâÌÀ¤Ç¤¤Ê¤¤¤Ç¤¹¡£ http://X68000.startshop.co.jp/~68user/net/link-book.html ¤Î ¡ÖUNIX ¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°Âè2ÈÇ Vol.1¡× ¤Ë¤È¤Ã¤Æ¤â¾Ü¤·¤¯½ñ¤¤¤Æ¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤è¤«¤Ã¤¿¤éÇã¤Ã¤Æ¤ß¤Æ²¼¤µ¤¤¡£ # º£ÀâÌÀ¤·¤è¤¦¤È¤¹¤ë¤È¡¢¤³¤ÎËܤδݼ̤·¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¤Î¤Ç¡£ > \r\n\r\n ¤¬1²ó¤ÇÆɤá¤ëÊݾڤϤʤ¯¤Æ¡¢ ¤³¤³¤é¤Ø¤ó¤Î¤³¤È¤Ë¤Ä¤¤¤Æ¤â¡¢¤³¤ÎËܤ˾ܤ·¤¯½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡£ ÍפÏ1¥Ð¥¤¥È¤º¤ÄÆɤá¤Ð¤¤¤¤¤ó¤Ç¤¹¤¬¡¢Ëè²ó read ¤·¤Æ¤ÏÃÙ¤¯¤Ê¤ë¤Î¤Ç Àè¤Ë¥Ð¥Ã¥Õ¥¡¤ËÆɤ߹þ¤ó¤À¤ê¡¢read ¤·¤Æ¤¤¤ë¤È¤¤Ë¥·¥°¥Ê¥ë¤¬Èô¤ó¤Ç¤¤¿ ¾ì¹ç¤Î EINTR ¤Ê¤É¤Ê¤É¡£ 8000±ß½Ð¤¹¤À¤±¤Ç¡¢5Ëü±ßʬ¤¯¤é¤¤¤ÎÃ챤¬ÆÀ¤é¤ì¤Þ¤¹¡£¤ª¤¹¤¹¤á¡£ > ¾¡¼ê¤ËHP¤Ë¥ê¥ó¥¯Ä¥¤Ã¤Æ¤·¤Þ¤Ã¤¿¤ó¤Ç¤¹¤±¤É¤è¤í¤·¤«¤Ã¤¿¤Ç¤·¤ç¤¦¤«¡© ¤É¤¦¤¾¡Á¡£ |
>> $send¤È¤«¡¢Å¬Åö¤ÊÊÑ¿ô¤ËÁ´Éô·Ò¤²¤ÆÂåÆþ¤·¡¢ >> print SOCKET $send; ¤È¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤ >¤È¤¤¤¦¤³¤È¤Ï¤¢¤êÆÀ¤Ê¤¤ ³Î¤«¤Ë¤½¤¦¤Ç¤·¤¿¡Ä$send¤ËÁ´ÉôÂåÆþ¤¹¤ë¤Î¤È HTTP¥Ð¡¼¥¸¥ç¥ó¤ò¿§¡¹ÊѤ¨¤ë¤Î¤òƱ»þ¤Ë»î¤·¤Æ¤Æº®Í𤷤Ƥ¿¤ß¤¿¤¤¤Ç¤¹¡Ê´À¡Ë ¤È¤¤¤¦¤ï¤±¤Ç¡¢¤ä¤Ã¤Ñ¤ê·Ò¤²¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£¥Ï¥¤¡£ ¤Þ¤¿¡¢HTTP¥Ð¡¼¥¸¥ç¥ó¾Êά¤â0.9°·¤¤¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤·¤¿¡£ ¤Ç¤â¾Êά¤¹¤ë¤È0.9¤Ë¤µ¤ì¤ë¤È¤¤¤¦¤Î¤Ï¤Á¤ç¤Ã¤È¶Ã¤¡£ ¤³¤ì¤Ï¥µ¡¼¥Ð¦¤Ç¤½¤¦ÀßÄꤷ¤Æ¤¤¤ë°Ù¤Ç¤¹¤è¤Í¡Ä¡©¤È¤¤¤¦»ö¤Ï¡Ä º£»þ0.9¤Ê¤ó¤Æ»È¤ï¤Ê¤¤¤·¡Ä1.0¤ä1.1¤ò¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤Ë¤·¤Æ¤¤¤ë¥µ¡¼¥Ð¤â¤¢¤ë¤ó¤Ç¤·¤ç¤¦¤«¡© |
HTTP ¤Î¥Ð¡¼¥¸¥ç¥ó¾Êά»þ¤Ï 0.9 ¤Ç¤¢¤ë¤È RFC ¤Ç·è¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡£ http://X68000.startshop.co.jp/~68user/net/rfc.html ¤È¤¤¤¦¤è¤ê¡¢¡Ö¾Êά¤·¤¿¤â¤Î¤Î¤ß¤ò 0.9 ¤È¤ß¤Ê¤¹¡×¤È¸À¤Ã¤¿Êý¤¬Àµ¤·¤¤¤«¤Ê¡£ GET /index.html HTTP/0.9 ¤È¤¤¤¦¥ê¥¯¥¨¥¹¥È¤Ï¤Ç¤¤Ê¤¤¤è¤¦¤Ê¤Î¤Ç¡£ |
ÊÖ»ö¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£ ¥Þ¥ë¥Á¥¥ã¥¹¥È¤Ë¤Ä¤¤¤Æ¤Ç¤¹¤¬ winsock1,1¤Ç¤Ïoption°·¤¤¤ÇÀµ¼°¥µ¥Ý¡¼¥È¤Ç¤Ï¤Ê¤¯ 2,0¤Ç¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤ë¤è¤¦¤Ê¤ó¤Ç¤¹¤¬¡¢¤¤¤¤¾ðÊ󤬤ޤÀÆÀ¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£ ¤â¤¦¤Á¤ç¤Ã¤ÈÄ´¤Ù¤Æ¡¢¤¦¤Þ¤¯¤¤¤Ã¤¿¤éÊó¹ð¤·¤Þ¤¹¡£ ¡Êº£windows¤Ç¤ä¤Ã¤Æ¤ë¤ó¤Ç68user¤µ¤ó¤Ï¤¢¤Þ¤ê¶½Ì£¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡Ë |
¤Ï¤¸¤á¤Þ¤·¤Æ¡£ ¡Ö¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°¤Î´ðÁÃÃμ±¡×Æɤޤ»¤Æ¤¤¤¿¤À¤¤Þ¤·¤¿¡£ £È£Ô£Ô£Ð¤Î½é¿´¼Ô¤Î¤¿¤á¡¢ÂçÊÑÊÙ¶¯¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ ¤³¤ÎÅÙproxy¥µ¡¼¥Ð¤ò»È¤Ã¤Æ¡¢£Õ£Ò£Ì¤ò¼è¤Ã¤Æ¤¯¤ë¥·¥¹¥Æ¥à¤ò³«È¯¤·¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¢¤¦¤Þ¤¯Æ°ºî¤·¤Þ¤»¤ó¡£ GET¤Î¥ì¥¹¥Ý¥ó¥¹¤Ç¡¢¥Ø¥Ã¥À¤Ç¤Ï¡Ö200 OK¡×¤¬Ê֤äƤ¤Æ¤¤¤ë¤Î¤Ë¡¢¥Ø¥Ã¥À¤·¤«¼è½Ð¤»¤Þ¤»¤ó¡£¤É¤ó¤Ê¸¶°ø¤¬¹Í¤¨¤é¤ì¤ë¤Ç¤·¤ç¤¦¤«¡£ ´Ä¶¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£ proxy¥µ¡¼¥Ð¡§NetscapeProxyServer ¼è½Ð¤¹URL¤Î¤¢¤ë¥µ¡¼¥Ð¡§Apache 1.3.9 |
> ¥Ø¥Ã¥À¤·¤«¼è½Ð¤»¤Þ¤»¤ó¡£ - ¤É¤¦¤¤¤¦¥ê¥¯¥¨¥¹¥È¤òÁ÷¤Ã¤¿¤Î¤« - ´Ä¶ (Windows ¤Ê¤É) - ²¿¤ò¼Â¹Ô¤·¤¿¤Î¤« (telnet ¤Ç¤ä¤Ã¤¿¤È¤« perl ¤Ç½ñ¤¤¤¿¤È¤«) - ¤É¤Î URL ¤ò»î¤·¤Æ¤âƱ¤¸·ë²Ì¤Ë¤Ê¤ë¤Î¤« - ¼ÂºÝ¤Î¥³¡¼¥É¤Ï (perl ¤È C °Ê³°¤ï¤«¤ê¤Þ¤»¤ó¤±¤É) ¤Ê¤É¤¬¤ï¤«¤é¤Ê¤¤¤È²¿¤È¤â¸À¤¨¤Þ¤»¤ó¤¬¡¢¤È¤ê¤¢¤¨¤º telnet ¤Ç proxy ¥µ¡¼¥Ð¤Ë·Ò¤²¤Æ¡¢ GET http://www.yahoo.co.jp/ HTTP/1.0 Host: www.yahoo.co.jp (¶õ¹Ô) ¤ò»î¤·¤Æ¤ß¤Æ²¼¤µ¤¤¡£ > ¡Êº£windows¤Ç¤ä¤Ã¤Æ¤ë¤ó¤Ç68user¤µ¤ó¤Ï¤¢¤Þ¤ê¶½Ì£¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡Ë ºÇ¶á¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°¼«ÂΤËË°¤¤Æ¤·¤Þ¤¤¡¢ 3D ¤Ë¤Ï¤Þ¤Ã¤Æ¤¿¤ê¤·¤Þ¤¹(^^; ¤Á¤ç¤¤¤È¾Ò²ð¤·¤È¤¤Þ¤¹¤¬¡¢»²¹Í¤Ë¤·¤¿¤Î¤Ï¤³¤Î¥µ¥¤¥È¤Ç¤¹¡£ ¤È¤Æ¤â¤ï¤«¤ê¤ä¤¹¤¯½ñ¤«¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¶½Ì£¤Î¤¢¤ëÊý¤Ï¤¼¤Ò¡£ http://www.cim.pe.u-tokyo.ac.jp/~mitani/Java/java3d/index.html # Ĺǯ¤ÎÌ´¤Ç¤¢¤Ã¤¿¥Ý¥ê¥´¥ó¤ò¤°¤ê¤°¤ê²ó¤¹¤Î¤¬¼Â¸½¤Ç¤¤Æ¤¦¤ì¤·¤¤¡£ # º£¤Ï¥Æ¥¯¥¹¥Á¥ãŽ¤Ã¤¿¤ê¥·¥§¡¼¥Ç¥£¥ó¥°¤«¤±¤ëÊýË¡¤òÌϺ÷Ãæ¡Ä¡£ ## ¤³¤³¤é¤Ø¤ó¤ò²òÀ⤷¤Æ¤ë¥µ¥¤¥È¤Ê¤¤¤«¤·¤é? |
ÊÖ»ö¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£ >¡¡- ¤É¤¦¤¤¤¦¥ê¥¯¥¨¥¹¥È¤òÁ÷¤Ã¤¿¤Î¤« >¡¡- ´Ä¶ (Windows ¤Ê¤É) >¡¡- ²¿¤ò¼Â¹Ô¤·¤¿¤Î¤« (telnet ¤Ç¤ä¤Ã¤¿¤È¤« perl ¤Ç½ñ¤¤¤¿¤È¤«) >¡¡- ¤É¤Î URL ¤ò»î¤·¤Æ¤âƱ¤¸·ë²Ì¤Ë¤Ê¤ë¤Î¤« >¡¡- ¼ÂºÝ¤Î¥³¡¼¥É¤Ï (perl ¤È C °Ê³°¤ï¤«¤ê¤Þ¤»¤ó¤±¤É) ´Ä¶¡§£Õ£Î£É£Ø ¸À¸ì¡§£Ã¸À¸ì¤Çproxy¥µ¡¼¥Ð¤Ë¤ÏsocketÄÌ¿®¤Ç¥ê¥¯¥¨¥¹¥È¤òÁ÷¤Ã¤Æ¤¤¤Þ¤¹¡£ ¶ñÂÎŪ¤Ë¤Ï°Ê²¼¤ÎÆâÍƤòsend¤ÇÁ÷¤Ã¤Æ¤¤¤Þ¤¹¡£ GET http://www.yahoo.co.jp/ HTTP/1.1 Host:www.yahoo.co.jp (¶õ¹Ô) ¢¨proxy¥µ¡¼¥Ð¤¬¼ÒÆâ¤Î¥Þ¥·¥ó¤·¤«¥¢¥¯¥»¥¹¤Ç¤¤Ê¤¤ÀßÄê¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢ ¼ÂºÝ¤Ë¤Ïwww.yahoo.co.jp¤ÎÉôʬ¤Ï¼ÒÆâ¤Îhost̾¤ò»ØÄꤷ¤Æ¤¤¤Þ¤¹¡£ >> ¥Ø¥Ã¥À¤·¤«¼è½Ð¤»¤Þ¤»¤ó¡£ ¤³¤Î¸å¡¢¤â¤¦¤Á¤ç¤Ã¤ÈÄ´¤Ù¤Æ¤ß¤ë¤È¡¢ °ìÅÙÌܤÎrecv¤Ç¥ì¥¹¥Ý¥ó¥¹¥Ø¥Ã¥À¤¬Á÷¤é¤ì¤Æ¤¤Æ¡¢ ÆóÅÙÌܤÎrecv¤Ç¥¨¥ó¥Æ¥£¥Æ¥£¥Ü¥Ç¥£¤¬¼è½Ð¤µ¤ì¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤·¤¿¡£ NetscapeProxyServer¤Î»ÅÍͤʤΤǤ·¤ç¤¦¤«¡£ ¤¢¤È¡¢¥ì¥¹¥Ý¥ó¥¹¥Ø¥Ã¥Àʸ»úÎó¤ÎÂçʸ»ú¾®Ê¸»ú¤Ç¤¹¤¬¡¢ ËܤʤɤǤÏ"-"¤Î¸å¤Îʸ»ú¤ÏÂçʸ»ú¤Ê¤Î¤Ç¤¹¤¬¡¢ ¾åµ¤Î´Ä¶¤Ç¹Ô¤¦¤È¾®Ê¸»ú¤Ë¤Ê¤ê¤Þ¤¹¡£ (Îã¡Ë¡ÖLast-Modified¡×¢ª¡ÖLast-modified¡×¤Ê¤É¡£¡£¡£ ¤³¤ì¤âNetscape Proxy Server¤Î»ÅÍͤʤΤǤ·¤ç¤¦¤«¡£ ¸æ¸ÃΤΤ³¤È¤¬¤¢¤ì¤Ð¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£ |
> °ìÅÙÌܤÎrecv¤Ç¥ì¥¹¥Ý¥ó¥¹¥Ø¥Ã¥À¤¬Á÷¤é¤ì¤Æ¤¤Æ¡¢ > ÆóÅÙÌܤÎrecv¤Ç¥¨¥ó¥Æ¥£¥Æ¥£¥Ü¥Ç¥£¤¬¼è½Ð¤µ¤ì¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤·¤¿¡£ ½½Ê¬¤ÊÎ̤ΥХåե¡¤òÍÑ°Õ¤·¤Æ¡¢½½Ê¬¤Ê¥µ¥¤¥º¤ò»ØÄꤷ¤¿¤«¤é¤È¤¤¤Ã¤Æ¡¢ °ìÅ٤Πrecv ¤ÇÁ´¤Æ¤Î¥Ç¡¼¥¿¤ò¼è¤ê½Ð¤»¤ë¤È¤¤¤¦ÊݾڤϤ¢¤ê¤Þ¤»¤ó¡£ ¤³¤ì¤Ï read ¤Ç¤âƱ¤¸¤Ç¤¹¡£ http://X68000.startshop.co.jp/~68user/net/c-open.html ¤ÎºÇ¸å¤Ë¤Ï > ¤â¤·»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤ÎŤµ¤¬ 600 ¥Ð¥¤¥È¤Ê¤é¡¢ > ¡¡1²óÌܤΥ롼¥×: read_size == 256 > ¡¡2²óÌܤΥ롼¥×: read_size == 256 > ¡¡3²óÌܤΥ롼¥×: read_size == 88 > ¡¡4²óÌܤΥ롼¥×: read_size == 0 ¤È½ñ¤¤Þ¤·¤¿¤¬¡¢¤³¤ì¤ÏÁê¼ê¤¬¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤À¤«¤é¤Ç¤¢¤Ã¤Æ¡¢ ¥½¥±¥Ã¥È·Ðͳ¤À¤È¡¢ char buf[1000]; read(socket,buf,sizeof(buf)); ¤È¤·¤Æ¤â¡¢ 1²óÌܤÎread: read_size == 10 2²óÌܤÎread: read_size == 20 3²óÌܤÎread: read_size == 1 4²óÌܤÎread: read_size == 0 ¤Ê¤É¤È¤Ê¤ë²ÄǽÀ¤¬¤¢¤ê¤Þ¤¹ (¤³¤ÎÎã¤Ç¤Ï¥Ç¡¼¥¿Î̤Ï31¥Ð¥¤¥È)¡£ Í×¤Ï IP ¥Ñ¥±¥Ã¥È¤¬ºÙÀÚ¤ì¤ËÁ÷¤é¤ì¤Æ¤¤¿¤È¤¡¢read(recv) ¤¹¤ë¤È Í׵ᤵ¤ì¤¿¥µ¥¤¥º¤Î¥Ç¡¼¥¿¤¬ÆϤ¯¤Þ¤ÇÂԤĤΤǤϤʤ¯¡¢¤½¤Î¤È¤¤Þ¤Ç¤Ë ¼õ¤±¼è¤Ã¤Æ¤¤¤ë¥Ç¡¼¥¿¤òÊÖ¤¹¤ï¤±¤Ç¤¹¡£Î㤨¤Ð echo ¥µ¡¼¥Ð¤Ç¡¢ $|=1; print(SOCKET,"a"); sleep(5); print(SOCKET,"b"); sleep(5); print(SOCKET,"c"); sleep(5); ¤È¤¹¤ë¤È¡¢ºÙÀÚ¤ì¤Ê¥Ç¡¼¥¿¤¬Á÷¤é¤ì¤ë¤ï¤±¤Ç¤¹¡£ > (Îã¡Ë¡ÖLast-Modified¡×¢ª¡ÖLast-modified¡×¤Ê¤É¡£¡£¡£ Netscape Proxy Server ¤¬¤ï¤¶¤ï¤¶ÊÑ´¹¤·¤Æ¤¤¤ë¤Î¤«¡¢ WWW ¥µ¡¼¥Ð¤¬¤½¤¦¤¤¤¦¥Ø¥Ã¥À¤òÊÖ¤¹¤Î¤«¤Ï¤ï¤«¤ê¤Þ¤»¤ó¤¬¡¢ µ¬³Ê¾å¤ÏÂçʸ»ú¾®Ê¸»ú¤Ï¶èÊ̤µ¤ì¤Þ¤»¤ó (RFC ¤Î¤É¤³¤«¤Ë½ñ¤¤¤Æ¤¢¤ë¤Ï¤º)¡£ Last-Modified/Last-modefied/LaSt-MODIfied ¤ÏƱ¤¸¤è¤¦¤Ë °·¤ï¤Ê¤¤¤È¤¤¤±¤Þ¤»¤ó¡£ ¤Á¤ç¤Ã¤ÈÍÑ»ö¤¬¤¢¤ê¡¢º£Æü¤ÎÌ뤫¤é¿ôÆü´Ö ÊÖÅú¤Ç¤¤Þ¤»¤ó¤Î¤Ç¤è¤í¤·¤¯¡£ |
> °ìÅ٤Πrecv ¤ÇÁ´¤Æ¤Î¥Ç¡¼¥¿¤ò¼è¤ê½Ð¤»¤ë¤È¤¤¤¦ÊݾڤϤ¢¤ê¤Þ¤»¤ó¡£ ¤¢¡¢¤³¤ì¤Ï read_size = recv(s,buf,sizeof(buf),0); ¤Î¤³¤È¤Ç¤¹¡£ read_size = recv(s,buf,sizeof(buf),MSG_WAITALL); ¤Ê¤é¡¢Á´¥Ç¡¼¥¿¤òÂÔ¤Á¤Þ¤¹¤Î¤Ç¡¢recv ¤Ï1²ó¤À¤±¼Â¹Ô¤¹¤ì¤Ð OK ¤Ç¤¹¡£ ¤¿¤À¤· MSG_WAITALL ¤ò»ØÄꤷ¤Æ¤â¡¢¥·¥°¥Ê¥ë¼õ¿®¡¦¥³¥Í¥¯¥·¥ç¥óÀÚÃÇ»þ¤Ï¡¢ Á´¥Ç¡¼¥¿¤òÂÔ¤¿¤º¤Ë recv ¤«¤éÌá¤ê¤Þ¤¹¡£ |
¤É¤â¡¢½é¤á¤Þ¤·¤Æ¡£¤È¤Û¤Û£×£×£×¡Ý¥é¥¦¥ó¥¸¤«¤éÍè¤Þ¤·¤¿¡£ ¡Ö¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°¤Î´ðÁÃÃμ±¡×¤¬ÂçÊѤ¿¤á¤Ë¤Ê¤ê¤Þ¤¹¡£ ƱÍͤʻö¤Ï½ñÀҡʥ饯¥ÀÀÄËܡˤˤâ½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤Á¤é¤¬¤º¤Ã¤È²ò¤«¤ê¤ä¤¹¤¤¤Ç¤¹¡£ ¥³¥ó¥Æ¥ó¥ÄÀ©ºî¸æ¶ìÏ«ÍͤǤ¹¡¡¡õ¡¡Í¤êÆñ¤¦¸æºÂ¤¤¤Þ¤¹¡£ ------------------------------ ¤¹¤Ã¤´¤¯ÊÙ¶¯¤Ë¤Ê¤ë²òÀâ¤Î¤¿¤á¡¢·«¤êÊÖ¤·Æɤà»ö¤Ë¤Ê¤ë¤Î¤Ç¤¹¤¬¡¢¥Ù¡¼¥¸ÇÛ¿§¤¬¡¢¥Æ¥¥¹¥È¤¬¹õ·ÏÅý¤Ê¤¯Çò·ÏÅý¤Ç¤¢¤ë¤¿¤áÌܤ¬¾¯¡¹ÉÕ¤«¤ì¤Þ¤¹¡¢¤Þ¤¿¥Ð¥Ã¥¯¥«¥é¡¼¤È¥Æ¥¥¹¥È¤ÎÌÀ°Å¤¬¶á´ó¤Ã¤Æ¤¤¤ë¤Î¤Ç¤³¤ì¤âÌܤËÉÕ¤«¤ì¤ëÍ×°ø¤Î¤è¤¦¤Êµ¤¤¬¤·¤Þ¤¹¡£¤Þ¤Ã¤³¤³¤¤¤é¤Ï¸Ä¿ÍŪÓϹ¥¤ÎÉôʬ¤À¤È»×¤¤¤Þ¤¹¡£ ¤½¤¦¤¤¤¦»ö¤Ç¡¢¥Ð¥Ã¥¯¥«¥é¡¼¤È¥Æ¥¥¹¥È¥«¥é¡¼¤Î»ØÄê¤ò³°Éô¥¹¥¿¥¤¥ë¥·¡¼¥È¤Ç»ØÄꤵ¤»¤è¤¦¤È»×¤¤¡¢¤½¤Î°Ù¤Ë¤Ï¼è¤ê¤¢¤¨¤º¥³¥ó¥Æ¥ó¥Ä¤Î³¬Áؤò´Þ¤á¤Æ¥í¡¼¥«¥ë¤Ë¥À¥¦¥ó¤·¡¢¤½¤Î¸å¥í¡¼¥«¥ëÆâ¤Ç³¬Áؤò¸Ù¤¤¤ÀHTML¥Õ¥¡¥¤¥ë¤Î½¤Àµ¤òPerl¤Ç¹Ô¤¦»ö¤Ë¤·¤Þ¤·¤¿¡£ ¤½¤¦¤¤¤¦»ö¤Ç¡¢º£¡¢ºÆµ¢Åª¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê¥µ¡¼¥Á¥¹¥¯¥ê¥×¥È¤òÀ©ºîÃæ¤Ç¤¹¡£¡£¡£¡£¡£ ¡ô¤¤¤Ä¤âËÜÂê¤ÎÁ°¤Ë¡¢¡Ö¤¢¤ì¤ä¤ë¡¢¤³¤ì¤ä¤ë¡×¤È»þ´Ö¤¬¤«¤«¤ë»ä¤Ç¤·¤¿(¾Ð) #¤È¤³¤í¤Ç¡¢68user¤µ¤ó¤Ï¡¢¤È¤Û¤Û¥é¥¦¥ó¥¸¤Ç¤Î¡ÖB-cus¡×¤µ¤ó¤ÈƱ°ì¤ÊÊý¤Ç¤·¤ç¤¦¤«¡©¡¢¡¢¡¢¤Þ¤Ã¤¤¤é¤ÌÁ§º÷¤ÎÈÏáƤʤΤǤ¹¤¬(^^; |
cksum¥³¥Þ¥ó¥É¤Ë¤Ä¤¤¤ÆÃΤꤿ¤¤¤Î¤Ç¤¹¤¬¡¢ ¡cksum¥³¥Þ¥ó¥É¤Ï¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¤É¤¦¤¤¤Ã¤¿¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¤Ç ¤·¤ç¤¦¤«¡© ¢£Ã¸À¸ì¤«¤écksum¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤«¤±¤¿»þ¤Ë¡¢Àµ¾ï¤Ë½ªÎ»¤·¤¿¤«¡¢ ¤â¤·¤¯¤Ï¡¢°Û¾ï½ªÎ»¤·¤¿¤«¤ÎȽÃǤϹԤ¨¤ë¤Î¤Ç¤·¤ç¤¦¤«¡© ¤â¤·¡¢¹Ô¤¨¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¾ÜºÙ¤Ê¥¨¥é¡¼¾ðÊó¤Ï¤É¤¦¤¤¤Ã¤¿¤â¤Î¤¬ ¤¢¤ë¤Î¤Ç¤·¤ç¤¦¤«¡£ |
> ¥Ù¡¼¥¸ÇÛ¿§¤¬¡¢¥Æ¥¥¹¥È¤¬¹õ·ÏÅý¤Ê¤¯Çò·ÏÅý¤Ç¤¢¤ë¤¿¤áÌܤ¬¾¯¡¹ÉÕ¤«¤ì¤Þ¤¹ ¤Ç¤¢¤ì¤Ð perl -pi.bak -e 's/BGCOLOR="#575757" TEXT="#FFFFFF"/BGCOLOR=white TEXT=black/' *.html ¤Ê¤É¤¬¤ª¼ê·Ú¤Ç¤¹¡£ > ¤Þ¤Ã¤³¤³¤¤¤é¤Ï¸Ä¿ÍŪÓϹ¥¤ÎÉôʬ¤À¤È»×¤¤¤Þ¤¹¡£ Á°¤Ë¡ÖÇطʤ¬¹õ/ʸ»ú¤¬Çò¤ÇÆɤߤ䤹¤¤¡×¤È¸À¤ï¤ì¤¿¤³¤È¤â¤¢¤ê¤Þ¤¹¡£ ¿Í¤Ë¤è¤Ã¤Æ¹¥¤ß¤¬°ã¤¦¤Î¤ÇÆñ¤·¤¤¤Ç¤¹¤Í¡£ > ¡¢ ´ÝÉÕ¤¿ô»ú¤Ïµ¡¼ï°Í¸ʸ»ú¤Ê¤Î¤Ç¡¢»È¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡£ > cksum¥³¥Þ¥ó¥É¤Ï¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¤É¤¦¤¤¤Ã¤¿¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¤Ç¤·¤ç¤¦¤«¡© http://www.jp.FreeBSD.org/cgi/cvsweb.cgi/src/usr.bin/cksum/ ¤òÆɤó¤Ç²¼¤µ¤¤¡£¤Ê¤¼¤½¤¦¤¤¤¦¥³¡¼¥É¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤«¤òÃÎ¤í¤¦¤È¤¹¤ë¤È ¤Û¤È¤ó¤É¿ô³Ø¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¤Î¤Ç¡¢ËͤˤÏÀâÌÀ¤Ç¤¤Þ¤»¤ó¡£ > £Ã¸À¸ì¤«¤écksum¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤«¤±¤¿»þ¤Ë¡¢Àµ¾ï¤Ë½ªÎ»¤·¤¿¤«¡¢ > ¤â¤·¤¯¤Ï¡¢°Û¾ï½ªÎ»¤·¤¿¤«¤ÎȽÃǤϹԤ¨¤ë¤Î¤Ç¤·¤ç¤¦¤«¡© system(3) ¤ÎÌá¤êÃͤǤ狼¤ê¤Þ¤¹¡£0 ¤Ê¤éÀµ¾ï¡¢°Û¾ï½ªÎ»¤Ê¤é Ìá¤êÃͤò 8bit ±¦¥·¥Õ¥È¤·¤¿¤â¤Î¤¬½ªÎ»¥¹¥Æ¡¼¥¿¥¹ (cksum ¤¬ return ¤·¤¿¤ê exit ¤·¤¿ÃÍ)¡£ |
> cksum ÆüËܸì¥Þ¥Ë¥å¥¢¥ë¤òºÇ½é¤Ë¾Ò²ð¤¹¤Ù¤¤Ç¤·¤¿¡£ http://www.jp.freebsd.org/cgi/mroff.cgi?subdir=man&man=cksum&dir=jpman-3.3.0%2Fman |
>> ¡¢ > ´ÝÉÕ¤¿ô»ú¤Ïµ¡¼ï°Í¸ʸ»ú¤Ê¤Î¤Ç¡¢»È¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡£ ¤½¤¦¤½¤¦¡¢¤³¤ì¡¢¸¦µæ¼¼¤ÎFreeBSD´Ä¶¤Ç¤Ï¸«¤¨¤Þ¤»¤ó¤Ç¤·¤¿¡£ |
¤¦¡¼¤ó¡¢¤Á¤ç¤Ã¤È¤á¤ó¤É¤¯¤µ¤¤¤±¤É¡¢·Ç¼¨ÈĤò¤¤¤¸¤Ã¤Æ µ¡¼ï°Í¸ʸ»ú¤ò¤Ï¤¸¤¯¤è¤¦¤Ë¤·¤è¤¦¤«¤Ê¡Ä¡£ |
¥Æ¥¹¥È¤¬¤Æ¤é¡¢½ñ¤¹þ¤ß¡£wwwboard.cgi ¤ò¤Á¤ç¤³¤Ã¤È½ñ¤´¹¤¨¤Þ¤·¤¿¡£ ¡Windows µ¡¼ï°Í¸ʸ»ú¤òɽ¼¨»þ¤ËÊÑ´¹¤¹¤ë¤è¤¦¤Ë¤·¤Þ¤·¤¿¡£ ËÜÍè¡¢½ñ¤¹þ¤ß»þ¤ËÊÑ´¹¤¹¤ë¤Î¤¬¥Ù¥¹¥È¤Ç¤¹¤¬¡¢Àµ¤·¤¯ÊÑ´¹¤Ç¤¤Æ¤ë¤« ¤É¤¦¤«¼«¿®¤¬¤Ê¤¤¤Î¤Ç¡¢¤·¤Ð¤é¤¯¤³¤ì¤ÇÍͻҤò¸«¤Þ¤¹¡£ ¢ÆóÅÙ½ñ¤Ëɻߵ¡Ç½¤òÄɲ᣺ǿ·10ȯ¸À¤Î MD5 ¤òÊݸ¤·¡¢ ½ÅÊ£¤·¤Æ¤¤¤¿¤é½ñ¤¹þ¤ß¤Ç¤¤Ê¤¤¤è¤¦¤Ë¤·¤Þ¤·¤¿¡£ ¡Ä¤È¡¢¤¢¤¨¤Æµ¡¼ï°Í¸ʸ»ú¤ò»È¤Ã¤Æ¤ß¤¿¤ê¡£ º£¸å¡¢¤³¤Î·Ç¼¨ÈÄ¤Ç¤Ï Windows µ¡¼ï°Í¸ʸ»ú¤Î»ÈÍѤò¿ä¾©¤·¤Þ¤¹(^^; ¥¹¥¯¥ê¥×¥È¤Ï¤³¤Á¤é¡£http://X68000.startshop.co.jp/~68user/cgi-bin/view-script.cgi/wwwboard.cgi |
¤Ï¤¸¤á¤Þ¤·¤Æ¡¢¤È¤Û¤Û¤µ¤ó¤Î¤È¤³¤í¤«¤é¤ª»Ç¤¤¤µ¤»¤Æ ĺ¤¤Þ¤·¤¿¡£¤Ï¤¸¤á¤Þ¤·¤Æ¡£ ÁᮤǤ¹¤¬¡¢¼«Æ°ÊÑ´¹¤µ¤ì¤¿¡¢ ¡ ¤Î ¡Ö(µ¡¼ï°Í¸ʸ»ú¤Ê¤Î¤Ç¼«Æ°ÊÑ´¹¤·¤Þ¤·¤¿)¡× ¤ÎÉôʬ¡¢Ä¹¤¯¤ÆËÜʸ¤¬ÆɤߤŤ餤¤Î¤Ç¡¢¤¿¤È¤¨¤ÐÊÑ´¹¤·¤¿ Éôʬ¤òº£¤ÎÀÖ¿§¤Î¤Þ¤Þ¡¢¤³¤Î¥Ú¡¼¥¸¤Î²¼¤ÎÊý¤È¤«¤½¤Î¾¤Î ¥Ú¡¼¥¸¤È¤«¤Ë¥ê¥ó¥¯¤òÄ¥¤Ã¤Æ¡¢¤½¤³¤Ë (µ¡¼ï°Í¸ʸ»ú¤Ê¤Î¤Ç¼«Æ°ÊÑ´¹¤·¤Þ¤·¤¿) ¤È¤«½ñ¤¤¤Æ¤¤¤¿¤À¤±¤ì¤Ð¡¢¤¢¤Ã¤µ¤ê¤·¤Æ¸«¤ä¤¹¤È»×¤¦¤Î ¤Ç¤¹¤¬¡¢¤¤¤«¤¬¤Ç¤·¤ç¤¦¤«¡© ¤´¸¡Æ¤Äº¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡£ |
³Î¤«¤Ë¤ª¤Ã¤·¤ã¤ë¤È¤ª¤êÆɤߤˤ¯¤¤¤Î¤Ç¡¢¤³¤ó¤Ê¤Õ¤¦¤Ë¤·¤Æ¤ß¤Þ¤·¤¿¡£ ¤¤¤«¤¬¤Ç¤·¤ç¤¦¤«¡£ |
# ¤Ï¤¸¤á¤Þ¤·¤Æ¤¬¡¢°úÍÑÉä¤ß¤¿¤¤¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤Æ¡¢¤à¤Ã¤Á¤ãÃѤº¤«¤·¤¤¡¦¡¦¡¦ Áᮾ¤·¤Æ夤¤Æ¡¢¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£¤«¤Ê¤ê¸«¤ä¤¹¤¯¤Ê¤Ã¤¿¤È»×¤¤¤Þ¤¹¡£ ¤·¤«¤â¡¢ÊÑ´¹¤·¤¿¾ì¹ç¤À¤±Ãí¼á¤¬½Ð¤ë¡¢¤È¤¤¤¦¤È¤³¤í¤¬¡¢¤«¤Ã¤³¤¤¤¤¤Ç¤¹¤Í¡£ ´Ø·¸Ìµ¤¤¤Ç¤¹¤¬¡¢ÌÜΩ¤¿¤»¤¿¤¤¤¬¤¿¤á¤Ë¡¢¤ï¤¶¤ÈWindows µ¡¼ï°Í¸ʸ»ú¤ò»È¤¦ ¤³¤È¤â½ÐÍ褽¤¦¤Ç¤¹¤Í¡£ ¤¢¤È¡¢¡ÖHTTP¥¯¥é¥¤¥¢¥ó¥È¤òºî¤Ã¤Æ¤ß¤è¤¦¡×¤Î ¡Ö¤µ¤é¤Ê¤ë²þÁ±ÅÀ¡¦¥Ð¡¼¥Á¥ã¥ë¥Û¥¹¥È¤ËÂбþ¡×¤Ë¤Ä¤¤¤Æ¡¢¼ÁÌ䤬¤¢¤ê¤Þ¤¹¡£ http://www.host2.com/index.html ¤ËÂФ·¤Æ¡¢ GET /index.html HTTP/1.0 host: www.host2.com:80 ¤È¥ê¥¯¥¨¥¹¥È¤¹¤ëÎ㤬¤¢¤ê¤Þ¤¹¤¬¡¢RFC2616¤Î2045¹Ô¶áÊÕ¤òÅö¤Æ¤Ï¤á¤ë¤È¡¢ ¤³¤ÎÎã¤Ç¤Ï¥Ý¡¼¥ÈÈÖ¹æ¤Ï¤¤¤é¤Ê¤¤¤è¤¦¤Ë»×¤ï¤ì¤Þ¤¹¤¬¡¢¤¤¤«¤¬¤Ç¤·¤ç¤¦¤«¡© HTTP/1.0¤Ç¤ÏɬÍפʤΤ«¤Ê¡¢¤È»×¤Ã¤ÆRFC1945¤òÆɤó¤Ç¤ß¤¿¤ó¤Ç¤¹¤¬¡¢¤É¤¦ ¤·¤Æ¤âõ¤·Åö¤ì¤é¤ì¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢Ã±¤Ê¤ë»ä¤Î´ª°ã¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¦¡¦¡¦ µ¹¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£ |
¤´°Õ¸«¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£ftp://ftp.iij.ad.jp/pub/RFC/rfc2616.txt ¤Ë¤Ï¡¢ 3.2.2 http URL If the port is empty or not given, port 80 is assumed. ¤È¤¢¤ë¤Î¤Ç¡¢¡Ö80 ¤Ê¤é¾Êά¤¹¤Ù¤·¡×¤È·è¤Þ¤Ã¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤Ç¤¹¡£¤Ê¤Î¤Ç :80 ¤ÏÉÕ¤±¤Æ¤âÉÕ¤±¤Ê¤¯¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£ ¤¿¤À¡¢³Î¤«¤Ë¡Ö80¤Î¾ì¹ç¤Ï¾Êά¤·¤Æ¤â¤è¤¤¡×¤È¤¤¤¦¤Î¤Ï½ñ¤¤¤Æ¤ª¤¤¤¿ Êý¤¬¤è¤¤¤È»×¤¦¤Î¤Ç¡¢Ä¾¤·¤Æ¤ª¤¤Þ¤¹¡£ # ¤¬¡¢¤³¤ì¤Ï Host: ¤Ë¸Â¤Ã¤¿¤³¤È¤Ç¤Ï¤Ê¤¯¡¢URL °ìÈ̤ÎÏäʤΤǡ¢ # ¤É¤³¤Ç²òÀ⤷¤¿¤é¤¤¤¤¤Î¤«Çº¤à¤È¤³¤í¤À¤Ê¤¡¡Ä¡£ |
¸æ²óÅú¡¢¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£ ¤Ê¤ë¤Û¤É¡¢Ìµ¤¤¾ì¹ç¤Ï80¤¬²¾Äꤵ¤ì¤ë¤ó¤Ç¤¹¤Í¡£ http://www.host2.com/ ¤Î¡¢ www.host2.com ¤ÈÁ´¤¯Æ±¤¸Ê¸»ú¤ò¡¢ host: ¤Î¸å¤Ë½ñ¤¯É¬Íפ¬¤¢¤ë¤ó¤«¤Ê¡¢¤È »×¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢¾ï¤ËÉÕ¤±¤Æ¤¤¤Æ¤âÌäÂê¤Ê¤¤¤Î¤Ç¤¹¤Í¡£¤ï¤«¤ê¤Þ¤·¤¿¡£ ¤Þ¤¿Ê¬¤«¤é¤Ê¤¤¤³¤È¤¬¤¢¤Ã¤¿¤é¡¢¼ÁÌ䤵¤»¤Æĺ¤¤Þ¤¹¤Î¤Ç¡¢¤½¤Î»þ¤Ïµ¹¤·¤¯ ¤ª´ê¤¤Ãפ·¤Þ¤¹¡£ |
¤³¤ó¤Ë¤Á¤ï¡ª¤³¤Î£È£Ð¤ÇºÇ¶áÊÙ¶¯¤µ¤»¤Æ¤â¤é¤Ã¤Æ¤Þ¤¹¡ª ¤È¤³¤í¤Ç¡¢FTP¥¯¥é¥¤¥¢¥ó¥È¤òC¸À¸ì¤Ç½ñ¤¯Í½Äê¤Ï̵¤¤¤Î¤Ç¤·¤ç¤¦¤«¡© °ì±þ¸«¤è¤¦¸«¤Þ¤Í¤Ç¤³¤Î£È£Ð¤Î¥Ñ¡¼¥ë¤Ç½ñ¤«¤ì¤¿¥½¡¼¥¹¤«¤é C¤Ç½ñ¤¤¤Æ¤ß¤¿¤Î¤Ç¤¹¤¬¡¢¸«»ö¼ºÇÔ¡ª ¡Ê¶ñÂÎŪ¤Ë¤¤¤¦¤È¡¢getsockname¤Î»È¤¤Êý¤¬man¤Ç¤·¤é¤Ù¤Æ¤â ¤è¤¯¤ï¤«¤é¤Ê¤«¤Ã¤¿¤Î¤Ç¤¹¡Êµã¡Ë¤Ç¤¤ì¤Ð¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡ª¡Ë ¤Ç¤¹¤«¤é¡¢ÀâÌÀ̵¤·¤Ç¤â¥½¡¼¥¹¤À¤±¥¢¥Ã¥×¤·¤Æ¤â¤é¤¨¤¿¤é¤Ê¡Á¡¢ ¤Ê¤ó¤Æ¼«Ê¬¾¡¼ê¤Ê¤³¤È¤ò»×¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤Þ¤¹¡£¡Ê¤´¤á¤ó¤Ê¤µ¤¤¡Ë ¤¢¤ë¤¤¤Ï¡¢£Ã¤Ç¤«¤«¤ì¤¿£Æ£Ô£Ð¥¯¥é¥¤¥¢¥ó¥È¤ò¥¢¥Ã¥×¤·¤Æ¤¤¤ë £È£Ð¤¬¤¢¤ê¤Þ¤·¤¿¤é¡¢¤´¾Ò²ð¤¤¤¿¤À¤±¤ë¤È¹¬¤¤¤Ç¤¹¡ª |
¤³¤ó¤Ë¤Á¤ï¡¢¤Ï¤¸¤á¤Þ¤·¤Æ¤¢¤Ã¤Á¡¼¤È¤¤¤¤¤Þ¤¹¡£ ºÇ¶á¼«Ê¬¤Î¥Ñ¥½¥³¥ó¤ËLinux¤òÆþ¤ì¤Þ¤·¤¿¡£ ¤Ç¤â¥³¥Þ¥ó¥É¤Î»È¤¤Êý¤È¤«Á´Á³¤ï¤«¤ê¤Þ¤»¤ó¡£ ¤Ê¤ó¤È£øWindow¤òΩ¤Á¾å¤²¤Æ¥µ¥¦¥ó¥É¤ÎÀßÄê¤Þ¤Ç¤Ç¤¤Þ¤·¤¿¤¬ CD-ROM¤¬³°ÉÕ¤±¤Ê¤¿¤áCDROM¤Ó¥¢¥¯¥»¥¹¤Ç¤¤Þ¤»¤ó¡£ CD¥×¥ì¥¤¥ä¡¼¤òΩ¤Á¾å¤²¤ë¤Èerorr¤È½Ð¤Æ¤¤Þ¤¹¡£ mount¤ÎÀßÄê¤Ê¤Î¤Ç¤·¤ç¤¦¤«¡© ¥Ñ¥½¥³¥ó¤ÏSony VAIO¤ÇPCG505S¤Ç¤¹¡£ CD-ROM¤ÏPCGA-CD5¤Ç¤¹¡£ ¤¤¤¤Ê¤ê·Ç¼¨ÈĤ˽ñ¤¤¤¿ÆâÍƤ¬¤³¤ó¤Ê¤Ç¤¹¤¬ ¤â¤·¤è¤í¤·¤±¤ì¤Ð¤É¤Ê¤¿¤«¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£ ¤³¤ì¤«¤éLInux¤ÈUnix¤ÎÊÙ¶¯¤ò»Ï¤á¤Æ¤¤¤¤Þ¤¹¡£ ¤è¤í¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£ |
Kai¤µ¤ó¤ñ¡£ ñ¤ËFTP¤¬»È¤¤¤¿¤¤¡¢¤Æ¤À¤±¤Ê¤é¤Ð CPAN¤Ë¹Ô¤±¤ÐPerlÍѤÎFTP¥â¥¸¥å¡¼¥ë¤¬ÃÖ¤¤¤Æ¤¢¤ë¤Ê¤ê¥ç¡£ |
> ¶ñÂÎŪ¤Ë¤¤¤¦¤È¡¢getsockname¤Î»È¤¤Êý¤¬man¤Ç¤·¤é¤Ù¤Æ¤â > ¤è¤¯¤ï¤«¤é¤Ê¤«¤Ã¤¿¤Î¤Ç¤¹¡Êµã¡Ë ËͤâÃΤê¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¢ºòÆü¤«¤éÄ´¤Ù¤Æ¤¤¤Æ¤ä¤Ã¤È¤Ç¤¤Þ¤·¤¿¡£ struct sockaddr_in local_socket; int len; long local_ip; len = sizeof(local_socket); if ( getsockname(socket,(struct sockaddr *)&local_socket,&len) < 0 ){ printf("getsockname failed.\n"); } local_ip = ntohl(local_socket.sin_addr.s_addr); printf("PORT %d,%d,%d,%d,%d,%d\n", (local_ip >> 24) & 0xff, (local_ip >> 16) & 0xff, (local_ip >> 8) & 0xff, (local_ip ) & 0xff, (ntohs(local_socket.sin_port) >> 8) & 0xff, (ntohs(local_socket.sin_port) ) & 0xff); # ¤ï¤«¤Ã¤Æ¤«¤é man ¤òÆɤà¤È¡¢²¿¤¬½ñ¤¤¤Æ¤¢¤ë¤«Íý²ò¤Ç¤¤ë¤ó¤À¤±¤É¤Ê¤¡¡£ > ¤¢¤ë¤¤¤Ï¡¢£Ã¤Ç¤«¤«¤ì¤¿£Æ£Ô£Ð¥¯¥é¥¤¥¢¥ó¥È FreeBSD ¤¢¤¿¤ê¤Ê¤é ftp¥³¥Þ¥ó¥É http://www.jp.FreeBSD.org/cgi/cvsweb.cgi/src/usr.bin/ftp/ fetch¥³¥Þ¥ó¥É http://www.jp.FreeBSD.org/cgi/cvsweb.cgi/src/usr.bin/fetch/ ftp¥é¥¤¥Ö¥é¥ê(fetch¤¬¥ê¥ó¥¯¤·¤Æ¤¤¤ë) http://www.jp.FreeBSD.org/cgi/cvsweb.cgi/src/lib/libftpio/ ¤Ê¤É¤Ê¤É¡£FreeBSD °Ê³°¤Î´Ä¶¤Ç¥³¥ó¥Ñ¥¤¥ë¤·¤è¤¦¤È¤¹¤ë¤È ¶ìÏ«¤¹¤ë¤Ç¤·¤ç¤¦¤«¤é¡¢¥½¡¼¥¹¤òÆɤà¤À¤±¤Ë¤·¤Æ¤ª¤¯¤Î¤¬¤¤¤¤¤Ç¤·¤ç¤¦¡£ º£²ó»²¹Í¤Ë¤·¤¿¤Î¤Ï (·ë²ÌŪ¤Ë¤Ï´Ý¼Ì¤·¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤±¤É) http://www.jp.FreeBSD.org/cgi/cvsweb.cgi/src/lib/libftpio/ftpio.c?rev=1.33 ¤Ç¤¹¡£ > CD¥×¥ì¥¤¥ä¡¼¤òΩ¤Á¾å¤²¤ë¤Èerorr¤È½Ð¤Æ¤¤Þ¤¹¡£ > mount¤ÎÀßÄê¤Ê¤Î¤Ç¤·¤ç¤¦¤«¡© mount ¤ÏɬÍפʤ¤¤Ç¤¹¡£²»³ÚCD¤òʹ¤¯¤Ë¤Ï¡¢ ¡ÖCD-ROM¥É¥é¥¤¥Ö¤Ë²¿¶ÊÌܤòÌĤ餻¡× ¤È¤¤¤¦»ØÎá¤òÁ÷¤ë¤À¤±¤Ç¡¢¸å¤Ï CD-ROM ¥É¥é¥¤¥Ö¤¬¾¡¼ê¤Ë¤ä¤Ã¤Æ¤¯¤ì¤Þ¤¹¡£ ¤Ç¡¢¤ª»È¤¤¤Î¥×¥ì¥¤¥ä¡¼¤Î -device ¤È¤« -d ¤È¤«¤Î¥ª¥×¥·¥ç¥ó¤Ç¡¢ CD-ROM ¥É¥é¥¤¥Ö¤Î¥Ç¥Ð¥¤¥¹¤ò»ØÄê¤Ç¤¤Þ¤»¤ó¤«? # FreeBSD ¤Ê¤é xcdplayer -device /dev/wcd0c ¤È¤« # xcdplayer -device /dev/cd0c ¤Ç¤¹¤±¤É¡¢Linux ¤ÏÃΤê¤Þ¤»¤ó¡£ |
¥µ¥ó¥×¥ë¤âºî¤Ã¤Æ¤ß¤Þ¤·¤¿¡£anonymous ftp ¤Ç¡¢ ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/README.TXT ¤ò¼èÆÀ¤·¤Þ¤¹¡£ http://X68000.startshop.co.jp/~68user/tmp/ftp-client.c ¥ì¥¹¥Ý¥ó¥¹¥³¡¼¥É¤Ï¸«¤Æ¤¤¤Ê¤¤¤·¡¢¥Ð¥Ã¥Õ¥¡¥ª¡¼¥Ð¡¼¥é¥ó¤Ï¤¹¤ë¤·¡¢ RFC¤Ë½àµò¤·¤Æ¤¤¤Ê¤¤¤·¡¢¥Õ¥¡¥¤¥ë¤¬¤Ê¤«¤Ã¤¿¤é¥Ç¥Ã¥É¥í¥Ã¥¯¤¹¤ë¤·¤Ç¡¢ ¥Ð¥°¤À¤é¤±¤Ç¤¹¤¬¡¢²þ¤¤·¤Æ¤ß¤Æ²¼¤µ¤¤¡£ |
¤ª¤ª¡ª¤É¤¦¤â¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡ª¡ä68userÍÍ¡õ¤à¤Á¤Ê¤Á¤å¤Ü¡ÁÍÍ Áᮤ³¤ì¤ò»²¹Í¤Ë´èÄ¥¤Ã¤Æ¤ß¤¿¤¤¤È»×¤¤¤Þ¤¹¡ª¡ª¡ª ¤Û¤ó¤È¤¦¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡ª¡ª¡ª |