1
# Soribada - A Korean P2P filesharing program/protocol - http://www.soribada.com
2
# Pattern quality: good notsofast
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...
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)
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
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 -----------------^^^^^^^^^^^^^^^^^^^^^^^
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)
31
# 3 -- Download requests:
32
# All downloads start with "GETMP3\x0d\x0aFilename"
33
# A regex match: ^GETMP3\x0d\x0aFilename
37
# This will match the second packet of two.
38
# ^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
40
# Again, matching this is the end of the comunication.
41
# ^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)
43
# This is the start of the transfer and an easy match
44
#^GETMP3\x0d\x0aFilename
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].?.?.?.?$