<��������(2006ǯ07��08��) ��������(2006ǯ07��17��)> �ǿ� �Խ�

���ڹ��������������

�ܼ� �Ϥ���� Ϣ����:[email protected]
ˬ��Կ� ����: 241   ����: 1310

2006ǯ07��16��

�� Winny��ư����ԥ塼����Ĵ�����ɻ�򤷤Ƥߤ�

Winny�ͥåȥ���ε��ϡ�Ʊ����ư�Ρ��ɿ��ˤο�פˤĤ��Ƥϡ��Ť���3ǯ���Υͥåȥ������Ҥξ��ܻ�ˤ���Ρ������ƥͥåȥ���������ȼҤο�����ˤ���Ρ�����˺Ƕ�Ǥ�eEye Digital Security�Ҥα������ˤ���Τ����롣

  • �ͥåȥ�������P2P�Ρ��ɤμ�ưõ�������ƥ���Ư, INTERNET Watch, 2003ǯ7��14��

    �ͥåȥ�������14����P2P�Ρ��ɤμ�ưõ�������ƥ��P2P FINDER�פ��Ư���Ϥ�����ȯɽ������WinMX��Winny�ι���Ρ��ɤ��оݤȤʤäƤ��ꡢ6��3������7��14���ޤǤ�20��5,597�Ρ��ɤ�ȯ�����줿�Ȥ��Ƥ��롣

  • �ͥåȥ�������8��1�������Ǥ�Winny��WinMX�����ѼԿ���56������, INTERNET Watch, 2003ǯ8��4��

    ������ҥͥåȥ������ϡ�Ʊ�Ҥ�P2P�Ρ��ɤμ�ưõ�������ƥ��P2P FINDER�פβ�ư������ȯɽ����8��1�������ǡ�Winny�פȡ�WinMX�פ����ѼԿ���561,459�Ρ��ɤ�ã��������𤷤���

    ��ά����Ψ�Ȥ��Ƥ�WinMX��Winny��3��1���٤��Ȥ��Ƥ��롣

    �ͥåȥ�������6��16���ˡ�P2P�ͥåȥ������Ĵ��2003�פ�ȯɽ���Ƥ��ꡢ���λ����Ǥ�WinMX��3��2,882�Ρ��ɡ�Winny��3�� 2,496�Ρ��ɤǡ����6��5,378�Ρ��ɤ��ä����鷺��1�����3�ܰʾ�����ä����褦�˸����뤬�������ǤϤʤ��褦���������Ư�򳫻Ϥ���P2P FINDER�ϡ������Ĵ�������Ѥ��������ƥ����塼�˥󥰤�����Τˤ����ꡢ��ǽ����ˤ�ä�ȯ���Ρ��ɤ����������ä����Ȥ������Ĥޤꡢ�����ߤ��� P2P�Ρ��ɿ�������ˤ��ꡢ����򤹤٤�Ĵ�٤���Ƥ��ʤ��סʾ���ľ����ɽ������ˤΤ��¾��餷����

  • ǯ��ǯ�Ϥ�Winny��³�����á��ͥåȥ���������Ȥ�����ή��Ĵ�������ӥ�, INTERNET Watch, 2005ǯ12��26��

    Ʊ�Ҥ�Winny���Υ����ƥ��ȯ�������顢2004ǯ5���������³����27��5,133�Ρ��ɡʥͥåȥ����������Ĵ�١ˤ��ä���2005ǯ12��ˤʤäƤ�Winny�ͥåȥ���ˤ���30���Ρ��ɤ���³���Ƥ��ꡢWinny��ͳ�ξ���ή�Ф��꼡���Ǥ���ˤ�ؤ�餺�����ѼԤϸ������Ƥ��ʤ���������

  • Winny�ΥΡ��ɿ��˸��������ʤ����ͥåȥ���������Ȥ�Ĵ��, INTERNET Watch, 2006ǯ4��25��

    �ͥåȥ���������Ȥ�25����P2P���ե����붦ͭ���եȡ�Winny�פΥΡ��ɿ���ȯɽ������4��10������23���ˤ������ȼ���Winny���Υ����ƥ��Ȥä�Ĵ��������Ρ�ʿ����44����49������������50����53���ʾ�ΥΡ��ɿ����¬�����Ȥ�����

    ��ά�˥ͥåȥ���������ȤǤ�Ʊ���ȼ��θ��Υ����ƥ��11���Ư���뤳�Ȥǡ�ʿ���DZ����350����ΥΡ��ɾ���������IP���ɥ쥹�ʤɤǽ�ʣʬ�������ƥ�ˡ����Ρ��ɿ�����ꤷ�Ƥ���Ȥ�����

  • �֥����륹���о�ϻ��֤����ꡢWinny�λ��ѤϺ�������ߤ��Ƥۤ����ס�Winny���ȼ�����ȯ��������eEye�α���͵�ʻ�, INTERNET Watch, 2006ǯ5��25��

    �������ϡ�Winny�Υץ��ȥ�����ư����Ϥ���Winny�ͥåȥ���˻��ä��Ƥ���桼�����ΰ���������֤Ǽ����Ǥ��륷���ƥ�Ⳬȯ���������ߡ�����������Υ桼������Winny�ͥåȥ���˻��ä��Ƥ��뤳�Ȥ���¬����Ƥ��ꡢ����Ū�ˤ�100�������٤Υ桼������¸�ߤ���ΤǤϤʤ����ȿ�¬���Ƥ��롣

