1
|
# Bittorrent - P2P filesharing / publishing tool - http://www.bittorrent.com
|
2
|
# Pattern attributes: good slow notsofast undermatch
|
3
|
# Protocol groups: p2p open_source
|
4
|
# Wiki: http://www.protocolinfo.org/wiki/Bittorrent
|
5
|
# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
|
6
|
#
|
7
|
# This pattern has been tested and is believed to work well.
|
8
|
# It will, however, not work on bittorrent streams that are encrypted, since
|
9
|
# it's impossible to match (well) encrypted data.
|
10
|
|
11
|
bittorrent
|
12
|
|
13
|
# Does not attempt to match the HTTP download of the tracker
|
14
|
# 0x13 is the length of "bittorrent protocol"
|
15
|
# Second two bits match UDP wierdness
|
16
|
# Next bit matches something Azureus does
|
17
|
# Ditto on the next bit. Could also match on "user-agent: azureus", but that's in the next
|
18
|
# packet and perhaps this will match multiple clients.
|
19
|
# bitcomet-specific strings contributed by liangjun.
|
20
|
|
21
|
# This is not a valid GNU basic regular expression (but that's ok).
|
22
|
^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=get /announce\?info_hash=|get /client/bitcomet/|GET /data\?fid=)|d1:ad2:id20:|\x08'7P\)[RP]
|
23
|
|
24
|
# This pattern is "fast", but won't catch as much
|
25
|
#^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=)
|