SOURCES: libtorrent-client_list.patch - comeback

charles charles at pld-linux.org
Thu Nov 27 01:50:58 CET 2008


Author: charles                      Date: Thu Nov 27 00:50:58 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- comeback

---- Files affected:
SOURCES:
   libtorrent-client_list.patch (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/libtorrent-client_list.patch
diff -u /dev/null SOURCES/libtorrent-client_list.patch:1.8
--- /dev/null	Thu Nov 27 01:50:58 2008
+++ SOURCES/libtorrent-client_list.patch	Thu Nov 27 01:50:52 2008
@@ -0,0 +1,87 @@
+--- libtorrent-0.12.3/src/torrent/peer/client_list.cc.orig	2008-05-07 14:19:13.000000000 +0200
++++ libtorrent-0.12.3/src/torrent/peer/client_list.cc	2008-10-26 19:22:03.380552372 +0100
+@@ -73,8 +73,10 @@
+   insert_helper(ClientInfo::TYPE_AZUREUS, "BX", NULL, NULL, "Bittorrent X");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "BS", NULL, NULL, "BTSlave");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "CT", NULL, NULL, "CTorrent");
+-  insert_helper(ClientInfo::TYPE_AZUREUS, "DE", NULL, NULL, "DelugeTorrent");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "DE", NULL, NULL, "Deluge");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "ES", NULL, NULL, "Electric Sheep");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "FG", NULL, NULL, "FlashGet");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "LW", NULL, NULL, "LimeWire");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "LP", NULL, NULL, "Lphant");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "MT", NULL, NULL, "MoonlightTorrent");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "MP", NULL, NULL, "MooPolice");
+@@ -84,13 +86,13 @@
+   insert_helper(ClientInfo::TYPE_AZUREUS, "SS", NULL, NULL, "SwarmScope");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "SB", NULL, NULL, "Swiftbit");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "TN", NULL, NULL, "TorrentDotNET");
+-  insert_helper(ClientInfo::TYPE_AZUREUS, "TS", NULL, NULL, "Torrentstorm");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "TR", NULL, NULL, "Transmission");
+-  insert_helper(ClientInfo::TYPE_AZUREUS, "XT", NULL, NULL, "XanTorrent");
+-  insert_helper(ClientInfo::TYPE_AZUREUS, "ZT", NULL, NULL, "ZipTorrent");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "TS", NULL, NULL, "TorrentStorm");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "XL", NULL, NULL, "Xunlei");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "XX", NULL, NULL, "Xtorrent");
+ 
+   insert_helper(ClientInfo::TYPE_COMPACT, "A", NULL, NULL, "ABC");
+-  insert_helper(ClientInfo::TYPE_COMPACT, "S", NULL, NULL, "Shadow's client");
++  insert_helper(ClientInfo::TYPE_COMPACT, "S", NULL, NULL, "Shadow's");
+   insert_helper(ClientInfo::TYPE_COMPACT, "U", NULL, NULL, "UPnP NAT BitTorrent");
+   insert_helper(ClientInfo::TYPE_COMPACT, "O", NULL, NULL, "Osprey Permaseed");
+ 
+@@ -100,10 +102,14 @@
+   insert_helper(ClientInfo::TYPE_AZUREUS, "BG", NULL, NULL, "BTG");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "BR", NULL, NULL, "BitRocket");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "EB", NULL, NULL, "EBit");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "FC", NULL, NULL, "FileCroc");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "HL", NULL, NULL, "Halite");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "pX", NULL, NULL, "pHoeniX");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "qB", NULL, NULL, "qBittorrent");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "SN", NULL, NULL, "ShareNet");
+   insert_helper(ClientInfo::TYPE_AZUREUS, "UL", NULL, NULL, "uLeecher!");
+-  insert_helper(ClientInfo::TYPE_AZUREUS, "XL", NULL, NULL, "XeiLun");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "XT", NULL, NULL, "XanTorrent");
++  insert_helper(ClientInfo::TYPE_AZUREUS, "ZT", NULL, NULL, "ZipTorrent");
+ 
+   insert_helper(ClientInfo::TYPE_COMPACT, "R", NULL, NULL, "Tribler");
+ }
+@@ -169,6 +175,13 @@
+       std::isxdigit(id[3]) && std::isxdigit(id[4]) && std::isxdigit(id[5]) && std::isxdigit(id[6])) {
+     dest->set_type(ClientInfo::TYPE_AZUREUS);
+ 
++    // incoming connection with spoofed id
++    if (id[1] == 'l' && id[2] == 't' && !std::strncmp(id.c_str()+16, "UDP0", 4)) {
++      *dest = *begin();
++      std::memset(dest->mutable_upper_version(), 0, ClientInfo::max_version_size);
++      return false;
++    }
++
+     dest->mutable_key()[0] = id[1];
+     dest->mutable_key()[1] = id[2];
+     
+@@ -176,15 +189,22 @@
+       dest->mutable_version()[i] = dest->mutable_upper_version()[i] = rak::hexchar_to_value(id[3 + i]);
+ 
+   } else if (std::isalpha(id[0]) && id[4] == '-' &&
+-             std::isxdigit(id[1]) && std::isxdigit(id[2]) && std::isxdigit(id[3])) {
++             std::isxdigit(id[1]) && std::isxdigit(id[2]) && std::isalnum(id[3])) {
+     dest->set_type(ClientInfo::TYPE_COMPACT);
+ 
+     dest->mutable_key()[0] = id[0];
+     dest->mutable_key()[1] = '\0';
+     
++    // T03G = BitTornado 0.3.16
++    char id3;
++    if (id[3] > 'F' && id[3] < 'a')
++      id3 = id[3] - 'F' + 0xF;
++    else
++      id3 = rak::hexchar_to_value(id[3]);
++
+     dest->mutable_version()[0] = dest->mutable_upper_version()[0] = rak::hexchar_to_value(id[1]);
+     dest->mutable_version()[1] = dest->mutable_upper_version()[1] = rak::hexchar_to_value(id[2]);
+-    dest->mutable_version()[2] = dest->mutable_upper_version()[2] = rak::hexchar_to_value(id[3]);
++    dest->mutable_version()[2] = dest->mutable_upper_version()[2] = id3;
+     dest->mutable_version()[3] = dest->mutable_upper_version()[3] = '\0';
+ 
+   } else if (std::isalpha(id[0]) && std::isdigit(id[1]) && id[2] == '-' &&
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/libtorrent-client_list.patch?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list