���䡢���ͦ��������Winny�ε��ѡסʥ��������ˤ䡢����NETWORK��ε�����Winny���̿����ɤ�ĩ��פʤɤˤ�äơ�Winny�ץ��ȥ���λ��ͤϸ��ΤȤʤäƤ��ꡢ��������Ĵ����ʿ��Ū�ʥץ�����ޤʤ��ï�Ǥ��ǽ�ʾ����ˤ���Ȥ����롣��⡢�����δ�¸��Ĵ���γΤ������ǧ���뤿�ᡢ�ɻ��ԤäƤߤ���

���Ѥ�������ڤӴĶ��ϰʲ��Ǥ��롣

  • �Ť��Ρ���PC 1��
    • CPU: Pentium III 900MHz-M
    • �ᥤ�����: 512MB
  • Windows XP Professional SP1
  • Java Runtime Environment Version 5.0 Update 7
  • �¸����祹�롼�ץå� 7 Mbps ���٤� ADSL������100BASE-TX����³�� 1��
  • �ǡ�����Ͽ��LAN��³�ϡ��ɥǥ��������֡�̵��LAN 802.11b����³�� 1��

Ĵ���˻��Ѥ����ץ������Υ��르�ꥺ����2�˼��������ꤵ�줿�Ρ��ɡʥۥ���̾�ȥݡ����ֹ���ȡˤ��Ф���TCP/IP����³����Winny�ץ��ȥ���ˤ������äƥ��ޥ��10�ʡֳȻ������������׵�סˤ����������ʤ��顢��³�褫��Υ��ޥ�ɤ�������롣�����������ޥ��4�����13����¾�ΥΡ��ɤˤĤ��Ƥξ������Ф��������˸��Ĥ��ä��Ρ��ɤ�ͥ�����դ��������Ԥ�������������ơ�����åɿ�800�Υ���åɥס�����Ѥ���Ʊ���¹�Ū�ˤ����ˤĤ���Ʊ�������򷫤��֤���ͥ���٤ϡ����ΥΡ��ɾ���κ�������ο�������Τ�ͥ�褹���ΤȤ������������Ԥ����󤬶��ˤʤꡢ������Υ���������λ�������ߤ���*1����³�ˤĤ��Ƥϡ���³��ǽ���顼ȯ������1�����ߤ����ΤȤ���������³���ˤ�30�ðʾ�в᤹������Ǥ����ΤȤ�����

�¹����Windows�Υ������ޥ͡�����Ǵ�¬�����Ȥ����ˤ��ȡ�CPU�λ���Ψ�� 60% �� 80% ���١����󥿡��ͥå�¦�ͥåȥ�����̿�����®�٤Ϻ��� 2 Mbps ���١��ǡ�����Ͽ¦�ͥåȥ����ʿ�� 0.8 Mbps���٤ȡ��������ܥȥ�ͥå��ȤϤʤäƤ��ʤ��褦���ä���

���ΤȤ��μ¸���̤��1�˼�������˥������Ϥ򥰥�ղ�������Τǡ������Ϸв���֡��áˡ��ļ��ϥΡ��ɿ����ֿ��ʾ�ˤΥץ��åȤϤ��λ���ˤ����븫�Ĥ��ä��Ρ��������ʽ�ʣ�����ˤǤ��ꡢ�п��ʿ�����ˤ���³���߽����������Ŀ��ʲ��ˤ���³������˴�λ�ʥ��ޥ��97��0��1��2��3�Υϥ�ɥ��������������󥹤�����˴�λ�ˤ����������Ǥ��롣

