Closed krm35 closed 4 years ago
Ca marche maintenant, merci @kenny94xxhell pour #21
L'update n'a fait que reconstruire le protocole (protocol.js ou protocol.pk en local).
Je n'ai pas acces aux sources de dofus en ce moment, ca va etre complique pour moi de debug.
je vais voir ce que je peux faire
C'est etrange, j'ai l'impression que ce paquet est pas complet. Normalement la longueur des donnees devrait etre 4741 d'apres le header, alors que l'hexa complet fait 1460. Je pense que tu as un probleme de buffer.
Il y a parfois des problemes d'ordre entre les paquets dans le sniffeur, je te recommande d'utiliser le MITM de preference.
Pour le coup, j'utilise mon MITM codé en node.js mais d'après la doc https://nodejs.org/api/net.html#net_event_data je vois pas de limite max sur la taille du buffer
const socket = new net.Socket();
socket.connect({host: ip, port: port});
socket.on('data', function (data) {
const header = data.readInt16BE(0);
if (usefull_headers.includes(header)) {
console.log(header + " " + data.toString('hex'));
}
});
Peut-être que le serveur envoie la payload en 2 fois et que mon MITM ne gère pas ce cas ?
C'est bien ça le problème Ici j'ai reçu le paquet en deux fois, donc aucun problème my bad
906 038a1821ff034101a11800000000000301fee44c66000100065ed40005020000000100086b696c6c6e657874c0cc8d080200000004000d5261636b616d6c65426c65636bc0f0f50b0200000005000d58782d2d6361736f732d2d7858000200000006000c47726f6d7974686f6d616e6500020000000700057370657437ffc1d72f01fee64c65000100065cd10007020000000100074d616e737a656400020000000200095878726f6f6b697858000200000003000a6d65726167652d5a724b00020000000400074d616e737a657200020000000500054d616e737a000200000006000541726b696500020000000700096c756361726e6167650001fee54c67000100065cd00003020000000100084c6f6e67536c696d000200000003000c42726973746f6c5363616c6500020000000500094d616e61706879373100001e00244232ba1200de0000003c00e701ff040001931b000401028e80020f96a4031b6ba004766443000178000102000200066f8911851a811a8e0dde05000901fcc37102811e2403322c2e04811e2405ffe13c07f1d1940844251109c2511c0a0c090200018c010000000848656c6c6477696e009d0008000100040199eaaf01000d4c274170657269636c657474652a6d004425110c00f1d19401a9db0d000450696b4d001550696b616e74696e612773204d657263656e61727909000c09020c00c2511c000198500000019b2770ffff03ffffffff02c13d4e0223004232ba12014e0000002442394d9900de0000003c012200010006289110ff1baf0142f30300070104000002ff000003de000004ffffff05c500000702000008dc000000018c0100010100f301000000000000000000064b757a757261009d0008000000030199efb10100114e696768746d61726520436f6e63657074087800dc0000080002000001984f0000019b2771ffff03ffffffff052fb8c500000042394d99014f0000002442332b9200de0000003c00e7010100075bea10ed1eef1eee1e8c05f01e000501e8ae92021d00010373091304cc1125056808170001870100000006536174616d65009d000800010001019b1678ffff03ffffffff083a212002160042332b920156000000244227221201bc0000003c014d00d820000000000000000102000200067997118b1fa31fb61fcb0a000901feb68402feb684039b62ff04ffffff059b62ff0726283608dddddd092628360affbb4200019101000000075370796361706f009d0008000100050199e20c00055261696a75c87e00dddddd080026283601a9dd1000034b4d4e00084b616d696e6172691500ffbb42080026283600019a000001989b020000019b89018103ffff03ffffffff002c6fbe01640042272212034c000000244238201100de0000003c00e701ff040000000401ffffff02a73749032038440476644300017800010200020006ab1bbc1bcf1c811ae11c8604000901ffffff0220384403ffffff04a73749052038440778231b08eea108096401010af7ba12000191010000000a4e69726f7368696d6161009d0008000100040199d06d00114c652054686f7573616e642053756e6e79560800eea1080c0078231b01a9f20d0003494e4b000d496e63616e64657363656e63650f00f7ba120800640101000198a9010000019b41cd0130000015a70399112b0164004238201101a60000002442278e3401bc0000003c00e701ff040000000401dc143c024b0082034b0082047664430001780001020002000665f910891ad117f51cde050009019d55200299003103a4a6f704e7254005bbbdea07e6b621081c1c1c09ffffff0a12c9a2000191010000000748616e61736865009d0008000100040199cf4200135369787465656e204d657263656e61726965731f08001c1c1c0800e6b62101a9d10b0003524341000f5261696e626f77204372797374616c210012c9a21800ffffff000198bd010000019b54ab01ffff03ffffffff07a9a84602470042278e340312000000244238ab8b00de0000003c00e701ff040000000401fffff002fffff003fffff004766443000178000102000200086e8011971bfd19d217c40aa41bc60e0009012d271f02fbfefe037c660404000000056aded407ffffff0802010009ffffff0a0000000001910100000006476f6b6f7573009d0008000000050199f76500074c612d5a6f6e654eec01000201001f00ffffff01a9f20b00034d4945000a53656175206427656175c702000000000100ffffff00019a00000198b5010000019b4cc701ffff03ffffffff05d3fa640164004238ab8b01a5000000244239400f00de0000003c00e701ff040001fa1a000401fdeec002a2842203a7252804fdf7c90001780001020002000651db10ac0dd8189d18dc07000701f5b95f02ffffff032a2a2a040d438405ffffff07000000087012e500018c010000000a496d2d53757370656374009d0008000100030199acb00100084d696c6c656e6961230f007012e520000000000198b7010000019b11ae01ffff03ffffffff01d31e330228004239400f018c000000244238a70e00de0000003c01c601ff0400000004014b0082024b008203f8bf0104766443000178000102000200071efc0fc11cef1e8e0def16f01e000501e1a23d02ce512f034e3129049b3c2305d787710001780000000d4d61676e75732d53686f76656c009d00080000000201984f0000019b6379ffff03ffffffff05b6eccd021d004238a70e0157000000244238288100de0000003c012f00ff040000000401f200f203fffff002f200f204766443000178000102000200065add10af039a01bf1c9905000701eec49a02caad4c034a44320497813805d4c48f0712218908f0941400018c01000000064b616f6c616e009d0008000000030199c5a601000e4c657320426f75667320546f7574025d00f09414160012218901984f0000019b3760ffff03ffffffff04403bfd01100042382881013e000000244236473e00de0000003c012a00010006788c11921fa11ff61c981c000901ffffff0204000003ff000004ff0000050000000700000008ffffff09ffffff0a1110110001a0010000000e536f736f2d64656c2d467565676f009d0008000000020199db0d000556656e6f6d705700ffffff080000000001a99907000343495400074369746164656ca601001110110500ffffff000330dca8020c004236473e01a6000000244233ad3e00de0000003c01f001aa0e000000000000000102000200060adf0f8a1e891e8b1e981c000901ffffff02000000032868400428684005ece8c407d76a1708ffffff090000000aca97230001870100000013426f6e6e65617562726f772d4c652d53616765009d0008000000040199b08a0100124c61204b77616b6f747465204b696b77616b616e00ffffff1f00d76a1701a9ac0f0003544f50000f41696d20666f722074686520746f708b0100ca97231e00000000150198b9010000019b51e801ffff03ffffffff0167e9990264004233ad3e01a600000024422acf4601bc0000003c012f00841c0001eb1c0004013a3f4e021e2026031e2026041e2026000173000102000200075be510f61bf51bf41bff1c9a1b000901ffc36702f1f9fa031a1f2004121516050000000744545408d6c38a090101010a5f5f5f000187010000000759696e2d73616e009d0008000100040199976a0007416d657279756d53db0100d6c38a150044545401a9b7100003424f57000d42776f726b73206f6620576172bb01005f5f5f12000101010001989d010000019b3ca002ffff03ffffffff0458a20f016400422acf46034c000000244239773700de0000003c013f0001000650cc10fa0c8f012f98070005010403000202020203000000040307080504010000018c010000000b5261676e61722d6d656868009d00080000000008a50cfe0000004239773701130000002442367da500de0000003c0122050100085be510c91cc501dd1cff1ca51b9d0f000901faaf6e02e1741003a4000304000000059d000207000000086c000009ffffff0a96050800018701
1 00010100e70f0000000901faaf6e02e1741003a4000304000000059d000207000000086c000009ffffff0a96050800015a0000000a5a656d7a656d696e686f009d0008000100030199811f00154c6573204469736369706c6573206465205a657573c8c302006c0000180000000001a9b803000353594d000853796d62696f736521009605080800ffffff15019b51e202ffff03ffffffff064eee1e02640042367da501a6000000244227d07801bc0000003c00e705ff040001fb1a000401120d1002fffff003fffff004766443000178000102000200065bea10ac0dd117d2179204000501ffbd5b027a3e0803000000040000000500000000018701000000054172727973009d000800010001019b76c803ffff03ffffffff05d7bee10000004227d078034c000000244231e65000de0000003c00e704ff040000000401120d1002fffff003fffff004766443000178000102000200060be80fd017d1178d1ea318000901f5b95f02000000037008e00402020205020202071165a208fbdab90929041e0affffff00017d0000000d52657679732d58656c69736868009d0008000100040199d40c000a496c6c756d696e6174658a3a00fbdab91f001165a201a9b61100034d594800064d415948454d3a00ffffff0f0029041e000198b6010000019b4ebb01ffff03ffffffff05bb5a31022a004231e6500199000000244238e8d000de0000003c012f00ff0400000004014b008202fffff003fffff00476644300017800010200020006799511b703810134c506000701f9f2da0245422d033c425904e3aa7705404a190793232408010101000191010000000648616e612d7a009d000800010003019987b001000741626164646f6e17e4010001010115009323240198a4010000019b7f8a010d000017f5085095cf0201004238e8d001680000002442341fd900de0000003c00e706ff040000000401dc143c02dc143c03f8bf01047664430001780001020002000650cc10b41ae91331bf1a000901ffd27c02f9922b03ffffe1042c677005de32070702000008ffffff09000a2f0affffff00018c01000000075265797a6f6f6e009d0008000000020199bc9a0100054e45524453571d00ffffff080002000001a9cd10000345494e000945696e686572696172e90100ffffff1800000a2f00084a5dab00000042341fd901a6000000244235ac5a00de0000003c020b06ff040000000401982835026718210398283504766443000178000102000200075be4108f1fa01fc20d971aaa0c000701f2c974026718210398283504671821059828350798283508f2c97400018701000000064578796d6f7a009d0008000100040199cba801000a537461722d6c69676874212300f2c9740100982835019a00000198710000019b568102ffff03ffffffff04bec24b0264004235ac5a01a600000024423095c300de0000003c017301010006ff0aa611810d961abc1caa07000901d501dc02ee06fb03e00af804ef0cfc05e100d507000000082bf68c092654840ab7d9d600019b0100010100a70b000000000000000000095275732d526f677565009d0008000100040199dc290006506f7274616c7ca301002bf68c1e0000000001a9ee0f0003505941000655746f7079613400b7d9d60400265484150198a2020000019b75b603ffff03ffffffff07327cea026400423095c301a60000002442387f4f00de0000003c013f010100065be510971b961bd91bca07000901ffc3670225262c0325262c04c3b17b057d977507ffffff08111a27090000000aca97230001870100010100c303000000000001500000000553616b6172009d0008000100040199f0a901000f50697261746573206465204d61727345dd0100111a270800ffffff01a9ac0f0003544f50000f41696d20666f722074686520746f708b0100ca97231e00000000000198c3010000019b5ac701ffff03ffffffff07358ac702550042387f4f01a5000000244222eea601bc0000003c0218060100063cac10b709a6172d991a000901f3efd8026b025d03842a7504b70398050000000705387608ffffff090101010a5f5f5f0001960100010100c201000000000001820100000006546561736565009d0008000000030199e3a60100084d696427537461724d4e00ffffff010005387601a9b7100003424f57000d42776f726b73206f6620576172bb01005f5f5f120001010100019b0fcb011b00002ced077e6dbd0214004222eea6034c000000244222efae01bc0000003c00e7019f2700000003017b2027037b2027024a131700015500010200020005788e11d913e913f613000901f7f7f702747db903181c3904545a86054152c60705387608ffffff090101010a5f5f5f0001a0010000000a4a65616e62726f636865009d0008000000050199e3a60100084d696427537461724d4e00ffffff010005387601a9b7100003424f57000d42776f726b73206f6620576172bb01005f5f5f120001010100019a00000198c2010000019b59c6011e0000000006b7a117024a004222efae0348000000244232f1f200de0000003c00e701010006ff0cbc11dd01bc19f41cb718000901b3794002eba34603fbe15804874e2105da9e13072f2f2f082b9395090200000afac5310001a00100010100c411000000000001460000000a4b65736b656a666f7573009d0008000000040199c21e00044749474d6dc501002b939501002f2f2f01a9e60b000453414e53000d53616e73436f6e50726f6d6973d70100fac531080002000000019a0000019b12df01ffff03ffffffff001afb740214004232f1f201a6000000244229c7de01bc0000003c018200010006799411ac0d980dbf1cc813000901bd780002b8820103ffffff04ffffff050be8f00700000008ffffff090000000aefa04800019101000101008c0b0000000000015a000000064573736d6961009d00080001000401999b7b0011436875706120536f7570652041636964655c860100ffffff080000000001a9f70b0003425a54000e426f7773657220547972616e6e79860100efa0480800000000000198be010000019b56db01ffff03ffffffff0488fea60264004229c7de034c000000244238547c00de0000003c018f039f270000000301eab1e803da70d602da70d6000155000102000200065bea10da1ade1a2dca07000901ffc36702030200030404000400000005ffffff0700000008da0000090100020affffff00018701000000074f6372617a616f009d0008000100040199989d01000b426c6f6f64204c6f74757341b80100da00001c0000000001a99e1000054f5244454d000e4f7264656d20646520456c697465ea0100ffffff0f00010002000198760000019b27b501ffff03ffffffff07604e36020c004238547c01930000002442226bda01bc0000003c012f00010005799411961fa21fca07000701f9f2da029a81620396010004231d1005f2b20007060f8a0826e3a10001910100010100f20100000000000141000000074d6f6c746f6e65009d0008000100030199cc49000b5468652044657374696e79293a0026e3a11f00060f8a01984f0000019b0ebf01ffff03ffffffff0778770100000042226bda033a000000244235176500de0000003c011e029f270001c21d0003010b131502b4001a03d6d9a5000155000102000200085adc10c01dbf1dbe1dcb0aa41bb40e000901ffc86702f3fdfe03018e9e04f1b80d05f1b80d079d121908ffffff09ffffff0aed933700018c010000000b4a6f652d4761617264656e009d0008000000050199f54a00154275636b657420547265697a652054656e6465727338da0100ffffff11009d121901a9f7100003504143001050736575646f2041752043656e747265b10100ed93371500ffffff00019a0000019898010000019b3cc701ffff03ffffffff072c411b0221004235176501a50000002442396a6700de0000003c016502ff040000000401dc143c02fffff003fffff0047664430001780001020002000650cc10961fa21fb91fa5040007015b4d15024a478603b0aed2042d2b530584839e0700000008adadae00018c010000000d43727573616465722d4b696e67009d0008000000010199e2b20100154c65732043686576616c696572732064752053656c011700adadae0c000000000833fc8a00000042396a670120000000070050000435720000006a000100db9d010639cdba00000100500007e43900000010000100db720639cdbf000001005000065ed40000012c000200db54064382f300db61064382f6000001005000065cd10000012c000100db5406438c8a000001005000065cd00000012c000100db5406438d83000001005000065677ffffffff000100dbb8010639ceab00000000500004357a00000078000100dbaf01064352ac00000000020007e3aaf50100010007e439d90100010000000001000cd501e301e401f101f201800281028e028f029d029e02ab02000cc902d702d802e502e602f402f50282038303910392039f0359991de44c000100065ed401ff020000000100086b696c6c6e657874c0cc8d08599922e44c000100065ed401ff0200000004000d5261636b616d6c65426c65636bc0f0f50b59991fe44c000100065ed401ff0200000005000d58782d2d6361736f732d2d78580059991ee44c000100065ed401ff0200000006000c47726f6d7974686f6d616e650059991ae44c000100065ed401ff020000000700057370657437ffc1d72f599939e64c000100065cd10200020000000100074d616e737a656400a31000104d616e737a2050726f7065727469657346fa01000016162200382525599937e64c000100065cd10200020000000200095878726f6f6b69785800b229000d4c757820556d62726120446569813f00ffeb9908001f2a3659991ce64c000100065cd101ff0200000003000a6d65726167652d5a724b0059993ae64c000100065cd10200020000000400074d616e737a657200953400114d616e737a20436f72706f726174696f6e7fb702004a4b332200272727599934e64c000100065cd10200020000000500054d616e737a0068000e4d616e737a20506164646f636b735a9d0200fffc912200410004599917e64c000100065cd101ff0200000006000541726b696500599935e64c000100065cd10200020000000700096c756361726e616765008c1c000a466f6c20446520446f6c77e00100f9b8001f00133a36599934e54c000100065cd00200020000000100084c6f6e67536c696d008d8a010009486f6e65794d6f6f6e3db90100f8dba5080036333159991ee54c000100065cd001ff0200000003000c42726973746f6c5363616c650059993ae54c000100065cd00200020000000500094d616e61706879373100c75100104c274175726f726520506f7572707265330800ffca640f00ab1e1f5d419e0a415591fb4000000013000e000000110000000300000014000000130000001300000003000000260000001100000029000000290000004c00000016000000110000000f00010000000a00064a41526a617200141fd997d14d9e894dbff000000000000064880e904e904e88278827c511b02200000309ffffd8f0904e904e904effffffff00000000406e00000000000000000000050000027dac02766464d90b0001de81e4fec10200010002a90b42341fd900de00000008000edd18000600e7013b015601fe020c022800014227d07801bc00000edd140004012801260134015000014236473e00de00000edd18000601b60066003000310016001700014235ac5a00de000002c0
Oui, il faut utiliser un buffer comme dans LaBot. Je ne lis pas de message tant qu'il n'y a pas suffisament de bytes dans le buffer.
hello, juste une petite question, c'est bien la méthode lenlenData qui permet de savoir en combien de messages la payload est envoyée ?
def lenlenData(self):
if len(self.data) > 65535:
return 3
if len(self.data) > 255:
return 2
if len(self.data) > 0:
return 1
return 0
Lenlendata est le nombre de bytes sur lesquels la longueur du paquet est encodée
Plop,
Merci pour ton super décoder. J'essaye d'extraire les infos du paquet 226 (MapComplementaryInformationsDataMessage) mais le programme lève une exception. Est-il possible que le protocole ait changé ou le problème vient d'une mauvaise récupération de la payload ?