~ubuntu-branches/ubuntu/trusty/ntop/trusty

« back to all changes in this revision

Viewing changes to l7-patterns/soribada.pat

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2008-06-15 14:38:28 UTC
  • mfrom: (2.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080615143828-oalh84nda2hje4do
Tags: 3:3.3-11
Correction of Polish translation encoding, closes: #479490. Thanks
to Christian Perrier <bubulle@debian.org> for the help.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Soribada - A Korean P2P filesharing program/protocol - http://www.soribada.com
 
2
# Pattern quality: good notsofast
 
3
 
 
4
# I am told that there are three versions of this protocol, the first no
 
5
# longer being used.  That would probably explain why incoming searches
 
6
# have two different formats...
 
7
 
 
8
# There are three parts to Soribada protocal:
 
9
# 1: Ping/Pong to establish a relationship on the net (UDP with 2 useful bytes)
 
10
# 2: Searching (in two formats) (UDP with two short easy to match starts)
 
11
# 3: Download requests/transfers (TCP with an obvious first packet)
 
12
 
 
13
# 1 -- Pings/Pongs:
 
14
# Requester send 2 bytes and a 6 byte response is sent back.
 
15
# \x10 for the first byte and \x14-\x16 for the second.
 
16
# The response is the first byte (\x10) and the second byte incremented
 
17
# by 1 (\x15-\x17).
 
18
# No further communication happens between the hosts except for searches.
 
19
# A regex match: ^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
 
20
# First Packet ---^^^^^^^^^^^^^^^
 
21
# Second Packet -----------------^^^^^^^^^^^^^^^^^^^^^^^
 
22
 
 
23
# 2 -- Search requests:
 
24
# All searches are totally stateless and are only responded to if the user
 
25
# actually has the file.
 
26
# Both format start with a \x01 byte, have 3 "random bytes" and then 3 bytes
 
27
# corasponding to one of two formats.
 
28
# Format 1 is \x51\x3a\+ and format 2 is \x51\x32\x3a
 
29
# A regex match: ^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)
 
30
 
 
31
# 3 -- Download requests:
 
32
# All downloads start with "GETMP3\x0d\x0aFilename"
 
33
# A regex match: ^GETMP3\x0d\x0aFilename
 
34
 
 
35
soribada
 
36
 
 
37
# This will match the second packet of two.
 
38
# ^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
 
39
 
 
40
# Again, matching this is the end of the comunication.
 
41
# ^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)
 
42
 
 
43
# This is the start of the transfer and an easy match
 
44
#^GETMP3\x0d\x0aFilename
 
45
 
 
46
# This will match everything including the udp packet portions
 
47
^GETMP3\x0d\x0aFilename|^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)|^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
 
48