��1: �¹Է�̡ʳ��ϻ��� 2006ǯ7��16������������10����

���Τ褦�ˡ�3����20ʬ�ۤɤ�39���Ρ��ɤ�ȯ�������Τ��٤Ƥ���³���Ԥ��������Τ�����57 % �ΥΡ��ɤ���³������������1��������ʿ�� 32.5�Ρ��ɤ��Ф�����³��ԤǤ������Ȥˤʤ롣

�ʲ��ϥ�˥������Ϥ���Ƭ����ʬ�ȺǸ����ʬ�Ǥ��롣

      0;       0,      0,      0,      0,   NaN%,   NaN%;       0;     2;    NaN,   NaN
     10;    2492,     33,      0,      0,   0.0%,   0.0%;    1659;   802;  3.500, 0.000
     20;   16565,     90,     34,     33,  37.8%,  36.7%;   15676;   802;  4.500, 1.700
     30;   19826,    203,     58,     57,  28.6%,  28.1%;   18823;   802;  6.767, 1.933
     40;   24152,    736,    556,    525,  75.5%,  71.3%;   22797;   802;  18.425, 13.925
     50;   30748,    910,    686,    649,  75.4%,  71.3%;   29038;   802;  18.200, 13.720
     60;   34058,   1086,    794,    757,  73.1%,  69.7%;   32177;   802;  18.100, 13.233
     70;   38849,   1424,   1051,   1009,  73.8%,  70.9%;   36632;   802;  20.343, 15.014
     80;   42730,   1757,   1322,   1273,  75.2%,  72.5%;   40173;   802;  21.962, 16.525
     90;   44970,   1932,   1451,   1399,  75.1%,  72.4%;   42238;   802;  21.467, 16.122
    100;   48513,   2332,   1721,   1654,  73.8%,  70.9%;   45384;   802;  23.320, 17.210
    110;   51283,   2636,   1971,   1896,  74.8%,  71.9%;   47850;   802;  23.964, 17.918
    120;   53646,   2865,   2097,   2019,  73.2%,  70.5%;   49984;   802;  23.875, 17.475
    130;   56392,   3217,   2354,   2268,  73.2%,  70.5%;   52379;   802;  24.746, 18.108
    140;   58784,   3487,   2566,   2477,  73.6%,  71.0%;   54498;   802;  24.907, 18.329
    150;   61268,   3767,   2747,   2655,  72.9%,  70.5%;   56706;   802;  25.113, 18.313
    160;   63774,   4094,   2996,   2899,  73.2%,  70.8%;   58894;   802;  25.587, 18.725
    170;   66206,   4382,   3194,   3093,  72.9%,  70.6%;   61024;   802;  25.776, 18.788
    180;   68231,   4652,   3385,   3277,  72.8%,  70.4%;   62780;   802;  25.844, 18.806
    190;   70664,   4967,   3630,   3518,  73.1%,  70.8%;   64905;   802;  26.142, 19.105
    200;   72863,   5300,   3859,   3743,  72.8%,  70.6%;   66765;   802;  26.500, 19.295
    210;   74593,   5572,   4051,   3932,  72.7%,  70.6%;   68221;   802;  26.533, 19.290
    220;   76438,   5894,   4250,   4128,  72.1%,  70.0%;   69744;   802;  26.791, 19.318
