update stripped subset of l7 patterns to 11-03-2007 patterns
[openwrt-10.03/.git] / package / iptables / files / l7 / bittorrent.pat
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 #
6 # This pattern has been tested and is believed to work well.
7 # It will, however, not work on bittorrent streams that are encrypted, since
8 # it's impossible to match encrypted data (unless the encryption is extremely 
9 # weak, like rot13 or something...).
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
20 # Recently the ^ was removed from before \x13.  I think this was an accident,
21 # so I have restored it.
22
23 # This is not a valid GNU basic regular expression (but that's ok).
24 ^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=)|d1:ad2:id20:|\x08'7P\)[RP]
25
26 # This pattern is "fast", but won't catch as much
27 #^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=)