Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Update peer identification
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaHOH committed Dec 22, 2020
1 parent b9b5afe commit 09c622b
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 158 deletions.
16 changes: 12 additions & 4 deletions src/ban_peers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
uTorrent.
""")
__app_name__ = 'Ban-Peers'
__version__ = '1.0.2'
__version__ = '1.0.3'
__author__ = 'SeaHOH'
__email__ = '[email protected]'
__license__ = 'MIT'
Expand Down Expand Up @@ -100,13 +100,15 @@
[Tt]orc | # Torch (TB)
[Vv]ag | # Vagaa (VG) [Dead?]
[Xx]fp | # Xfplay (XF)
[Zz]on | # Zona (ZO)
Unknown\s(?:
DL | # DanDan/DLBT (DL)
QVO | # Qvod (QVOD) [Dead]
TB | # Torch (TB)
UW | # uTorrent Web (UW)
VG | # Vagaa (VG) [Dead?]
XF # Xfplay (XF)
XF | # Xfplay (XF)
ZO # Zona (ZO)
)
)
''', re.X)
Expand Down Expand Up @@ -147,6 +149,7 @@
# Did not included in uTorrent's peer identification
# https://www.bittorrent.org/beps/bep_0020.html
# https://wiki.theory.org/BitTorrentSpecification#peer_id
# https://github.com/webtorrent/bittorrent-peerid
# Most of them has been died
CLIENT_UNKNOWN = re.compile('''
^Unknown\s(?!
Expand All @@ -173,8 +176,11 @@
FC | # FileCroc [Dead]
FD | # Free Download Manager
FW | # FrostWire
FL/1 | # Flud - Torrent Downloader
FL/[2-5] | # Folx
FX | # Freebox BitTorrent
GS | # GSTorrent [Dead]
GT/0\.0\.0\.2 | # Go-Torrent [library]
HK | # Hekate [Dead?]
HM | # hMule [Dead]
IL | # iLivid [Dead]
Expand All @@ -183,6 +189,7 @@
LC | # LeechCraft
LH | # LH-ABC [Dead]
#M\d-\d | # Bram's old BitTorrent and many other clients [Dead]
MG | # MediaGet
ML | # MLdonkey
MK | # Meerkat [Dead]
MO | # MonoTorrent [Dead?]
Expand All @@ -197,6 +204,7 @@
RZ | # RezTorrent [Dead?]
SB | # ~Swiftbit [Dead]
SM | # SoMud [Dead]
SP36 | # BitSpirit v3.6
ST | # SymTorrent [Dead]
st | # sharktorrent [Dead]
tT | # tTorrent
Expand Down Expand Up @@ -834,15 +842,15 @@ def log(msg):
t = None
self._statistics_choked[hash] = torrent.downloaded, t
if choked:
msg = _('[%(torrent)s] is choked with bug, restart it ')
msg = _('[%(hash)s][%(torrent)s] is choked with bug, restart it ')
try:
self.request(params={'action': 'stop', 'hash': hash})
time.sleep(1)
self.request(params={'action': 'start', 'hash': hash})
msg += _('successed')
except:
msg += _('failed')
self.log(msg % {'torrent': torrent.name})
self.log(msg % {'hash': hash, 'torrent': torrent.name})
continue
time_fp = 60
ratio_sl = 10
Expand Down
Loading

0 comments on commit 09c622b

Please sign in to comment.