����
  11890;  388941, 386167, 219832, 215572,  56.9%,  55.8%;    1977;   802;  32.478, 18.489
  11900;  388978, 386476, 220028, 215767,  56.9%,  55.8%;    1703;   802;  32.477, 18.490
  11910;  389023, 386790, 220225, 215961,  56.9%,  55.8%;    1439;   802;  32.476, 18.491
  11920;  389071, 387119, 220429, 216157,  56.9%,  55.8%;    1156;   802;  32.476, 18.492
  11930;  389120, 387448, 220622, 216346,  56.9%,  55.8%;     876;   802;  32.477, 18.493
  11940;  389162, 387741, 220787, 216510,  56.9%,  55.8%;     630;   802;  32.474, 18.491
  11950;  389201, 388087, 220994, 216714,  56.9%,  55.8%;     332;   802;  32.476, 18.493
  11960;  389235, 388393, 221188, 216907,  56.9%,  55.8%;      47;   802;  32.474, 18.494
  11970;  389254, 388660, 221363, 217080,  57.0%,  55.9%;       0;   802;  32.470, 18.493
  11980;  389261, 388954, 221565, 217282,  57.0%,  55.9%;       0;   802;  32.467, 18.495
  11990;  389265, 389161, 221748, 217459,  57.0%,  55.9%;       0;   802;  32.457, 18.494
  12000;  389273, 389246, 221828, 217539,  57.0%,  55.9%;       0;   802;  32.437, 18.486
  12010;  389282, 389264, 221844, 217555,  57.0%,  55.9%;       0;   802;  32.412, 18.472
  12020;  389286, 389270, 221847, 217558,  57.0%,  55.9%;       0;   802;  32.385, 18.456
  12030;  389287, 389275, 221851, 217562,  57.0%,  55.9%;       0;   802;  32.359, 18.441
  12040;  389288, 389282, 221857, 217568,  57.0%,  55.9%;       0;   802;  32.332, 18.427
  12050;  389288, 389284, 221859, 217570,  57.0%,  55.9%;       0;   802;  32.306, 18.412
  12060;  389288, 389287, 221862, 217573,  57.0%,  55.9%;       0;   802;  32.279, 18.397
  12070;  389288, 389288, 221863, 217574,  57.0%,  55.9%;       0;   802;  32.253, 18.381
  12080;  389288, 389288, 221863, 217574,  57.0%,  55.9%;       0;   802;  32.226, 18.366
  12090;  389288, 389288, 221863, 217574,  57.0%,  55.9%;       0;   802;  32.199, 18.351

���Τ褦�ˡ���³����������Ρ��ɤγ��Ϻǽ�Τ����� 70 % ���٤����Τ�����˸������Ƥ��������θ����ˤĤ��ƤϤޤ���Ƥ���Ƥ��ʤ�����³���������ʤ��Ρ��ɤϡ���Port0�ץ⡼�ɤDz�ư���Ƥ����Ρʤ⤷���ϡ�Port0�פ����ꤷ�Ƥ��ʤ���NAT�롼���Υݡ��ȥե�������꤬�Ǥ��Ƥ��ʤ���Ρˤȿ���Ǥ��롣

5���ܤ���ϡ���³�˴�λ���Ƥ�������¾�ΥΡ��ɾ��������Ǥ����Ρ��ɿ��򼨤��Ƥ��ꡢ��³�����Ρ��ɤ� 98 % ����������Ǥ������Ȥ��狼�롣����ϡ����Τ��󤹤뤳�Ȥ�ͥ�褷����³����������Ǥ��Ƥ��뤬����³���³���뤳�Ȥˤ�äƤ��γ���100 % �˶�Ť��Ȼפ��롣

����ν�������������˼»ܡˤǸ��Ĥ��ä� 38��9288�Ρ��ɤȤ������ϡ��ͥåȥ���������ȼҤ�ȯɽ������ʿ����44����49������������50����53���ʾ�פȤ����ͤ�ꤤ���������ʤ���Ʊ�Ҥ�7��3����ȯɽ�Ǥ⡢

2006ǯ7��1�����ڡˤ�Winny�Ρ��ɿ���471449��2006ǯ7��2�������ˤ�Winny�Ρ��ɿ���481359�Ǥ��뤳�Ȥ�����WinnyĴ�������ƥ�ˤ���¬����ޤ�����

�ȤʤäƤ��롣����Υץ�����ब�����ΥΡ��ɤ���ã���뤳�Ȥ��Ǥ��ʤ��ä���ǽ���ȡ�7����ܤ����ѼԤ��������Ƥ����ǽ�����ͤ����롣

�����ΥΡ��ɤ���ã���ʤ���ǽ���θ����Ȥ��ơ�Winny�ͥåȥ���Ρ֥��饹������ư��ˤ�ꡢ�����Ĥ���Winny�Ρ��ɥ��饹������ã�Ǥ��ʤ��ä��Ȥ������Ȥ��ͤ����롣��������Winny�Ρ֥��饹�����פϡ��桼���ˤ����ꤵ�줿3�İʲ��Υ�����ɤ�������ˤ�깽��������ΤǤ��뤿�ᡢ��A, B�פ���ꤷ�Ƥ���桼���ȡ�A, C�פ���ꤷ�Ƥ���桼��������С�A�Υ��饹�����ͳ����B�Τ����C�Τ���ϤĤʤ��äƤ��뤳�Ȥˤʤ뤳�ȡ��ޤ������饹��ʬ���ϴˤ䤫�˹�������Ƥ����ΤǤ��뤳�Ȥ��顢������ʬΥ��Ω�������饹���Ȥ�����Τ�¸�ߤ��ʤ��ȹͤ����뤷�������¤˷�礷�����饹����¸�ߤ�ͤ��ˤ�����

