-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathanalyze.js
81 lines (71 loc) · 9.32 KB
/
analyze.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
const SOEProtocol = require("./SOEProtocol");
SOEProtocol.analyze = true;
function display(obj) {
console.log(JSON.stringify(obj, null, 2));
}
function decode(hex) {
display(SOEProtocol.Decode(hex));
}
/*
display(SOEProtocol.Decode("00024dc864439b7eccda020104000001f0"));
display(SOEProtocol.Decode("000da250fb526b41bb126b047a45e110c24f60495a46077f137d15771a8deead565d61ae8124aeda3194cc6a09a8d75188e0f50220d47b75df0bf3c23d968bed438534664c67979e68591cb18af2e44777fdf23132e7f3e642"));
display(SOEProtocol.Decode("000da250fb52f9417b72f941baf9984dbb805d0c7a7e4c68560efff79dcf1d2a9f5ed96f390eb01b3f39bfe8c06a81208793a55f4ef45c7d1111c701860e35b67a2d0a53add305969e9760048363"));
display(SOEProtocol.Decode("000da2501d0b96322d6da6531d0896302d6f26509d0b6e34d56926529d086e37d50b2c74d377de54334495dcba55dddfba3b99d6143a803e"));
var bufs = SOEProtocol.Encode("ChatSendToRoom", {RoomID: 34773580, Message: "0123456789abcdef1123456789abcdef2123456789abcdef3123456789abcdef4123456789abcdef5123456789abcdef6123456789abcdef7123456789abcdef8123456789abcdef9123456789abcdefa123456789abcdefb123456789abcdefc123456789abcdefd123456789abcdefe123456789abcdeff123456789abcdef0123456789abcdef1123456789abcdef2123456789abcdef3123456789abcdef4123456789abcdef5123456789abcdef6123456789abcdef7123456789abcdef8123456789abcdef9123456789abcdefa123456789abcdefb123456789abcdefc123456789abcdefd123456789abcdefe123456789abcdeff123456789abcdef"});
console.log("000da250fb526b41bb126b047a45e110c24f60495a46077f137d15771a8deead565d61ae8124aeda3194cc6a09a8d75188e0f50220d47b75df0bf3c23d968bed438534664c67979e68591cb18af2e44777fdf23132e7f3e642");
console.log(bufs[0].toString('hex'));
console.log("000da250fb52f9417b72f941baf9984dbb805d0c7a7e4c68560efff79dcf1d2a9f5ed96f390eb01b3f39bfe8c06a81208793a55f4ef45c7d1111c701860e35b67a2d0a53add305969e9760048363");
console.log(bufs[1].toString('hex'));
console.log("000da2501d0b96322d6da6531d0896302d6f26509d0b6e34d56926529d086e37d50b2c74d377de54334495dcba55dddfba3b99d6143a803e");
console.log(bufs[2].toString('hex'));
*/
//decode("00020124305e10047ba0020104000001f0");
//3126
//decode("0009a0420409c74604960b91318e0b91318e0b91318e0b91318e0b91328e58c6759f58b410f331d7639c57b40cee35d5629a5ca6659a18cf16f977bd72fa77ee25bd66ee57d80a8734ab65e157c4178336aa63ea45ad63ae2cde00c15eba00c15eba00c15eba00c15eba02c15eba65c55e25a9126b3da9126b3da9126b3da9126b3da912683dfa452f2cfa374a409354392ff537565d97563829fe253f29ba4c4c4ad53e2849d56d7f0ec46d0d6ba8046e18c7620d77b5006c19c1691f1ec12d766da2420409a2420409a2420409a2420409a6420409c14604960d91318e0d91318e0d91318e0d91318e0d91328e5ec6759f5eb410f337d7639c51b40cee33d5629a5aa6659a1ecf16f971bd72fa71ee25bd60ee57d80c8734ab63e157c4118336aa65ea45ad65ae2cde06c15eba06c15eba06c15eba06c15eba07c15eba0dc35ed558f43fd558f43fb25cf4a07e8bc1b87e8bc1b87e8bc1b87e8bc1b87e8bc2b82ddc85a92daee0c544cd93aa22aefcd840cf92ac29bc95ac6dd5e6cf02a782cc02f4d58b13f4a7ee7f9dc49d10fba7f26299c69c16f0b59b16b4dce875dbae8c75dbae8c75dbae8c75dbae8c76dbae8c76d3eb");
//3127
//decode("0009a04107102b48b2702848e1276f59e1550a358836795aee5516288c34785ce547725cb22e1633c5437758a0317758a03173a4fa3373a4fa33735c23");
//3657
//decode("0003d8e76771c882570b01429ecbc562570501c24d19ca0d8ddf02fdc618d47a4d91955885dd1a598d91c24053f759d961f5c0936d34217d177188448eb84dbde771b4f8aef8cddd373db7132eb49269002d57299139512f01736cab276a7031a5aa523de5619b8d667833df79d97ac9feffbd1b1a6d71e7266b77f1864977aff0746476f989");
//3658
//decode("0003d8e77773bd97fc486a373488aac7250029a1153218912500646dd65ffe7c1e907e8e5f70cb6db4fd8bc7b57567d8c96112d2840a2922245cc8126cf24a93ff73d3d26dfc4a33be21a60e9ed43db0d9e57c0999f66475ffffa5cd33bf4bab93935cb8d06fffa1eff7e7f31c772bf923085e696a724e6e4371d70ccf79d0cd8f070fecdc012becdc6bddc76e6a8705");
//3859
//decode("0003d8e76771c882d79fa862b3ffc9f2679caf6ad36d7c76956b7a70b0ed9a00c75038d45b9cdc36a72838ca058cfc7697409e4b70cc5a594d5b963bed131c3da92a0f6d10260188514610c5d90476659b5d6a6f8616f924b4e50a243e94274f0bd396");
//4066
//decode("0003d8e76771c8821784aa6273e4cf07036ff4d0a3a3341053b2bc9335828ea205b2bc1ee5d22c1fd7ca1ebfab9ecedf547e6d77071637ac861182a60150a0a6d91dad4aa1b3c4");
//4608
//decode("0009a07d0409a67c042bba814723b88182b04cc982b04cd9ce");
//decode("0009d8e76760bf770303db2791fa300b5738907d2719177d241d13b0447971d0241db1f108d17501cf2d9014b92b77e81b7f14d518ef88c52b2c1c687e037d22de416668d1bc267ee3da4376b5b6507c30bc1546cab8658cca7dfc9412bcd6d48a25575589bc349143ec2a60a5e91923d551a2039600c84df072b933aa00c762f862992b9e538268ef36f32185183bd9caa798418a93911b34033ffe2fea6580bf448097eb4f802d5d28d7812761");
//decode("0009a03304099236047ecadaec7dca89bb3adb89c95fb7e0aa2cd886c943aae4a82dde8ddb2bdefea258aa9bcf58aa9bcfa451c1cda451c1cd9654c1baceb829b9ceeb7efedfeb0c9bb3826fe8dce40c87ae866de9daef1eefda9c679caef90a9caef90a6255a3086255a3085050a37f08bc4b7c08ef1c3b19ef6e5e75860d2d1ae06e4268820f2c1ceb7c2a1c98055968fd685968fd685994a76a5994a76a6b91a71d337d4f1e332e1859222e6a3c4e47094f21216a2053430b4e272a78482759013b533c6c3b533c6c39af666e39af666e0aac66e5031906e6034a51a1124a23c47e2340b7114523d8632742b6174e31b1170a58c274652aa674652aa6709970a4709970a4429c70d31a7098d01a23cf970b23bdf2674ade81082cbdee7a4edc800e27af860e54d6f57a31bbf57a31bbf1866bb9f1866bb9c3836bce9b6f83cd9b3cd48a8a3ca6efe655c59c8933a6f3fb51c79d8f38b49b8f4bcde8fb2ea0e8fb2ea0ee0774a2ee07747474af8f");
//decode("0009d8e767e0bc770b83deefb57280ee967183ed5deeabcb4d230b015d3fe5af0aab7f3c93f7e3a3056bbc3791f3eba5c85fbcf792cde3630b5540749bc6d8e3c104d4b1e7cc54106941f5a8dbf9d19d4c69ed9e5e598bfbbee3b800a7cd95ecabe30c29ebbd062a3f20f9ab9f36185f52e9bbc7920f7327e275637f86d53f73f4cbf7b6f4b357c3eab294a7");
//decode("0003d8e76771c882974b0f425e8bc162974c0d927e22fb8c6824fd0a25fb5e9285a708b252c09ea2de0b9846b04d50f41367b6b446ab3f1edea06a2fe90a0831bdcfb4993736e48cc475f187f7445d7a2a35d7e10b0cf0d23ea3d4fa0b9271e80b784ba9c8799b83");
//after-reboot.pcapng
console.log("9290 ->");
decode("000100000002042275cb000001f0");
console.log("9297 <-");
decode("0002042275cbc5269c2f020104000001f0");
console.log("9301 ->");
decode("00092f9c26dc099826fa9b11f3fa9b11f3f29b11f3811aa186541aa1865a1a93b66a2fa3825a178eb3622dbe83642cbe633aac1d2ca0f7");
console.log("9304 ->");
decode("0003570045a447652594218541f44515a597277d70e85cc9ede95e5955044e370c2ba9e1ac3225ada072f0ad5c6ef940f1a8ac");
console.log("13328 ->");
decode("0003570045a4476575df8fa5bc1f4b8575d18f256fcd44eaaf0b8c1ae4cc5a9d6f451bbfa70994beaf454ca77123d73e43214e744fe0af9a35a506a3ac6cc35ac5a53a1f8c2c433a15e939f40c601c8e22f9d9ceb3eddfc8e54d95d5616bbce9fb73a4317b595021f13c2009ff3eab39cf8ea8ec27ad3c27c5fdd27f5fa140e6c0668026c1328426f646be9d859d35");
console.log("13331 <-");
decode("00092fab26dc25a926b3709e47b3709e47d4749ed818a3abc018a3abc018a3abc018a3abc018a3a8c04bf4efd14b868abd22e5f9d2448696a026e7f8d44f94ffd40bfd8cb7648fe8b464dcbff375dccd9619b5aee576d3cd8a04b1ace470d8dfe3709cb69013f3c4f413f3c4f413f3c4f413f3c4f415f3c4f41526a5");
console.log("13332 <-");
decode("000d570045753760250fffa415721c1917241a1f91444469d74254f9b04a5a8e67611043ae2d3e8de166f0a2ab2c3c896200eafaac48c62ba701eb05c607c215a2c792d46f27c18d33b59b19a52c018ee7b82388c3e855344ee199a48c82a68adf5bbe009efd58120cca5a88530a0a42c3ce9a8153070a4df307ce54ff8ec271bfd8d832819bc9a2af9a43c69d8e409f5882e9dfc9b0d976cae642be5ae1e435da83c46873c39a79239ca43a0dc4e33c55a9c9e0064cf9afcfae093bacc77b72cab965d734fb6b1f3e63f62d0e58f71c47dcbdf6b0af");
console.log("13333 <-");
decode("000d570045759b4c6bbbd407a5949e4d69bf5761bfb41dacbe3e2d9fbab9969488ad17adc07f7ba105eabe84ac533a60b5c3baaf99e29c9fdaeb38d6d5a8b748a6eed5c138a5b3f06881b667a96dbaa3837dba7967bf2ab03773ba7ca7bceab8377e4a78d77a2eedd7933e6b833346625f5a4663491db547cd5f");
console.log("13334 <-");
decode("00092fa626dc48a226438475135b8475135b8475135b8475135b8475105bd722574ad7503226be334149d8502e3bba31404fd342474f972b342cf859502ff80a0768e90a750d8563167eea0575119867147fec0e6778ec4a0e0b8f257c6f8f257c6f8f257c6f8f257c6f8a257c6fed217cf021f649e821f649e821f649e821f649e821f64ae872a10df972d368951bb01bfa7dd374881fb21afc76c11dfc32a86e9f5dda0a9c5d895ddb4c892fbe20e04ccd4f862fa23de44ecc498d3dcb49c954b82aa626dc2aa626dc2aa626dc2aa626dc2da626dc4aa226438675135b8675135b8675135b8675135b8675105bd522574ad5503226bc334149da502e3bb831404fd142474f952b342cfa59502ffa0a0768eb0a750d8763167ee80575119a67147fee0e6778ee4a0e0b8d257c6f8d257c6f8d257c6f8d257c6f85257c6f85eb45");
console.log("13470 ->");
decode("00035700d5a3b764b5c52780d7a7afffe344a8eca02eb67cf9cf51d337cf55a99bc33bd87cd9af5930e8e95fb648f0d3fa44fc5ff6746c8081bcf8818804b915a306200aba16eaad5e1f9a2f6a7a3a46edfa3cbdeae57920a836a32e949ef616988c8714a2050255308a9bb4e357778984d6556c430dcdcc9f7e8da286fcf6bc4e096f994aea319938c1b12b3867fc0503662506");
console.log("13510 ->");
decode("00032b9c33c510ae33cc10ab30cc821ac250861ac250a41a9107e334e3628f5d8011e03be37e92598210e630f13ea558904a8b1cf939e8738b5de843b6");
console.log("14231 ->");
decode("0003570045a44765f5cd278591ad441545cd228df13cf191a73af797bebc17e7c901b53355cd51d1a979b52d0bdd71919911132cb9a19b36fd8080665c948ee3928d07c6089d622a48f8d012dcc146344ba5a0d34aa5ba7d60e3bb8729");
console.log("14616 ->");
decode("00092f9b26dc299a26fe356765f13767a062c32fa7628040d507b36ee507fe2d");
console.log("14628 ->");
decode("0009570045253790a1465168d5712aa790772c216294416d327a644d8576a5f089925f3c9b102e939ba93b9b420293e1eda3795c63098e5ac9d715f2b3b8b4180e351eef009fc054a8e52ff54258a05fb5590a8132f1709e931b0d1239ec044696dc17854c030a22f41a9851c6496b1b441b78486e1a5cc31ad05df0a5");
console.log("14759 ->");
decode("000957004525336535ae08b29562c872657340f1034372c033734024e47b3026fd772976c35d41c6bcad10129599bdff551ae77a963af67a351ffbc3f73249");