You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

559 lines
80 KiB

package p2p
import "net"
import "fmt"
import "bytes"
import "encoding/hex"
import "encoding/binary"
import "github.com/satori/go.uuid"
//import "github.com/romana/rlog"
//import log "github.com/sirupsen/logrus"
const P2P_COMMANDS_POOL_BASE = 1000
const P2P_COMMAND_HANDSHAKE = P2P_COMMANDS_POOL_BASE + 1 // carries payload
const P2P_COMMAND_TIMED_SYNC = P2P_COMMANDS_POOL_BASE + 2 // carries payload
const P2P_COMMAND_PING = P2P_COMMANDS_POOL_BASE + 3
// debug commands are not even implemented ( therefore not supported/developed at all)
const P2P_COMMAND_REQUEST_SUPPORT_FLAGS = P2P_COMMANDS_POOL_BASE + 7
// used to print names for command
var COMMAND_NAME = map[uint32]string{
// below are p2p commands
P2P_COMMAND_HANDSHAKE: "P2P_COMMAND_HANDSHAKE",
P2P_COMMAND_TIMED_SYNC: "P2P_COMMAND_TIMED_SYNC",
P2P_COMMAND_PING: "P2P_COMMAND_PING",
P2P_COMMAND_REQUEST_SUPPORT_FLAGS: "P2P_COMMAND_REQUEST_SUPPORT_FLAGS",
// below are cryptonote based commands
BC_NOTIFY_NEW_BLOCK: "BC_NOTIFY_NEW_BLOCK",
BC_NOTIFY_NEW_TRANSACTIONS: "BC_NOTIFY_NEW_TRANSACTIONS",
BC_NOTIFY_REQUEST_GET_OBJECTS: "BC_NOTIFY_REQUEST_GET_OBJECTS",
BC_NOTIFY_RESPONSE_GET_OBJECTS: "BC_NOTIFY_RESPONSE_GET_OBJECTS",
// where is the 5th one ??
BC_NOTIFY_REQUEST_CHAIN: "BC_NOTIFY_REQUEST_CHAIN", // when this comes, reply with reponse chain entry
BC_NOTIFY_RESPONSE_CHAIN_ENTRY: "BC_NOTIFY_RESPONSE_CHAIN_ENTRY",
}
type Network_Interface interface {
Serialize() ([]byte, int)
Deserialize([]byte) (int, error)
}
type Peer_Info struct {
IP net.IP
Port uint32
ID uint64
LastSeen uint64
}
// from here https://github.com/monero-project/monero/blob/master/src/p2p/p2p_protocol_defs.h
type Node_Data struct {
Network_UUID uuid.UUID
Local_time uint64
Local_Port uint32
Peer_ID uint64
}
type Node_Data_Response struct {
PeerArray []Peer_Info
NodeData Node_Data
CoreData CORE_DATA
}
//
// hardcoded buffer for boost compatibility
/* pipe marker placed for initial and ending points
0000 01 21 01 01 01 01 01 01 e2 00 00 00 00 00 00 00 .!..............
0010 00 e9 03 00 00 01 00 00 00 02 00 00 00 01 00 00 ................
0020 00 01 11 01 01 01 01 02 01|01 08 09 6e 6f 64 65 ............node
0030 5f 64 61 74 61 0c 10 0a 6c 6f 63 61 6c 5f 74 69 _data...local_ti
0040 6d 65 05 d5 6b 2a 5a 00 00 00 00 07 6d 79 5f 70 me..k*Z.....my_p
0050 6f 72 74 06 00 00 00 00 0a 6e 65 74 77 6f 72 6b ort......network
0060 5f 69 64 0a 40 12 30 f1 71 61 04 41 61 17 31 00 _id.@.0.qa.Aa.1.
0070 82 16 a1 a1 11 07 70 65 65 72 5f 69 64 05 ce d5 ......peer_id...
0080 2f 43 e6 e7 a0 4e|0c 70 61 79 6c 6f 61 64 5f 64 /C...N.payload_d
0090 61 74 61 0c 10 15 63 75 6d 75 6c 61 74 69 76 65 ata...cumulative
00a0 5f 64 69 66 66 69 63 75 6c 74 79 05 01 00 00 00 _difficulty.....
00b0 00 00 00 00 0e 63 75 72 72 65 6e 74 5f 68 65 69 .....current_hei
00c0 67 68 74 05 01 00 00 00 00 00 00 00 06 74 6f 70 ght..........top
00d0 5f 69 64 0a 80 48 ca 7c d3 c8 de 5b 6a 4d 53 d2 _id..H.|...[jMS.
00e0 86 1f bd ae dc a1 41 55 35 59 f9 be 95 20 06 80 ......AU5Y... ..
00f0 53 cd a8 43 0b 0b 74 6f 70 5f 76 65 72 73 69 6f S..C..top_versio
0100 6e 08 01 n..
the serialised structure is 0x4c bytes
*/
func (data Node_Data) Serialize() ([]byte, int) {
var buf []byte = []byte{
//0x01,0x08, // boost header
0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, // lenth + node data
0x0c, 0x10, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, // length + local time
0x05, // boost header for uint64
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // localtime should be filled here
0x07, 0x6d, 0x79, 0x5f, 0x70, 0x6f, 0x72, 0x74, // length + my_port
0x06, // boost header for uint32
0x0, 0x0, 0x0, 0x0, // myport should be filled here
0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, // length +network id
0x0a, 0x40, // boost for 16 byte uint 8 array
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // network_id should be filled here
0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, // length + peer id
0x05, // boost header for uint64
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // peerid should be filled here
}
binary.LittleEndian.PutUint64(buf[24:], data.Local_time)
binary.LittleEndian.PutUint32(buf[41:], data.Local_Port)
network_id, _ := data.Network_UUID.MarshalBinary()
copy(buf[58:], network_id[:])
binary.LittleEndian.PutUint64(buf[83:], data.Peer_ID)
return buf, 91
}
// extract structure info from hardcoded node
func (data *Node_Data) DeSerialize(buf []byte) (err error) {
if len(buf) < 91 {
return fmt.Errorf("Insufficient Buffer")
}
data.Local_time = binary.LittleEndian.Uint64(buf[24:])
data.Local_Port = binary.LittleEndian.Uint32(buf[41:])
_ = data.Network_UUID.UnmarshalBinary(buf[58 : 58+16])
data.Peer_ID = binary.LittleEndian.Uint64(buf[83:])
return nil
}
type CORE_DATA struct {
Current_Height uint64
Cumulative_Difficulty uint64
Top_ID [32]byte // top block hash
Top_Version byte // top version
}
// hardcoded buffer for boost compatibility
/* pipe marker placed for initial and ending points
0000 01 21 01 01 01 01 01 01 e2 00 00 00 00 00 00 00 .!..............
0010 00 e9 03 00 00 01 00 00 00 02 00 00 00 01 00 00 ................
0020 00 01 11 01 01 01 01 02 01 01 08 09 6e 6f 64 65 ............node
0030 5f 64 61 74 61 0c 10 0a 6c 6f 63 61 6c 5f 74 69 _data...local_ti
0040 6d 65 05 d5 6b 2a 5a 00 00 00 00 07 6d 79 5f 70 me..k*Z.....my_p
0050 6f 72 74 06 00 00 00 00 0a 6e 65 74 77 6f 72 6b ort......network
0060 5f 69 64 0a 40 12 30 f1 71 61 04 41 61 17 31 00 _id.@.0.qa.Aa.1.
0070 82 16 a1 a1 11 07 70 65 65 72 5f 69 64 05 ce d5 ......peer_id...
0080 2f 43 e6 e7 a0 4e|0c 70 61 79 6c 6f 61 64 5f 64 /C...N.payload_d
0090 61 74 61 0c 10 15 63 75 6d 75 6c 61 74 69 76 65 ata...cumulative
00a0 5f 64 69 66 66 69 63 75 6c 74 79 05 01 00 00 00 _difficulty.....
00b0 00 00 00 00 0e 63 75 72 72 65 6e 74 5f 68 65 69 .....current_hei
00c0 67 68 74 05 01 00 00 00 00 00 00 00 06 74 6f 70 ght..........top
00d0 5f 69 64 0a 80 48 ca 7c d3 c8 de 5b 6a 4d 53 d2 _id..H.|...[jMS.
00e0 86 1f bd ae dc a1 41 55 35 59 f9 be 95 20 06 80 ......AU5Y... ..
00f0 53 cd a8 43 0b 0b 74 6f 70 5f 76 65 72 73 69 6f S..C..top_versio
0100 6e 08 01 | n..
*/
func (data CORE_DATA) Serialize() ([]byte, int) {
var buf []byte = []byte{
0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, // lenth + payload_data
0x0c, 0x10,
0x15, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, // length + cumulative difficulty
0x05, // boost header for uint64
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // cumulative difficulty should be filled here
0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, // length + my_port
0x05, // boost header for uint64
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // current height should be filled here
0x06, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, // length + top_id block hash
0x0a, 0x80, // boost for 32 byte uint 8 array
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // first 16 bytes
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // second 16 bytes
0x0b, 0x74, 0x6f, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, // length + top_version
0x08, // boost header for uint8
0x0, // top_version should be filled here
}
binary.LittleEndian.PutUint64(buf[38:], data.Cumulative_Difficulty)
binary.LittleEndian.PutUint64(buf[62:], data.Current_Height)
copy(buf[79:], data.Top_ID[:])
buf[124] = data.Top_Version
return buf, len(buf)
}
// extract structure info from hardcoded node
func (data *CORE_DATA) DeSerialize(buf []byte) (err error) {
if len(buf) < 125 {
return fmt.Errorf("Insufficient Buffer")
}
data.Cumulative_Difficulty = binary.LittleEndian.Uint64(buf[38:])
data.Current_Height = binary.LittleEndian.Uint64(buf[62:])
copy(data.Top_ID[0:32], buf[79:79+32])
data.Top_Version = buf[124]
return nil
}
func (data *Node_Data_Response) Serialize() ([]byte, int) {
pkt1 := "0e6c6f63616c5f706565726c6973740ac15dd1cdd38aa04600001e145a24a1521225362a2d5a000000005fd71310a0460000fa49324a8c0c40a0312a2d5a00000000c6ccf7aaa046000043eace428b25b1d3312a2d5a0000000032079a14a04600008740365aeee32a5a262a2d5a000000004db2817ca046000064786ac517d7504cfd292d5a00000000b93b65fba04600008293f1c40ffdfb3ecd292d5a0000000051414e6da04600000abaf4050f9ed985bc292d5a0000000072620312a0460000656c3b6dd65dbb459f292d5a00000000a3ac1411a2460000a0acc8ba334262699a292d5a00000000c06ea092a0460000cf1acf3a47f41ddf96292d5a0000000049b40d05a0460000a62d61498f1d98b948292d5a0000000052278f64a0460000deb319bafed959dc41292d5a00000000569b0905a046000028bcfbe770b0a1d614292d5a00000000d942110ba04600005a40b1725aeae591d0282d5a000000002d7dc222a0460000bb6ce64086eaa3f9be282d5a000000005d5b7609a046000098584e4e026fdd1889282d5a0000000058b74b0fa04600004dbeb701f2b0b7a986282d5a000000005ec74a45a046000049aa3dbc5aa3fe9983282d5a00000000aa4808afa04600007949cb645d40e4b5c3272d5a0000000042d7e049a04600003891254f5195f2bdab272d5a0000000044b8da2aa04600009fe839e92e0f23cd70272d5a00000000d445233ba0460000fbf8266d9033c0970a272d5a0000000064105973a0460000019ecb192bdaabdfb2262d5a000000005c348c6ca0460000c755269aab6a8fcc93262d5a000000008ac93cc6f41f000044543d568956ff4e7e262d5a00000000be105e84a04600001e6ba47844b0711751262d5a00000000c06ea072a046000036212e76b101e03a21262d5a000000007659ad2aa0460000d2e66223ba274334ee252d5a00000000c6931ca2a0460000711be06c699c3e345e252d5a00000000c6ff26f2a0460000fa5bcee48d28311048252d5a0000000050f1d8d5a04600006ab44bea6af086a024252d5a00000000054f5481a046000085aaf3d3ceb9195e1e252d5a000000006d78e636a0460000f8cd24472dca88e915252d5a00000000a2fd4145a04600006a6180174ebc1ab3fa242d5a00000000b01f7552b06d0000f7eac19a4d3128ddf8242d5a0000000005ba491da04600008ccec43406a7e4eaf2242d5a000000004a402b86a046000027d07f355b65b2f1f0242d5a0000000047cf3fc0a046000036023345e4759030b9232d5a0000000068ed9fd7a04600008b773b5448d437fcaa232d5a00000000bad56a01a04600003874d4d754dea82134"
pkt2 := "232d5a0000000079df096fa0460000838ed6473815e3952a232d5a00000000056b331ea0460000bb60159a185d57ef18232d5a00000000ba5d3e08a0460000d8cda4f8b8a6fccc0e232d5a00000000d4a4af80a0460000dbf29eb6976bee17ff222d5a00000000bca70c31a0460000d1ed41a93c82a5e9cd222d5a0000000079ad62dca0460000a43e986cea7e962a9a222d5a000000003a6eaceda0460000869f779d519a29ea69222d5a00000000b996bdb5a04600003cbb78ca57fe825e47222d5a0000000069e3627aa0460000605d15da34571d6442222d5a00000000465f4dcaa04600009ae6231712883c4642222d5a000000004055e3e7a0460000d7ead28dfb7cf1da34222d5a00000000bcc25752a04600006f78b8dbd4e04adc2d222d5a00000000bd0d4cbea0460000da021f6b3fe046c11d222d5a00000000af9f43d6a04600002d7bf3d9389ffb9917222d5a00000000188a4a8ba0460000eeb803ba1ef91d79fd212d5a000000003ed2681fa1460000353beec5dd1e2a9e7c212d5a0000000055f48d1ca0460000a3400009e9844c0b49212d5a0000000049bd66efa0460000f18d66ed9022ad0948212d5a0000000051ca9bb2a0460000809988312336b22f39212d5a00000000d5f0b63ca04600001e6afbd4fd51e07534212d5a0000000057d8715ea04600009cddc760e42ffbf5f6202d5a0000000036e50655a0460000f5227c57d494ac9ae9202d5a00000000567e0c4da0460000587db2d322e353b5d2202d5a00000000442e0e3ba04600005ab660e3de256563cb202d5a000000004e54fb50a046000075523816cd9cf2f189202d5a00000000516a4f90a0460000d61f18f76820c9f181202d5a000000006c2d24cca0460000d9c81eac54baf7f67f202d5a00000000560e8f79a0460000ec547410ae3fd4035a202d5a00000000340f51cea0460000dc34bf69c38ae5d652202d5a00000000aa4e6146a0460000db1fa70f77e73dd62d202d5a00000000b0d7fa3fa04600004bb07dfcf4e6890ccc1f2d5a0000000044ca6ee3a0460000d5865c1dd372a1baa21f2d5a000000000e205b86a04600008dd26b584ab55719a11f2d5a0000000095ca324aa04600009a3a9ef27b77f282981f2d5a000000005b798ca7a0460000b3c9d8ae8975cffa841f2d5a000000005e2a8c4da046000078b5cedbd290b8425a1f2d5a00000000442dc4f4a04600006b4679bfcef716b2571f2d5a0000000052291660a04600005e9457952bce50cdad1e2d5a0000000018710dc7a0460000778306285e7ab66ba81e2d5a00000000daea3f6ea0460000a0c6e7d127af91778e1e2d5a00000000524541caa0460000c14d04995da839c77a1e2d5a00000000d8f689a6a0460000fdd4138e79e8982a771e2d5a000000005602b855a046000091"
pkt3 := "3cdaeab53c63716d1e2d5a00000000506b49a1a0460000b1ddf05dc6be790b1d1e2d5a00000000a3ac123da2460000cc6bfbb7fa2bbe42e81d2d5a000000004bac6c1fa04600002eb6e73d4d67f81ce21d2d5a000000008ac98860a0460000116f2c033e504f15d41d2d5a000000002e0b4119a0460000626b6c58922342d0c31d2d5a0000000005bdc09fa0460000aba76ed16edcbc60b71d2d5a000000007ca871aba0460000119a899dda114998991d2d5a000000002ead2989a0460000d9acc674e377271d931d2d5a00000000c2be0b27a04600003a05693c409ba2bd5e1d2d5a0000000043bc4386a046000054c5cf9bcd0ec1083c1d2d5a00000000c64a35aba046000083bab533d150fadb101d2d5a000000002df70d06a0460000b4c9fcb561bce1d4d51c2d5a00000000a8eb679ea046000064ed073fd245007d401c2d5a0000000043958154a04600002997c4e037048ac6391c2d5a00000000b025a95ba0460000797a2cb5020dc535f71b2d5a000000008ac5b670a0460000e2e230417319c2a2971b2d5a000000005b4f07aea0460000269637bc02ef1abe8c1b2d5a000000008d69330ba0460000395719f6dd36d8125c1b2d5a0000000054f98048a046000094f474d261a11f9a571b2d5a000000003b7e944ba0460000c928eed89fa41de6011b2d5a0000000048c93c9ba04600008db1ac5f9797a0abfc1a2d5a00000000d80abee5a0460000b496f4eb5680dce5da1a2d5a000000006c333deba04600002d5ed7a7ac343731cd1a2d5a000000008ba244b9a046000076f40a10d781b61cbc1a2d5a000000005475582ba0460000159120bee1a7525ca01a2d5a0000000068881108a046000001dbba89e194eb139f1a2d5a0000000043085ee2a04600003b3085cbe30951939d1a2d5a000000009e8ccaaca04600007bcc12ac2fd4ec412f1a2d5a00000000b21b88cda04600002b595b3733f57c5686192d5a000000005bd7e351a0460000b638cec7dfb7be8c78192d5a000000008f597145a0460000d6a407050a82289263192d5a00000000253b61bda04600006bc053b4cdfd0be5ea182d5a000000004a50ed5ea0460000bef140ccc7dcf481df182d5a0000000092c75155a04600005a38b1e55e5318d1cd182d5a00000000af24d788a0460000d8f1b5eeacb97274c4182d5a00000000585b1c7ca046000019fb32baa195f121b7182d5a0000000042113069a0460000ca868ba31fd0ed9f93182d5a0000000053e44365a04600003389aa202a53dbea50182d5a000000004a8bf1dda046000038559bb7d3f52fee43182d5a0000000056a937f8a046000083632110dbb20d6430182d5a00000000b0d4e860a0460000767853706dc141e0c0172d5a000000002a76bd6aa046000072c4a28309b6dc0eaa172d5a0000000005"
pkt4 := "c781eaa046000079634df91a79eed1a5172d5a000000004d460151a04600001e6c75c66f5429f136172d5a00000000524b5de1a0460000dc22c083d1053d570d172d5a000000001f23ad26a0460000cc24fe35f2a84c23d0162d5a00000000a772d28da046000053be187ce01848ffbe162d5a00000000a3ac0d54a0460000dbc278d5c71a3fb8b8162d5a0000000018bac39aa04600005513dad620e59e5584162d5a000000007bf3138ca04600002feb5e81676ecf5982162d5a00000000deea0a0ca04600008abb018ee61980b16d162d5a00000000d47866d5a0460000038f82ecf8103e7864162d5a000000005a41157ba04600002b223aed5fc784b761162d5a000000002585c11aa0460000caf332866c4ab43a4f162d5a00000000bad653f6a0460000f2dc8c348848333ff8152d5a00000000546c6ceaa046000062263b041206d216aa152d5a000000004e2e5b86b06d000074e3e5edb5b87c0198152d5a000000005c3f2db9a0460000580b582fb04fbaf893152d5a000000005161fe40a0460000140ce0bb7d6753c390152d5a00000000d809b134a046000022c99d60c5609e7e90152d5a00000000819e4279a04600004caee8075f93e98331142d5a00000000565b2e3da0460000bcbeaaa342e50bdcee132d5a0000000044eb39faa04600009731416c8258768aec132d5a000000006c0419b1a046000042681128e219389ac0132d5a000000004ea94775a04600008a68504d7542f985b5132d5a00000000558fb88da04600005feacafbb881ca729d132d5a00000000a3ac223aa04600001b5aad98b945b0a634132d5a0000000050f1d3bca04600007f00b39fbac2a2d227132d5a00000000a3acff39a0460000b1d3267909bae7e570122d5a00000000be62021ba0460000cc5acc2be5f2b10f47122d5a0000000025b6986ca0460000a4b15b169158a015c6112d5a00000000b028c01ba04600008efbb33df658f4afba112d5a00000000591b0587a0460000afc949f19ae28c6395112d5a000000001806b371a04600004660018f27ac16cb7f112d5a0000000002566daaa0460000e253da8371fba38c71112d5a0000000079dd4525a0460000bc86deeaa78d8d5164112d5a000000002bfc6f6aa0460000075c9f398eba224e3c112d5a0000000054b912ada0460000e39d3c5230cb953d38112d5a0000000052fd6f1ba0460000596cb6bf116f38e3a2102d5a00000000488c5602a0460000fc7c10885b0de0d58d102d5a00000000a3acff34a0460000b0c19a820f57e3518d102d5a00000000d4b69b2da046000010b4ef63f0456a8783102d5a0000000044292257a04600004800b3f181b891a31c102d5a00000000b16204afa0460000de954b6acb9fe67a0d102d5a00000000cbdb2566a046000041c285cd8d83ad03e7"
pkt5 := "0f2d5a0000000048cc2527a0460000aaf77cb662a45c44760f2d5a000000003ed2bd6a6846000081e6000b164f1b8c220f2d5a0000000048da8b39a04600008ffd383095c6a5000f0f2d5a00000000c39afabca0460000badb0eddf1401bccd10e2d5a000000009e45f285a0460000a4d5b6cb15d775bcaf0e2d5a00000000b3db6915a0460000c03e41b41c52218ca00e2d5a0000000025eb46cfa0460000fcda3bedbac144b8810e2d5a0000000064203122a0460000d2f4fd49e43aee8a630e2d5a00000000590e6880a04600002d06b312ae4da3aa470e2d5a0000000076d1fca8a0460000e350dc70e91faaae3a0e2d5a00000000567ea70fa0460000593ad0d815bf46a3390e2d5a00000000c5f53004a0460000706c5da464ac04ff700d2d5a00000000c654df93a04600009233e6310c64bc745c0d2d5a0000000051eb2b34a0460000dbd7e2452e452a970b0d2d5a00000000cbdd045ea04600008ed3d5f429f1f50c090d2d5a0000000055cc6110a0460000bce41a041bba6ac1c30c2d5a000000004ddd4c42a046000069958c02c54bf2af7d0c2d5a000000004f4be504a0460000d198c12f826920a7790c2d5a00000000d5c50f7ea0460000f6a0b5467f05b205730c2d5a00000000cbdad4bda0460000c25bc4cfafd51667590c2d5a00000000052343f1a046000043687e9093c4a8e5560c2d5a000000005c26ed81a04600001a33225cb494e9f1fc0b2d5a000000002e303e99a04600005633b701fd83b07bf90b2d5a0000000064022677a0460000334fd27483c03c53f40b2d5a000000003ed25ee1a746000069e745cde93841c5e20b2d5a000000007d294aefa0460000647585d27f9d01a1aa0b2d5a000000004246dde0a0460000e8202e86eab81cf7900b2d5a000000003bb2a1a3a046000087f958a58a5edf58600b2d5a00000000cc2c60aea04600001ac6163a952e1e14510b2d5a00000000a3acff36a0460000fd6552d454a535a8440b2d5a000000003ed25ee1a646000067b6521faa80a58f410b2d5a0000000077ed6acfa04600001381c53afe90abaa020b2d5a000000003def0cd8a04600005506e9319df085d1af0a2d5a00000000de895d55a0460000fc57428c8df06894ab0a2d5a0000000018ba77efa046000069986492a2f830bca80a2d5a0000000056bc14d3a046000091943c25ed4c5080740a2d5a00000000af88623ca04600005eea824cee690714720a2d5a00000000d5153025a046000077cabc3d0cb226a83f0a2d5a00000000423944e4a04600008f06566ca4144c223f0a2d5a0000000049e50006a046000024443fb9ab86d621e9092d5a000000004d66d2a0a04600000f157a7fe9e2bd8ee8092d5a000000005ac7f5e4a0460000e89a776bf4daf58dca092d5a000000005aca6a36a0460000f0"
pkt6 := "1e6654c8272f4fbc092d5a00000000adf7e926a0460000c476478ce765c60e1c092d5a00000000d0750beba0460000ef12fda0c8980dcfd7082d5a0000000060087525a0460000b87b36c8f4d6642baa082d5a00000000276d9971a0460000ef2863ae135dd14638082d5a000000004ad3433da0460000287ca4e84380440f14082d5a000000005b796e86a0460000516bd12b232ad6428b072d5a000000005d8f68f2a0460000704ad266f503c5cf7c072d5a00000000a3ac1325a0460000bd02703a979f621c5a072d5a00000000ae8a208eb06d00001e9cf30ad73aad4804072d5a00000000b9a5449aa04600006f664b9b290351a303072d5a0000000073db2303a0460000dc4f0b624ba2ea30db062d5a000000004b8cf4c0a046000025cf9eab20ef6c2a8a062d5a00000000b0c37985a04600003731fb0ab15f74e387062d5a0000000049c0edf8a04600009c06dc3761c9ca407a062d5a00000000c7e7557aa0460000ed5439c2fff10bd502062d5a00000000b0c19c9ca046000052c2ccf08106c064c6052d5a000000005848bc44a0460000f0d739a58554ee9fc6052d5a000000004cba7a11a046000014ad822192813a085e052d5a00000000485e572ca04600004dacb99d2769abee19052d5a0000000065a53810a0460000d1478b2a7562baf50d052d5a00000000bce8e1fea0460000da65626afe89649bc2042d5a00000000675a9b02a0460000ee5a4b2021ddbaa083042d5a0000000058b00c64a04600003aebc6cbbef9f21341042d5a000000002d4f630fa04600008560f49b748e3822d5032d5a000000003e8d2676a0460000e4012c5db1fa5248ca032d5a000000003d0eee5ca0460000474611d52689cc2184032d5a000000003143acdea046000004ccb9a3a7ff4eba32032d5a00000000adffc2d7a04600002f"
pkt7 := "87a7d0bb905dd9cd022d5a00000000ad116f7aa0460000b49cf00e56057462a4022d5a0000000056b27f74a046000001a499da9ce04d2c8c022d5a000000000256e19aa04600004e7bac4253c903d689022d5a00000000b1130bf4a04600004af5ff085e7ea9cb51022d5a00000000ae6975a2a04600001d0338681085399150022d5a00000000568b8f28a046000071b69cd0a237ad2c46022d5a00000000616559dca0460000a2b6cc14cbdfa1ed25022d5a000000006c3074aca0460000aa2de6d754dd4432bd012d5a000000006030fa41a04600002aca1553f8b11c34b0012d5a00000000558c2804a0460000bb5bf92c0843e0ac99012d5a0000000056a6911ba046000081862a87a5adf2db7e012d5a00000000126c6f63616c5f706565726c6973745f6e65778ce9030c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d1cdd38a066d5f706f727407a04604747970650801026964051e145a24a1521225096c6173745f7365656e01362a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065fd71310066d5f706f727407a0460474797065080102696405fa49324a8c0c40a0096c6173745f7365656e01312a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c6ccf7aa066d5f706f727407a046047479706508010269640543eace428b25b1d3096c6173745f7365656e01312a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700632079a14066d5f706f727407a04604747970650801026964058740365aeee32a5a096c6173745f7365656e01262a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064db2817c066d5f706f727407a046047479706508010269640564786ac517d7504c096c6173745f7365656e01fd292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b93b65fb066d5f706f727407a04604747970650801026964058293f1c40ffdfb3e096c6173745f7365656e01cd292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700651414e6d066d5f706f727407a04604747970650801026964050abaf4050f9ed985096c6173745f7365656e01bc292d5a000000000c03"
pkt8 := "6164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700672620312066d5f706f727407a0460474797065080102696405656c3b6dd65dbb45096c6173745f7365656e019f292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3ac1411066d5f706f727407a2460474797065080102696405a0acc8ba33426269096c6173745f7365656e019a292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c06ea092066d5f706f727407a0460474797065080102696405cf1acf3a47f41ddf096c6173745f7365656e0196292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700649b40d05066d5f706f727407a0460474797065080102696405a62d61498f1d98b9096c6173745f7365656e0148292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700652278f64066d5f706f727407a0460474797065080102696405deb319bafed959dc096c6173745f7365656e0141292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006569b0905066d5f706f727407a046047479706508010269640528bcfbe770b0a1d6096c6173745f7365656e0114292d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d942110b066d5f706f727407a04604747970650801026964055a40b1725aeae591096c6173745f7365656e01d0282d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062d7dc222066d5f706f727407a0460474797065080102696405bb6ce64086eaa3f9096c6173745f7365656e01be282d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065d5b7609066d5f706f727407a046047479706508010269640598584e4e026fdd18096c6173745f7365656e0189282d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700658b74b0f066d5f706f727407a04604747970650801026964054dbeb701f2b0b7a9096c6173745f7365656e0186282d5a"
pkt9 := "000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065ec74a45066d5f706f727407a046047479706508010269640549aa3dbc5aa3fe99096c6173745f7365656e0183282d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006aa4808af066d5f706f727407a04604747970650801026964057949cb645d40e4b5096c6173745f7365656e01c3272d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700642d7e049066d5f706f727407a04604747970650801026964053891254f5195f2bd096c6173745f7365656e01ab272d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700644b8da2a066d5f706f727407a04604747970650801026964059fe839e92e0f23cd096c6173745f7365656e0170272d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d445233b066d5f706f727407a0460474797065080102696405fbf8266d9033c097096c6173745f7365656e010a272d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700664105973066d5f706f727407a0460474797065080102696405019ecb192bdaabdf096c6173745f7365656e01b2262d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065c348c6c066d5f706f727407a0460474797065080102696405c755269aab6a8fcc096c6173745f7365656e0193262d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970068ac93cc6066d5f706f727407f41f047479706508010269640544543d568956ff4e096c6173745f7365656e017e262d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006be105e84066d5f706f727407a04604747970650801026964051e6ba47844b07117096c6173745f7365656e0151262d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c06ea072066d5f706f727407a046047479706508010269640536212e76b101e03a096c6173745f736565"
pkt10 := "6e0121262d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970067659ad2a066d5f706f727407a0460474797065080102696405d2e66223ba274334096c6173745f7365656e01ee252d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c6931ca2066d5f706f727407a0460474797065080102696405711be06c699c3e34096c6173745f7365656e015e252d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c6ff26f2066d5f706f727407a0460474797065080102696405fa5bcee48d283110096c6173745f7365656e0148252d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700650f1d8d5066d5f706f727407a04604747970650801026964056ab44bea6af086a0096c6173745f7365656e0124252d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006054f5481066d5f706f727407a046047479706508010269640585aaf3d3ceb9195e096c6173745f7365656e011e252d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970066d78e636066d5f706f727407a0460474797065080102696405f8cd24472dca88e9096c6173745f7365656e0115252d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a2fd4145066d5f706f727407a04604747970650801026964056a6180174ebc1ab3096c6173745f7365656e01fa242d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b01f7552066d5f706f727407b06d0474797065080102696405f7eac19a4d3128dd096c6173745f7365656e01f8242d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700605ba491d066d5f706f727407a04604747970650801026964058ccec43406a7e4ea096c6173745f7365656e01f2242d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064a402b86066d5f706f727407a046047479706508010269640527d07f355b65b2f1096c61"
pkt11 := "73745f7365656e01f0242d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700647cf3fc0066d5f706f727407a046047479706508010269640536023345e4759030096c6173745f7365656e01b9232d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700668ed9fd7066d5f706f727407a04604747970650801026964058b773b5448d437fc096c6173745f7365656e01aa232d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006bad56a01066d5f706f727407a04604747970650801026964053874d4d754dea821096c6173745f7365656e0134232d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700679df096f066d5f706f727407a0460474797065080102696405838ed6473815e395096c6173745f7365656e012a232d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006056b331e066d5f706f727407a0460474797065080102696405bb60159a185d57ef096c6173745f7365656e0118232d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006ba5d3e08066d5f706f727407a0460474797065080102696405d8cda4f8b8a6fccc096c6173745f7365656e010e232d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d4a4af80066d5f706f727407a0460474797065080102696405dbf29eb6976bee17096c6173745f7365656e01ff222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006bca70c31066d5f706f727407a0460474797065080102696405d1ed41a93c82a5e9096c6173745f7365656e01cd222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700679ad62dc066d5f706f727407a0460474797065080102696405a43e986cea7e962a096c6173745f7365656e019a222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063a6eaced066d5f706f727407a0460474797065080102696405869f779d51"
pkt12 := "9a29ea096c6173745f7365656e0169222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b996bdb5066d5f706f727407a04604747970650801026964053cbb78ca57fe825e096c6173745f7365656e0147222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700669e3627a066d5f706f727407a0460474797065080102696405605d15da34571d64096c6173745f7365656e0142222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006465f4dca066d5f706f727407a04604747970650801026964059ae6231712883c46096c6173745f7365656e0142222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064055e3e7066d5f706f727407a0460474797065080102696405d7ead28dfb7cf1da096c6173745f7365656e0134222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006bcc25752066d5f706f727407a04604747970650801026964056f78b8dbd4e04adc096c6173745f7365656e012d222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006bd0d4cbe066d5f706f727407a0460474797065080102696405da021f6b3fe046c1096c6173745f7365656e011d222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006af9f43d6066d5f706f727407a04604747970650801026964052d7bf3d9389ffb99096c6173745f7365656e0117222d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006188a4a8b066d5f706f727407a0460474797065080102696405eeb803ba1ef91d79096c6173745f7365656e01fd212d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063ed2681f066d5f706f727407a1460474797065080102696405353beec5dd1e2a9e096c6173745f7365656e017c212d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700655f48d1c066d5f706f727407a04604747970650801026964"
pkt13 := "05a3400009e9844c0b096c6173745f7365656e0149212d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700649bd66ef066d5f706f727407a0460474797065080102696405f18d66ed9022ad09096c6173745f7365656e0148212d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700651ca9bb2066d5f706f727407a0460474797065080102696405809988312336b22f096c6173745f7365656e0139212d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d5f0b63c066d5f706f727407a04604747970650801026964051e6afbd4fd51e075096c6173745f7365656e0134212d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700657d8715e066d5f706f727407a04604747970650801026964059cddc760e42ffbf5096c6173745f7365656e01f6202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700636e50655066d5f706f727407a0460474797065080102696405f5227c57d494ac9a096c6173745f7365656e01e9202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006567e0c4d066d5f706f727407a0460474797065080102696405587db2d322e353b5096c6173745f7365656e01d2202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006442e0e3b066d5f706f727407a04604747970650801026964055ab660e3de256563096c6173745f7365656e01cb202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064e54fb50066d5f706f727407a046047479706508010269640575523816cd9cf2f1096c6173745f7365656e0189202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006516a4f90066d5f706f727407a0460474797065080102696405d61f18f76820c9f1096c6173745f7365656e0181202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970066c2d24cc066d5f706f727407a04604747970"
pkt14 := "65080102696405d9c81eac54baf7f6096c6173745f7365656e017f202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f6164647265"
pkt15 := "73733e28290c08046d5f697006560e8f79066d5f706f727407a0460474797065080102696405ec547410ae3fd403096c6173745f7365656e015a202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006340f51ce066d5f706f727407a0460474797065080102696405dc34bf69c38ae5d6096c6173745f7365656e0152202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006aa4e6146066d5f706f727407a0460474797065080102696405db1fa70f77e73dd6096c6173745f7365656e012d202d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b0d7fa3f066d5f706f727407a04604747970650801026964054bb07dfcf4e6890c096c6173745f7365656e01cc1f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700644ca6ee3066d5f706f727407a0460474797065080102696405d5865c1dd372a1ba096c6173745f7365656e01a21f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970060e205b86066d5f706f727407a04604747970650801026964058dd26b584ab55719096c6173745f7365656e01a11f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700695ca324a066d5f706f727407a04604747970650801026964059a3a9ef27b77f282096c6173745f7365656e01981f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065b798ca7066d5f706f727407a0460474797065080102696405b3c9d8ae8975cffa096c6173745f7365656e01841f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065e2a8c4d066d5f706f727407a046047479706508010269640578b5cedbd290b842096c6173745f7365656e015a1f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006442dc4f4066d5f706f727407a04604747970650801026964056b4679bfcef716b2096c6173745f7365656e01571f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b"
pkt16 := "5f616464726573733e28290c08046d5f69700652291660066d5f706f727407a04604747970650801026964055e9457952bce50cd096c6173745f7365656e01ad1e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700618710dc7066d5f706f727407a0460474797065080102696405778306285e7ab66b096c6173745f7365656e01a81e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006daea3f6e066d5f706f727407a0460474797065080102696405a0c6e7d127af9177096c6173745f7365656e018e1e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006524541ca066d5f706f727407a0460474797065080102696405c14d04995da839c7096c6173745f7365656e017a1e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d8f689a6066d5f706f727407a0460474797065080102696405fdd4138e79e8982a096c6173745f7365656e01771e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065602b855066d5f706f727407a0460474797065080102696405913cdaeab53c6371096c6173745f7365656e016d1e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006506b49a1066d5f706f727407a0460474797065080102696405b1ddf05dc6be790b096c6173745f7365656e011d1e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3ac123d066d5f706f727407a2460474797065080102696405cc6bfbb7fa2bbe42096c6173745f7365656e01e81d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064bac6c1f066d5f706f727407a04604747970650801026964052eb6e73d4d67f81c096c6173745f7365656e01e21d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970068ac98860066d5f706f727407a0460474797065080102696405116f2c033e504f15096c6173745f7365656e01d41d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e"
pkt17 := "6574776f726b5f616464726573733e28290c08046d5f6970062e0b4119066d5f706f727407a0460474797065080102696405626b6c58922342d0096c6173745f7365656e01c31d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700605bdc09f066d5f706f727407a0460474797065080102696405aba76ed16edcbc60096c6173745f7365656e01b71d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970067ca871ab066d5f706f727407a0460474797065080102696405119a899dda114998096c6173745f7365656e01991d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062ead2989066d5f706f727407a0460474797065080102696405d9acc674e377271d096c6173745f7365656e01931d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c2be0b27066d5f706f727407a04604747970650801026964053a05693c409ba2bd096c6173745f7365656e015e1d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700643bc4386066d5f706f727407a046047479706508010269640554c5cf9bcd0ec108096c6173745f7365656e013c1d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c64a35ab066d5f706f727407a046047479706508010269640583bab533d150fadb096c6173745f7365656e01101d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062df70d06066d5f706f727407a0460474797065080102696405b4c9fcb561bce1d4096c6173745f7365656e01d51c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970"
pkt18 := "06a8eb679e066d5f706f727407a046047479706508010269640564ed073fd245007d096c6173745f7365656e01401c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700643958154066d5f706f727407a04604747970650801026964052997c4e037048ac6096c6173745f7365656e01391c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b025a95b066d5f706f727407a0460474797065080102696405797a2cb5020dc535096c6173745f7365656e01f71b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970068ac5b670066d5f706f727407a0460474797065080102696405e2e230417319c2a2096c6173745f7365656e01971b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065b4f07ae066d5f706f727407a0460474797065080102696405269637bc02ef1abe096c6173745f7365656e018c1b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970068d69330b066d5f706f727407a0460474797065080102696405395719f6dd36d812096c6173745f7365656e015c1b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700654f98048066d5f706f727407a046047479706508010269640594f474d261a11f9a096c6173745f7365656e01571b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063b7e944b066d5f706f727407a0460474797065080102696405c928eed89fa41de6096c6173745f7365656e01011b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700648c93c9b066d5f706f727407a04604747970650801026964058db1ac5f9797a0ab096c6173745f7365656e01fc1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d80abee5066d5f706f727407a0460474797065080102696405b496f4eb5680dce5096c6173745f7365656e01da1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c"
pkt19 := "08046d5f6970066c333deb066d5f706f727407a04604747970650801026964052d5ed7a7ac343731096c6173745f7365656e01cd1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970068ba244b9066d5f706f727407a046047479706508010269640576f40a10d781b61c096c6173745f7365656e01bc1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065475582b066d5f706f727407a0460474797065080102696405159120bee1a7525c096c6173745f7365656e01a01a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700668881108066d5f706f727407a046047479706508010269640501dbba89e194eb13096c6173745f7365656e019f1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700643085ee2066d5f706f727407a04604747970650801026964053b3085cbe3095193096c6173745f7365656e019d1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970069e8ccaac066d5f706f727407a04604747970650801026964057bcc12ac2fd4ec41096c6173745f7365656e012f1a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b21b88cd066d5f706f727407a04604747970650801026964052b595b3733f57c56096c6173745f7365656e0186192d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065bd7e351066d5f706f727407a0460474797065080102696405b638cec7dfb7be8c096c6173745f7365656e0178192d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970068f597145066d5f706f727407a0460474797065080102696405d6a407050a822892096c6173745f7365656e0163192d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006253b61bd066d5f706f727407a04604747970650801026964056bc053b4cdfd0be5096c6173745f7365656e01ea182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f6164647265"
pkt20 := "73733e28290c08046d5f6970064a50ed5e066d5f706f727407a0460474797065080102696405bef140ccc7dcf481096c6173745f7365656e01df182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700692c75155066d5f706f727407a04604747970650801026964055a38b1e55e5318d1096c6173745f7365656e01cd182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006af24d788066d5f706f727407a0460474797065080102696405d8f1b5eeacb97274096c6173745f7365656e01c4182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006585b1c7c066d5f706f727407a046047479706508010269640519fb32baa195f121096c6173745f7365656e01b7182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700642113069066d5f706f727407a0460474797065080102696405ca868ba31fd0ed9f096c6173745f7365656e0193182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700653e44365066d5f706f727407a04604747970650801026964053389aa202a53dbea096c6173745f7365656e0150182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064a8bf1dd066d5f706f727407a046047479706508010269640538559bb7d3f52fee096c6173745f7365656e0143182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700656a937f8066d5f706f727407a046047479706508010269640583632110dbb20d64096c6173745f7365656e0130182d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b0d4e860066d5f706f727407a0460474797065080102696405767853706dc141e0096c6173745f7365656e01c0172d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062a76bd6a066d5f706f727407a046047479706508010269640572c4a28309b6dc0e096c6173745f7365656e01aa172d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b"
pkt21 := "5f616464726573733e28290c08046d5f69700605c781ea066d5f706f727407a046047479706508010269640579634df91a79eed1096c6173745f7365656e01a5172d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064d460151066d5f706f727407a04604747970650801026964051e6c75c66f5429f1096c6173745f7365656e0136172d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006524b5de1066d5f706f727407a0460474797065080102696405dc22c083d1053d57096c6173745f7365656e010d172d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970061f23ad26066d5f706f727407a0460474797065080102696405cc24fe35f2a84c23096c6173745f7365656e01d0162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a772d28d066d5f706f727407a046047479706508010269640553be187ce01848ff096c6173745f7365656e01be162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3ac0d54066d5f706f727407a0460474797065080102696405dbc278d5c71a3fb8096c6173745f7365656e01b8162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700618bac39a066d5f706f727407a04604747970650801026964055513dad620e59e55096c6173745f7365656e0184162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970067bf3138c066d5f706f727407a04604747970650801026964052feb5e81676ecf59096c6173745f7365656e0182162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006deea0a0c066d5f706f727407a04604747970650801026964058abb018ee61980b1096c6173745f7365656e016d162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d47866d5066d5f706f727407a0460474797065080102696405038f82ecf8103e78096c6173745f7365656e0164162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e"
pkt22 := "6574776f726b5f616464726573733e28290c08046d5f6970065a41157b066d5f706f727407a04604747970650801026964052b223aed5fc784b7096c6173745f7365656e0161162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062585c11a066d5f706f727407a0460474797065080102696405caf332866c4ab43a096c6173745f7365656e014f162d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006bad653f6066d5f706f727407a0460474797065080102696405f2dc8c348848333f096c6173745f7365656e01f8152d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006546c6cea066d5f706f727407a046047479706508010269640562263b041206d216096c6173745f7365656e01aa152d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064e2e5b86066d5f706f727407b06d047479706508010269640574e3e5edb5b87c01096c6173745f7365656e0198152d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065c3f2db9066d5f706f727407a0460474797065080102696405580b582fb04fbaf8096c6173745f7365656e0193152d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065161fe40066d5f706f727407a0460474797065080102696405140ce0bb7d6753c3096c6173745f7365656e0190152d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d809b134066d5f706f727407a046047479706508010269640522c99d60c5609e7e096c6173745f7365656e0190152d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006819e4279066d5f706f727407a04604747970650801026964054caee8075f93e983096c6173745f7365656e0131142d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006565b2e3d066d5f706f727407a0460474797065080102696405bcbeaaa342e50bdc096c6173745f7365656e01ee132d5a000000000c036164720c082374656d706c6174652061733c"
pkt23 := "697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700644eb39fa066d5f706f727407a04604747970650801026964059731416c8258768a096c6173745f7365656e01ec132d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970066c0419b1066d5f706f727407a046047479706508010269640542681128e219389a096c6173745f7365656e01c0132d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064ea94775066d5f706f727407a04604747970650801026964058a68504d7542f985096c6173745f7365656e01b5132d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006558fb88d066d5f706f727407a04604747970650801026964055feacafbb881ca72096c6173745f7365656e019d132d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3ac223a066d5f706f727407a04604747970650801026964051b5aad98b945b0a6096c6173745f7365656e0134132d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700650f1d3bc066d5f706f727407a04604747970650801026964057f00b39fbac2a2d2096c6173745f7365656e0127132d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3acff39066d5f706f727407a0460474797065080102696405b1d3267909bae7e5096c6173745f7365656e0170122d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006be62021b066d5f706f727407a0460474797065080102696405cc5acc2be5f2b10f096c6173745f7365656e0147122d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700625b6986c066d5f706f727407a0460474797065080102696405a4b15b169158a015096c6173745f7365656e01c6112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b028c01b066d5f706f727407a04604747970650801026964058efbb33df658f4af096c6173745f7365656e01ba112d5a000000000c036164720c082374656d706c61"
pkt24 := "74652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006591b0587066d5f706f727407a0460474797065080102696405afc949f19ae28c63096c6173745f7365656e0195112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970061806b371066d5f706f727407a04604747970650801026964054660018f27ac16cb096c6173745f7365656e017f112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700602566daa066d5f706f727407a0460474797065080102696405e253da8371fba38c096c6173745f7365656e0171112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700679dd4525066d5f706f727407a0460474797065080102696405bc86deeaa78d8d51096c6173745f7365656e0164112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062bfc6f6a066d5f706f727407a0460474797065080102696405075c9f398eba224e096c6173745f7365656e013c112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700654b912ad066d5f706f727407a0460474797065080102696405e39d3c5230cb953d096c6173745f7365656e0138112d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700652fd6f1b066d5f706f727407a0460474797065080102696405596cb6bf116f38e3096c6173745f7365656e01a2102d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006488c5602066d5f706f727407a0460474797065080102696405fc7c10885b0de0d5096c6173745f7365656e018d102d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3acff34066d5f706f727407a0460474797065080102696405b0c19a820f57e351096c6173745f7365656e018d102d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d4b69b2d066d5f706f727407a046047479706508010269640510b4ef63f0456a87096c6173745f7365656e0183102d5a000000000c036164720c0823"
pkt25 := "74656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700644292257066d5f706f727407a04604747970650801026964054800b3f181b891a3096c6173745f7365656e011c102d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b16204af066d5f706f727407a0460474797065080102696405de954b6acb9fe67a096c6173745f7365656e010d102d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006cbdb2566066d5f706f727407a046047479706508010269640541c285cd8d83ad03096c6173745f7365656e01e70f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700648cc2527066d5f706f727407a0460474797065080102696405aaf77cb662a45c44096c6173745f7365656e01760f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063ed2bd6a066d5f706f7274076846047479706508010269640581e6000b164f1b8c096c6173745f7365656e01220f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700648da8b39066d5f706f727407a04604747970650801026964058ffd383095c6a500096c6173745f7365656e010f0f2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c39afabc066d5f706f727407a0460474797065080102696405badb0eddf1401bcc096c6173745f7365656e01d10e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970069e45f285066d5f706f727407a0460474797065080102696405a4d5b6cb15d775bc096c6173745f7365656e01af0e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b3db6915066d5f706f727407a0460474797065080102696405c03e41b41c52218c096c6173745f7365656e01a00e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700625eb46cf066d5f706f727407a0460474797065080102696405fcda3bedbac144b8096c6173745f7365656e01810e2d5a000000000c03"
pkt26 := "6164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700664203122066d5f706f727407a0460474797065080102696405d2f4fd49e43aee8a096c6173745f7365656e01630e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006590e6880066d5f706f727407a04604747970650801026964052d06b312ae4da3aa096c6173745f7365656e01470e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700676d1fca8066d5f706f727407a0460474797065080102696405e350dc70e91faaae096c6173745f7365656e013a0e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006567ea70f066d5f706f727407a0460474797065080102696405593ad0d815bf46a3096c6173745f7365656e01390e2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c5f53004066d5f706f727407a0460474797065080102696405706c5da464ac04ff096c6173745f7365656e01700d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c654df93066d5f706f727407a04604747970650801026964059233e6310c64bc74096c6173745f7365656e015c0d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700651eb2b34066d5f706f727407a0460474797065080102696405dbd7e2452e452a97096c6173745f7365656e010b0d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006cbdd045e066d5f706f727407a04604747970650801026964058ed3d5f429f1f50c096c6173745f7365656e01090d2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700655cc6110066d5f706f727407a0460474797065080102696405bce41a041bba6ac1096c6173745f7365656e01c30c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064ddd4c42066d5f706f727407a046047479706508010269640569958c02c54bf2af096c6173745f7365656e017d0c2d5a"
pkt27 := "000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064f4be504066d5f706f727407a0460474797065080102696405d198c12f826920a7096c6173745f7365656e01790c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d5c50f7e066d5f706f727407a0460474797065080102696405f6a0b5467f05b205096c6173745f7365656e01730c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006cbdad4bd066d5f706f727407a0460474797065080102696405c25bc4cfafd51667096c6173745f7365656e01590c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006052343f1066d5f706f727407a046047479706508010269640543687e9093c4a8e5096c6173745f7365656e01560c2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065c26ed81066d5f706f727407a04604747970650801026964051a33225cb494e9f1096c6173745f7365656e01fc0b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062e303e99066d5f706f727407a04604747970650801026964055633b701fd83b07b096c6173745f7365656e01f90b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700664022677066d5f706f727407a0460474797065080102696405334fd27483c03c53096c6173745f7365656e01f40b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063ed25ee1066d5f706f727407a746047479706508010269640569e745cde93841c5096c6173745f7365656e01e20b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970067d294aef066d5f706f727407a0460474797065080102696405647585d27f9d01a1096c6173745f7365656e01aa0b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064246dde0066d5f706f727407a0460474797065080102696405e8202e86eab81cf7096c6173745f736565"
pkt28 := "6e01900b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063bb2a1a3066d5f706f727407a046047479706508010269640587f958a58a5edf58096c6173745f7365656e01600b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006cc2c60ae066d5f706f727407a04604747970650801026964051ac6163a952e1e14096c6173745f7365656e01510b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3acff36066d5f706f727407a0460474797065080102696405fd6552d454a535a8096c6173745f7365656e01440b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063ed25ee1066d5f706f727407a646047479706508010269640567b6521faa80a58f096c6173745f7365656e01410b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700677ed6acf066d5f706f727407a04604747970650801026964051381c53afe90abaa096c6173745f7365656e01020b2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063def0cd8066d5f706f727407a04604747970650801026964055506e9319df085d1096c6173745f7365656e01af0a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006de895d55066d5f706f727407a0460474797065080102696405fc57428c8df06894096c6173745f7365656e01ab0a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700618ba77ef066d5f706f727407a046047479706508010269640569986492a2f830bc096c6173745f7365656e01a80a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700656bc14d3066d5f706f727407a046047479706508010269640591943c25ed4c5080096c6173745f7365656e01740a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006af88623c066d5f706f727407a04604747970650801026964055eea824cee690714096c61"
pkt29 := "73745f7365656e01720a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d5153025066d5f706f727407a046047479706508010269640577cabc3d0cb226a8096c6173745f7365656e013f0a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006423944e4066d5f706f727407a04604747970650801026964058f06566ca4144c22096c6173745f7365656e013f0a2d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700649e50006066d5f706f727407a046047479706508010269640524443fb9ab86d621096c6173745f7365656e01e9092d"
pkt30 := "5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064d66d2a0066d5f706f727407a04604747970650801026964050f157a7fe9e2bd8e096c6173745f7365656e01e8092d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065ac7f5e4066d5f706f727407a0460474797065080102696405e89a776bf4daf58d096c6173745f7365656e01ca092d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065aca6a36066d5f706f727407a0460474797065080102696405f01e6654c8272f4f096c6173745f7365656e01bc092d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006adf7e926066d5f706f727407a0460474797065080102696405c476478ce765c60e096c6173745f7365656e011c092d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006d0750beb066d5f706f727407a0460474797065080102696405ef12fda0c8980dcf096c6173745f7365656e01d7082d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700660087525066d5f706f727407a0460474797065080102696405b87b36c8f4d6642b096c6173745f7365656e01aa082d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006276d9971066d5f706f727407a0460474797065080102696405ef2863ae135dd146096c6173745f7365656e0138082d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064ad3433d066d5f706f727407a0460474797065080102696405287ca4e84380440f096c6173745f7365656e0114082d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065b796e86066d5f706f727407a0460474797065080102696405516bd12b232ad642096c6173745f7365656e018b072d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065d8f68f2066d5f706f727407a0460474797065080102696405704ad266f503c5cf096c6173745f7365"
pkt31 := "656e017c072d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006a3ac1325066d5f706f727407a0460474797065080102696405bd02703a979f621c096c6173745f7365656e015a072d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006ae8a208e066d5f706f727407b06d04747970650801026964051e9cf30ad73aad48096c6173745f7365656e0104072d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b9a5449a066d5f706f727407a04604747970650801026964056f664b9b290351a3096c6173745f7365656e0103072d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700673db2303066d5f706f727407a0460474797065080102696405dc4f0b624ba2ea30096c6173745f7365656e01db062d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064b8cf4c0066d5f706f727407a046047479706508010269640525cf9eab20ef6c2a096c6173745f7365656e018a062d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b0c37985066d5f706f727407a04604747970650801026964053731fb0ab15f74e3096c6173745f7365656e0187062d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700649c0edf8066d5f706f727407a04604747970650801026964059c06dc3761c9ca40096c6173745f7365656e017a062d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006c7e7557a066d5f706f727407a0460474797065080102696405ed5439c2fff10bd5096c6173745f7365656e0102062d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b0c19c9c066d5f706f727407a046047479706508010269640552c2ccf08106c064096c6173745f7365656e01c6052d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970065848bc44066d5f706f727407a0460474797065080102696405f0d739a58554ee9f096c"
pkt32 := "6173745f7365656e01c6052d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970064cba7a11066d5f706f727407a046047479706508010269640514ad822192813a08096c6173745f7365656e015e052d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006485e572c066d5f706f727407a04604747970650801026964054dacb99d2769abee096c6173745f7365656e0119052d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700665a53810066d5f706f727407a0460474797065080102696405d1478b2a7562baf5096c6173745f7365656e010d052d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006bce8e1fe066d5f706f727407a0460474797065080102696405da65626afe89649b096c6173745f7365656e01c2042d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006675a9b02066d5f706f727407a0460474797065080102696405ee5a4b2021ddbaa0096c6173745f7365656e0183042d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700658b00c64066d5f706f727407a04604747970650801026964053aebc6cbbef9f213096c6173745f7365656e0141042d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970062d4f630f066d5f706f727407a04604747970650801026964058560f49b748e3822096c6173745f7365656e01d5032d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063e8d2676066d5f706f727407a0460474797065080102696405e4012c5db1fa5248096c6173745f7365656e01ca032d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063d0eee5c066d5f706f727407a0460474797065080102696405474611d52689cc21096c6173745f7365656e0184032d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970063143acde066d5f706f727407a046047479706508010269640504ccb9a3"
pkt33 := "a7ff4eba096c6173745f7365656e0132032d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006adffc2d7066d5f706f727407a04604747970650801026964052f87a7d0bb905dd9096c6173745f7365656e01cd022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006ad116f7a066d5f706f727407a0460474797065080102696405b49cf00e56057462096c6173745f7365656e01a4022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700656b27f74066d5f706f727407a046047479706508010269640501a499da9ce04d2c096c6173745f7365656e018c022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970060256e19a066d5f706f727407a04604747970650801026964054e7bac4253c903d6096c6173745f7365656e0189022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006b1130bf4066d5f706f727407a04604747970650801026964054af5ff085e7ea9cb096c6173745f7365656e0151022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006ae6975a2066d5f706f727407a04604747970650801026964051d03386810853991096c6173745f7365656e0150022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006568b8f28066d5f706f727407a046047479706508010269640571b69cd0a237ad2c096c6173745f7365656e0146022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006616559dc066d5f706f727407a0460474797065080102696405a2b6cc14cbdfa1ed096c6173745f7365656e0125022d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970066c3074ac066d5f706f727407a0460474797065080102696405aa2de6d754dd4432096c6173745f7365656e01bd012d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f6970066030fa41066d5f706f727407a046047479706508010269"
pkt34 := "64052aca1553f8b11c34096c6173745f7365656e01b0012d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f697006558c2804066d5f706f727407a0460474797065080102696405bb5bf92c0843e0ac096c6173745f7365656e0199012d5a000000000c036164720c082374656d706c6174652061733c697076345f6e6574776f726b5f616464726573733e28290c08046d5f69700656a6911b066d5f706f727407a046047479706508010269640581862a87a5adf2db096c6173745f7365656e017e012d5a00000000096e6f64655f646174610c100a6c6f63616c5f74696d65055d2a2d5a00000000076d795f706f727406a04600000a6e6574776f726b5f69640a401230f171610441611731008216a1a11007706565725f6964055b0ae5e603fddefa0c7061796c6f61645f646174610c101563756d756c61746976655f646966666963756c74790506c317fa2b2813000e63757272656e745f686569676874055a4d16000000000006746f705f69640a80531ce53560e2f90c598e5a2c98da4560bc0cc5f95cca18dc144cd791830c0a520b746f705f76657273696f6e0806"
full_hex := pkt1 + pkt2 + pkt3 + pkt4 + pkt5 + pkt6 + pkt7 + pkt8 + pkt9
full_hex += pkt10 + pkt11 + pkt12 + pkt13 + pkt14 + pkt15 + pkt16 + pkt17 + pkt18 + pkt19
full_hex += pkt20 + pkt21 + pkt22 + pkt23 + pkt24 + pkt25 + pkt26 + pkt27 + pkt28 + pkt29
full_hex += pkt30 + pkt31 + pkt32 + pkt33 + pkt34
binary_buffer, _ := hex.DecodeString(full_hex)
ip_offset := 50 // various offsets in local_peerlist_new
port_offset := 62
peerid_offset := 75
lastseen_offset := 75 + 19
/*
pos := 18 // offset of old ip table
new_pos := 18 + 24*250 + 23 // offset of new ip table
for i := 0; i < 250;i++{ // each entry is 24 bytes
// each 24 byte contains
//4 byte ip, 4 byte port, 8 byte peer_id , 8 byte last_seen
// new structure has only 2 bytes for peer list
zero_pos := new_pos+(i*103)
if i < len(data.PeerArray) {
if data.PeerArray[i].IP.To4() != nil {
}
}
// add a null entry junkpeer
junkpeer := data.PeerArray[i]
_ = pos
_ = junkpeer
// add entry to traditional entry
binary_buffer[pos+(i*24)+0] = junkpeer.IP[12]
binary_buffer[pos+(i*24)+1] = junkpeer.IP[13]
binary_buffer[pos+(i*24)+2] = junkpeer.IP[14]
binary_buffer[pos+(i*24)+3] = junkpeer.IP[15]
binary.LittleEndian.PutUint32(binary_buffer[pos+(i*24)+4:],junkpeer.Port) // packed 8+8+1+4 bytes
binary.LittleEndian.PutUint64(binary_buffer[pos+(i*24)+8:],junkpeer.ID) // packed 8+8+1+4 bytes
binary.LittleEndian.PutUint64(binary_buffer[pos+(i*24)+16:],junkpeer.LastSeen)
// add entry to new entry
binary_buffer[zero_pos+ip_offset+0] = junkpeer.IP[12]
binary_buffer[zero_pos+ip_offset+1] = junkpeer.IP[13]
binary_buffer[zero_pos+ip_offset+2] = junkpeer.IP[14]
binary_buffer[zero_pos+ip_offset+3] = junkpeer.IP[15]
binary.LittleEndian.PutUint16(binary_buffer[zero_pos+port_offset:],uint16(junkpeer.Port)) // packed 8+8+1+4 bytes
binary.LittleEndian.PutUint64(binary_buffer[zero_pos+peerid_offset:],junkpeer.ID) // packed 8+8+1+4 bytes
binary.LittleEndian.PutUint64(binary_buffer[zero_pos+lastseen_offset:],junkpeer.LastSeen)
}
*/
_ = ip_offset
_ = port_offset
_ = peerid_offset
_ = lastseen_offset
//pos = 0x7c2e; // at this point to node data and should be parsed as such
pos := bytes.Index(binary_buffer, []byte("\x09node_data")) // at this point to node data and should be parsed as such
tbuf, _ := data.NodeData.Serialize()
copy(binary_buffer[pos:], tbuf[:])
// pos = 0x7c2e + 91 // at this point to node data and should be parsed as such
pos = bytes.Index(binary_buffer, []byte("\x0cpayload_data")) // at this point to node data and should be parsed as such
tbuf, _ = data.CoreData.Serialize()
copy(binary_buffer[pos:], tbuf[:])
return binary_buffer, len(binary_buffer)
}
func (data *Node_Data_Response) DeSerialize(binary_buffer []byte) (err error) {
/*
if len(binary_buffer) != 32006 {
return fmt.Errorf("Insufficient Buffer")
}
*/
// IP information is not mandatory
logger.Warnf("We are still NOT using Peer information")
/*
// find peer list only if its present
ip_offset := 50 // various offsets in local_peerlist_new
port_offset := 62
peerid_offset := 75
lastseen_offset := 75+19
pos := 18 // offset of old ip table
new_pos := 18 + 24*250 + 23 // offset of new ip table
for i := 0; i < 250;i++{ // each entry is 24 bytes
// each 24 byte contains
//4 byte ip, 4 byte port, 8 byte peer_id , 8 byte last_seen
// new structure has only 2 bytes for peer list
zero_pos := new_pos+(i*103)
var p Peer_Info
p.IP = net.IPv4( binary_buffer[zero_pos+ip_offset],
binary_buffer[zero_pos+ip_offset+1],
binary_buffer[zero_pos+ip_offset+2],
binary_buffer[zero_pos+ip_offset+3])
p.Port = (uint32)(binary.LittleEndian.Uint16(binary_buffer[zero_pos+port_offset:]))
p.ID = binary.LittleEndian.Uint64(binary_buffer[zero_pos+peerid_offset:])
p.LastSeen= binary.LittleEndian.Uint64(binary_buffer[zero_pos+lastseen_offset:])
data.PeerArray = append(data.PeerArray, p)
// fmt.Printf("%+v\n", p)
}
*/
// we need not serialize local_peerlist_new
// however we need to do it when serialize
//pos = 18 + 24*250 + 23 // each new entry is 101 bytes long
//fmt.Printf("new buffer %x\n",binary_buffer[pos:pos+20])
/*
for i := 0; i < 250;i++{ // each entry is 24 bytes
zero_pos := pos+(i*101)
fmt.Printf("%d %x\n",i, binary_buffer[pos+(i*101): pos+(i*101)+101])
}*/
// locate node_data
pos := bytes.Index(binary_buffer, []byte("node_data")) // at this point to node data and should be parsed as such
if pos == -1 {
return fmt.Errorf("Node data not found, its mandatory")
}
//fmt.Printf("node data %x\n",binary_buffer[pos+9: pos+25])
err = data.NodeData.DeSerialize(binary_buffer[pos-1:]) // 9 bytes node_data_len
if err != nil {
return err
}
// fmt.Printf("%+v \n", data.NodeData)
pos = bytes.Index(binary_buffer, []byte("payload_data")) // at this point to node data and should be parsed as such
err = data.CoreData.DeSerialize(binary_buffer[pos-1:])
// fmt.Printf("%+v \n", data.CoreData)
if err != nil {
return err
}
return nil
}
/* deserialize a buffer */
func deserialize() {
hexdata := "01110101010102010108096e6f64655f646174610c100a6c6f63616c5f74696d6505d56b2a5a00000000076d795f706f727406000000000a6e6574776f726b5f69640a401230f171610441611731008216a1a11107706565725f696405a350efa02d3904920c7061796c6f61645f646174610c101563756d756c61746976655f646966666963756c74790501000000000000000e63757272656e745f68656967687405010000000000000006746f705f69640a8048ca7cd3c8de5b6a4d53d2861fbdaedca141553559f9be9520068053cda8430b0b746f705f76657273696f6e0801"
binary_buffer, _ := hex.DecodeString(hexdata)
var n Node_Data
n.Local_time = 1512729557
n.Local_Port = 0
n.Network_UUID.UnmarshalBinary([]byte{18, 48, 241, 113, 97, 4, 65, 97, 23, 49, 0, 130, 22, 161, 161, 17})
n.Peer_ID = 0x4ea0e7e6432fd5ce
result, _ := n.Serialize()
fmt.Printf("SerializeNodeData %s\n", hex.EncodeToString(result))
var c CORE_DATA
c.Current_Height = 1
c.Top_Version = 1
c.Cumulative_Difficulty = 1
copy(c.Top_ID[:], []byte{0x48, 0xca, 0x7c, 0xd3, 0xc8, 0xde, 0x5b, 0x6a, 0x4d, 0x53, 0xd2,
0x86, 0x1f, 0xbd, 0xae, 0xdc, 0xa1, 0x41, 0x55, 0x35, 0x59, 0xf9, 0xbe, 0x95, 0x20, 0x06, 0x80,
0x53, 0xcd, 0xa8, 0x43, 0x0b})
result, _ = c.Serialize()
fmt.Printf("SerializeCoreData %s\n", hex.EncodeToString(result))
boost_deserialize(binary_buffer)
}
// deserialize the buf bytes
func boost_deserialize(buf []byte) map[string]interface{} {
if buf[0] != 1 {
panic("Invalid data")
}
// skip 8 byte signature
pos := 8 + 1
for {
// Decode Container
switch buf[pos] {
case 0x8: // start of structure, decode structure name
length := int(buf[pos+1])
name := string(buf[pos+1+1 : pos+1+1+length])
fmt.Printf("Structure name %s\n", name)
pos += length + 1 + 1
case 0xc:
// everything is key value pair
// jump to specific decoder
key_value_count := int(buf[pos+1])
fmt.Printf("Unknown data type 0xc value %d, 16 values\n", buf[pos+1])
pos += 1 + 1
for i := 0; i < key_value_count/2; i++ {
_, _, done := Decode_Key_Value(buf[pos:])
pos += done
}
default:
fmt.Printf("unknown boost encoding '0x%02x'\n", buf[pos])
goto done
}
}
done:
;
return nil
}
func Decode_Key_Value(buf []byte) (key string, value interface{}, done int) {
pos := 0
key_length := int(buf[0])
key = string(buf[1 : 1+key_length])
fmt.Printf("Key %s ", key)
pos = 1 + key_length
done = 1 + key_length
switch buf[pos] {
case 0x5: // 64 bit little endian
value = binary.LittleEndian.Uint64(buf[pos+1:])
done += 1 + 8
case 0x6: // 32 bit little endian
value = binary.LittleEndian.Uint32(buf[pos+1:])
done += 1 + 4
case 0x7: // 16 bit liitle endia
value = binary.LittleEndian.Uint16(buf[pos+1:])
done += 1 + 2
case 0x8: // single byte
value = (buf[pos+1])
done += 1 + 1
case 0xa: // this is a boost varint decoded elsewhere
value = buf[pos+1+1 : pos+1+1+16]
done += 1 + 1 + 16
default:
fmt.Printf("unknown boost encoding '0x%02x'\n", buf[pos])
}
fmt.Printf("Key %s %+v\n", key, value)
return key, value, done
}