��1�Υ���դǡ�ȯ���Ρ��ɿ����޷�����ä��븽�ݤ򼨤��Ȥ�����2�ս�λ���Ǥߤ��뤬������ϡ������ʥ��饹�������Ĥ��ä��Ȥ��������ߥ󥰤򼨤��Ƥ���褦�˸����롣����Υ��르�ꥺ��ϡ��Ρ��ɾ���ο�������Τ�ͥ�褷�Ƥ��ꡢ�ۤ�LIFO�ʥ����å��ˤν���Ǽ¹Ԥ��Ƥ���*2���ᡢ���Ʊ�����饹���ΥΡ��ɤ�õ���ڤä�����̤Υ��饹���ΥΡ��ɤ�õ���Ȥ���������ư��򤷤Ƥ��뤳�Ȥˤʤ롣�Ρ��ɤ�˰�¤��ƿ������Ρ��ɤ��ۤȤ�ɸ��Ĥ���ʤ��ʤ�ȡ��Ť��Ρ��ɾ����Ȥ��Ϥᡢ�Ť���Τ򤤤��餫�ȤäƤ��뤦���ˤ��Τ褦�ʵ޷�ʿ����Ρ���ȯ�����äθ��ݤ��������褦�Ǥ��롣

����μ¸��Ǥ� 57 % �ΥΡ��ɤˤ�����³���Ƥ��ʤ��Τ����顢��³�Ǥ��ʤ��ä��Ĥ�ΥΡ��ɤ���³���Ƥ������ã���Ƥ������饹����¸�ߤȤ�����Τ�ͤ����뤬�����β�ǽ�����㤤�褦�˻פ��롣�������ˡ��޷�˥Ρ��ɿ������ä��븽�ݤ�����1�ĤΥΡ��ɡʤ⤷���Ϥ����鷺���ˤˤ�äƤΤ߰��������������Τ��Ȳ��ꤹ��С����Τ褦�ʲ�ǽ���⿮�������ФƤ��뤬������ϡ��ǽ�ˤ��Τ褦�ʥΡ��ɤ��������줿�����ǡ���ˤ�������é���뿷�������饹���ΥΡ��ɤ�ͥ�褷�ƽ������뤳�Ȥˤʤ뤿�ᡢ�޷�ʷ��Ǹ����Ƥ�������ǡ������å��Τ������ˤ�¾�ˤ�Ʊ�ͤΥΡ��ɡʿ��������饹���إ�󥯤��Ƥ���Ρ��ɡˤ�¿��¸�ߤ��Ƥ���ȹͤ���Τ������Ȼפ��롣��������ȡ�Ⱦʬ���٤ΥΡ��ɤ�Ĵ�٤ʤ����Ȥˤ�ä���ã�Ǥ��ʤ����饹����������Ȥ�����ǽ���ϡ������ƾ������ΤǤϤʤ�����

���塢ͥ���٤�ɾ����ˡ���ѹ����Ƽ¸��򤹤뤳�Ȥˤ�ꡢ�㤦�ѥ�����ν���ǤΥΡ��ɽ����Ƥߤ�����

package jp.takagi_hiromitsu.winny.crawler;
import java.io.*;
import java.net.*;
import java.util.Set;
import java.util.HashSet;
import java.util.Map;
import java.util.HashMap;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.TimeUnit;
import jp.takagi_hiromitsu.winny.net.WinnyProtocolInterpreter;
import jp.takagi_hiromitsu.winny.net.WinnyProtocolException;
import jp.takagi_hiromitsu.winny.net.WinnyCommandVisitor;
import jp.takagi_hiromitsu.winny.net.WinnyProtocolCommander;
import jp.takagi_hiromitsu.winny.net.Command3;
import jp.takagi_hiromitsu.winny.net.Command4;
import jp.takagi_hiromitsu.winny.net.Command13;
import jp.takagi_hiromitsu.winny.net.Command10;
import jp.takagi_hiromitsu.winny.Node;
import jp.takagi_hiromitsu.winny.WinnyKey;
import jp.takagi_hiromitsu.winny.WinnyFileID;
import jp.takagi_hiromitsu.winny.WinnyConfiguration;

public class WinnyWalker {
    Set<Node> foundNodes = new HashSet<Node>();
    final int startTime = currentTime();
    int connectionTriedCount = 0;
    int handshakeSucceededCount = 0;
    int extractionSucceededCount = 0;
    static final int MAX_THREADS = 800;
    ThreadPoolExecutor threadPool;
    final Timer timer = new Timer(true);
    WinnyConfiguration conf = new WinnyConfiguration();
    WinnyWalker(Node initialNode) {
        threadPool = new ThreadPoolExecutor(
            MAX_THREADS, MAX_THREADS, 0L, TimeUnit.SECONDS,
            new PriorityBlockingQueue<Runnable>()
        );
        timer.scheduleAtFixedRate(new MonitorTask(), 0L, 10 * 1000L);
        addNode(initialNode, 0);
    }
    boolean addNode(Node node, int priority) {
        if (!node.isValid()) return false;
        boolean added = foundNodes.add(node);
        if (!added) return false;
        int elapsed = currentTime() - startTime;
        threadPool.execute(new Task(node, priority - elapsed));
        return true;
    }
    class Task implements Runnable, Comparable<Task> {
        Node target;
        int priority;
        int taskSubmittedTime;
        int taskStartTime;
        Task(Node target, int priority) {
            this.target = target;
            this.priority = priority;
            taskSubmittedTime = currentTime();
        }
        public int compareTo(Task another) {
            if (this.priority < another.priority) return -1;
            if (this.priority == another.priority) return 0;
            return 1;
        }
        int handshakeCount = 0;
        int extractedNodeCount = 0;
        int newNodeCount = 0;
        Exception lastException;
        String[] clusterWords;
        public void run() {
            taskStartTime = currentTime();
            int errorCount = 0;
            for (int i = 0; i < 4; i++) {
                if (errorCount >= 1) break;
                if (currentTime() - taskStartTime >= 20) break;
                try {
                    connect(30);
                } catch (IOException e) {
                    errorCount++;
                }
            }
            connectionTriedCount++;
            if (handshakeCount > 0) {
                handshakeSucceededCount++;
            }
            if (extractedNodeCount > 0) {
                extractionSucceededCount++;
            }
            printTasklog();
        }
        private void connect(int timeLimit) throws IOException {
            InputStream is = null;
            OutputStream os = null;
            Socket s = null;
            TimerTask closer = null;
            try {
                s = new Socket(target.addr, target.port);
                closer = new SocketCloser(s);
                timer.schedule(closer, timeLimit * 1000L);
                is = new BufferedInputStream(s.getInputStream());
                os = new BufferedOutputStream(s.getOutputStream());
                new WinnyProtocolCommander(os, conf).sendCommand(new Command10());
                WinnyCommandVisitor visitor = new NodeAddingVisitor();
                new WinnyProtocolInterpreter(is, visitor).interpret();
            } catch (WinnyProtocolException e) {
                lastException = e;
            } catch (IOException e) {
                lastException = e;
                throw e;
            } finally {
                if (closer != null) closer.cancel();
                try {
                    if (os != null) os.close();
                    if (is != null) is.close();
                    if (s != null) s.close();
                } catch (IOException e2) {
                }
            }
        }
        class NodeAddingVisitor extends WinnyCommandVisitor {
            public void visit(Command3 c) {
                handshakeCount++;
                clusterWords = c.clusterWords;
            }
            public void visit(Command4 c) {
                extractedNodeCount++;
                boolean added = addNode(new Node(c.addr, c.port), 0);
                if (added) newNodeCount++;
            }
            public void visit(Command13 c) {
                for (int i = 1; i < c.nodePath.length; i++) {
                    Node n = c.nodePath[i];
                    extractedNodeCount++;
                    boolean added = addNode(n, 0);
                    if (added) newNodeCount++;
                }
                Map<Node,Integer> minimum = new HashMap<Node,Integer>();
                for (WinnyKey k: c.keys) {
                    dumpKey(target, k);
                    Node node;
                    if (k.addr.isSiteLocalAddress() || k.addr.isLinkLocalAddress()) {
                        node = target;
                    } else {
                        node = new Node(k.addr, k.port);
                    }
                    int pri = 1500 - k.keyExpirationTimer;
                    if (pri < 0) pri = 0;
                    Integer old = minimum.get(node);
                    if (old == null || old > pri) {
                        minimum.put(node, pri);
                    }
                }
                for (Node n: minimum.keySet()) {
                    extractedNodeCount++;
                    boolean added = addNode(n, minimum.get(n));
                    if (added) newNodeCount++;
                }
            }
        }
        class SocketCloser extends TimerTask {
            Socket socket;
            int lastExtractedNodeCount = 0;
            SocketCloser(Socket socket) {
                this.socket = socket;
            }
            public void run() {
                try {
                    socket.getInputStream().close();
                } catch (IOException e) {
                }
                try {
                    socket.close();
                } catch (IOException e) {
                }
            }
        }

        private void printTasklog() {
            taskOut.printf(
                "%21s pri: %4d life: %3d con: %d new: %5.1f%% (%4d/%4d) %d %d %s %s\n",
                target.toString(),
                priority + (taskStartTime - startTime),
                currentTime() - taskStartTime,
                handshakeCount,
                (float)newNodeCount / extractedNodeCount * 100,
                newNodeCount,
                extractedNodeCount,
                currentTime() - startTime,
                currentTime(),
                clusterWords == null ?
                    "" :
                    clusterWords[0] + "|" + clusterWords[1] + "|" + clusterWords[2],
                lastException == null ? "" : lastException
            );
            taskOut.flush();
        }
    }
    class MonitorTask extends TimerTask {
        public void run() {
            int elapsed = currentTime() - startTime;
            monitorOut.printf(
//                "Elapsed time: %7d; Nodes found: %6d, tried: %6d, " +
//                    "connected: %6d, succeeded: %6d, live: %5.1f%%, " +
//                    "extracted: %5.1f; %Queue lingth: %6d; Threads: %4d;" +
//                    " /sec tried: %5.3f, connected: %5.3f\n",
                "%7d; %6d, %6d, %6d, %6d, %5.1f%%, %5.1f%%; %6d; %4d; %5.3f, %5.3f\n",
                elapsed,
                foundNodes.size(),
                connectionTriedCount,
                handshakeSucceededCount,
                extractionSucceededCount,
                (float)handshakeSucceededCount / connectionTriedCount * 100,
                (float)extractionSucceededCount / connectionTriedCount * 100,
                threadPool.getQueue().size(),
                Thread.activeCount(),
                (float)connectionTriedCount / elapsed,
                (float)handshakeSucceededCount / elapsed
            );
            monitorOut.flush();
        }
    }
    private void dumpKey(Node node, WinnyKey k) {
        keydumpOut.printf(
            "%s %s:%d %s %d %d %d %d \"%s\" %d %s\n",
            node.toString(),
            k.addr.getHostAddress().toString(),
            k.port,
            k.fileid.toString(),
            k.keyExpirationTimer,
            currentTime(),
            k.keyUpdateTime,
            k.referenceCount,
            k.trip,
            k.filesize,
            k.filename
        );
    }
    private static int currentTime() {
        return (int)(System.currentTimeMillis() / 1000);
    }

    static final String usage = "Usage: java WinnyWalker host port [outputdir]";
    static PrintStream keydumpOut, taskOut, monitorOut;
    public static void main(String[] args) throws Exception {
        if (args.length < 2 || args.length > 3) {
            System.err.println(usage);
            System.exit(1);
        }
        String host = args[0];
        int port = Integer.parseInt(args[1]);
        Node initialNode = new Node(InetAddress.getByName(host), port);
        File dir = new File(".");
        if (args.length > 2) {
            dir = new File(args[2]);
        }
        keydumpOut = newPrintStream(dir, "keydump.log");
        taskOut = newPrintStream(dir, "task.log");
        monitorOut = newPrintStream(dir, "monitor.log");
        new WinnyWalker(initialNode);
    }
    static PrintStream newPrintStream(File dir, String file) throws Exception {
        OutputStream os = new FileOutputStream(new File(dir, file));
        return new PrintStream(new BufferedOutputStream(os));
    }
}
��2: �ɻ�˻��Ѥ����Ρ��ɽ�󥢥르�ꥺ��������ѥ����ɡ�WinnyWalker��

����

�嵭�ˤϸ��꤬���ꡢ18��������������������

*1 ï¿½ï¿½ß¤ï¿½ï¿½ï¿½ï¿½ëµ¡Ç½ï¿½Ï¤Þ¤ï¿½ï¿½ï¿½Ã¤Æ¤ï¿½ï¿½Ê¤ï¿½ï¿½ï¿½

*2 FIFO�ν���Ȥ��ʤ��Τϡ����줾��ΥΡ��ɤ���³��Գ��ϻ��郎���Ρ��ɾ���ȯ�����狼������ָ�ȤʤäƤ��ޤ�����³����Ψ���㲼����Τ��ò¤±¤ë¤¿ï¿½á¡£

����

<��������(2006ǯ07��08��) ��������(2006ǯ07��17��)> �ǿ� �Խ�

�Ƕ�Υ����ȥ�

2025ǯ01��03��

2024ǯ12��28��

2024ǯ12��22��

2024ǯ12��07��

2024ǯ12��02��

2024ǯ11��24��

2024ǯ11��11��

2024ǯ07��28��

2024ǯ07��27��

2024ǯ07��07��

2024ǯ04��07��

2024ǯ04��01��

2024ǯ03��23��

2024ǯ03��19��

2024ǯ03��16��

2024ǯ03��13��

2024ǯ03��11��

2023ǯ03��27��

2022ǯ12��30��

2022ǯ12��25��

2022ǯ06��09��

2022ǯ04��01��

2022ǯ01��19��

2021ǯ12��26��

2021ǯ10��06��

2021ǯ08��23��

2021ǯ07��12��

2020ǯ09��14��

2020ǯ08��01��

2019ǯ10��05��

2019ǯ08��03��

2019ǯ07��08��

2019ǯ06��25��

2019ǯ06��09��

2019ǯ05��19��

2019ǯ05��12��

2019ǯ03��19��

2019ǯ03��16��

2019ǯ03��09��

2019ǯ03��07��

2019ǯ02��19��

2019ǯ02��11��

2018ǯ12��26��

2018ǯ10��31��

2018ǯ06��17��

2018ǯ06��10��

2018ǯ05��19��

2018ǯ05��04��

2018ǯ03��07��

2017ǯ12��29��

2017ǯ10��29��

2017ǯ10��22��

2017ǯ07��22��

2017ǯ06��04��

2017ǯ05��13��

2017ǯ05��05��

2017ǯ04��08��

2017ǯ03��10��

2017ǯ03��05��

2017ǯ02��18��

2017ǯ01��08��

2017ǯ01��04��

2016ǯ12��30��

2016ǯ12��04��

2016ǯ11��29��

2016ǯ11��23��

2016ǯ11��05��

2016ǯ10��25��

2016ǯ10��10��

2016ǯ08��23��

2016ǯ07��23��

2016ǯ07��16��

2016ǯ07��02��

2016ǯ06��12��

2016ǯ06��03��

2016ǯ04��23��

2016ǯ04��06��

2016ǯ03��27��

2016ǯ03��14��

2016ǯ03��06��

2016ǯ02��24��

2016ǯ02��20��

2016ǯ02��11��

2016ǯ02��05��

2016ǯ01��31��

2015ǯ12��12��

2015ǯ12��06��

2015ǯ11��23��

2015ǯ11��21��

2015ǯ11��07��

2015ǯ10��20��

2015ǯ07��02��

2015ǯ06��14��

2015ǯ03��15��

2015ǯ03��10��

2015ǯ03��08��

2015ǯ01��05��

2014ǯ12��27��

2014ǯ11��12��

2014ǯ09��07��

2014ǯ07��18��

2014ǯ04��23��

2014ǯ04��22��

2000|01|
2003|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|05|06|07|08|09|10|11|12|
2012|02|03|04|05|06|07|08|09|
2013|01|02|03|04|05|06|07|
2014|01|04|07|09|11|12|
2015|01|03|06|07|10|11|12|
2016|01|02|03|04|06|07|08|10|11|12|
2017|01|02|03|04|05|06|07|10|12|
2018|03|05|06|10|12|
2019|02|03|05|06|07|08|10|
2020|08|09|
2021|07|08|10|12|
2022|01|04|06|12|
2023|03|
2024|03|04|07|11|12|
2025|01|
<��������(2006ǯ07��08��) ��������(2006ǯ07��17��)> �ǿ� �Խ