Ankron.... i made it!!! at least 98%
Here is my "log" for what i will talk next:
Packet: 0xA9 (Character list)
Sphere 0.56c
Compressed: B3 0C EC 99 E8 D0 81 7A C2 A8 47 BB 46 C3 83 9F E8 00 00 00 00 00 00 00 00 00 00 00 00 00 23 DD A3 61 C1 CF F4 E5 58 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 62 FA 37 CD E0 00 00 00 00 00 00 02 F2 07 9B 79 B9 A6 C3 E4 67 5B 39 E2 F0 00 00 00 00 08 B2 A0 D2 E0 00 00 1C 5C 39 40 08 91 90 78 F8 8D 00 00 00 00 00 00 01 79 03 CD B3 9D 21 F1 E9 1A D5 E6 D5 EE 88 AF 30 F8 80 00 00 00 C5 1D 87 DD D0 2B 80 0E 2E 1C 20 03 49 C8 70 73 74 83 C4 00 00 00 00 00 00 E6 DF E7 CE 6B 73 90 FC F4 C1 76 B5 8D C7 88 00 00 00 00 51 02 07 6F 00 15 80 07 17 0C 98 03 AA 33 C7 8E 2E 16 AF 17 80 00 00 00 00 00 2F 20 79 B7 9B 1A 81 E1 AB A4 37 6B 58 DC 78 80 00 00 00 02 DD 84 3A CC 00 00 0E 2E 16 00 14 2F 43 83 C5 DA 0C 68 00 00 00 00 00 00 BC 81 E6 D5 E8 7D 11 5E 5A 9A BC C3 70 1D AD 63 71 E2 00 00 00 03 2B 08 56 B3 00 00 07 17 0B 60 07 7E EF 37 DA 8C E8 E1 83 C6 36 0F 40 00 00 00 00 05 E4 0F 36 A4 61 F9 E9 9A D4 3F 88 7C 5D AD 5E E8 8A F3 0F 88 00 00 05 58 58 70 4A 20 25 00 1C 5C 32 10 06 57 74 0F 2D 5E 30 40 00 00 00 00 00 01 79 03 CD A8 CF 10 F8 C1 E2 E1 B7 9B 9B A4 3B 58 DC 78 80 00 00 05 19 F0 A9 EA 00 00 0E 2E 1F 40 07 07 35 61 D2 1F 4B 67 21 F4 F2 00 00 00 00 00 0B C8 1E 6D C7 F4 6A 8D F1 C7 CC 37 6B 58 DC 78 80 00 00 00 11 5D 43 81 D0 00 00 0E 2E 17 04 01 8A 57 E5 DA C7 CC 30 00 00 00 00 00 00 5E 40 F3 6B 1A 1F 8E 37 F8 F1 C9 6B 1B 8F 10 00 00 00 00 AD 3B 03 4C 28 00 00 71 70 A3 A0 01 46 50 34
Decompress: A9 04 58 05 45 73 63 72 69 62 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 73 63 72 69 62 61 39 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 01 59 65 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 53 74 75 72 64 79 20 42 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 37 00 00 03 D2 00 00 00 00 00 00 00 00 00 10 67 80 00 00 00 00 02 4D 69 6E 6F 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 42 61 72 6E 61 63 6C 65 20 54 61 76 65 72 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 AD 00 00 01 97 00 00 00 0F 00 00 00 00 00 10 67 81 00 00 00 00 03 42 72 69 74 61 69 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 77 65 65 74 20 44 72 65 61 6D 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 D8 00 00 06 5D 00 00 00 0A 00 00 00 00 00 10 67 82 00 00 00 00 04 4D 6F 6F 6E 67 6C 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 53 63 68 6F 6C 61 72 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 34 00 00 04 91 00 00 00 00 00 00 00 00 00 10 67 83 00 00 00 00 05 54 72 69 6E 73 69 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 54 72 61 76 65 6C 6C 65 72 27 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 34 00 00 0A B9 00 00 00 00 00 00 00 00 00 10 67 84 00 00 00 00 06 4E 65 77 20 4D 61 67 69 6E 63 69 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 47 72 65 61 74 20 48 6F 72 6E 73 20 54 61 76 65 72 6E 00 00 00 00 00 00 00 00 00 00 00 00 0E 9A 00 00 08 AF 00 00 00 14 00 00 00 00 00 10 67 85 00 00 00 00 07 4A 68 65 6C 6F 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 4D 6F 72 6E 69 6E 67 20 53 74 61 72 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 62 00 00 0E E9 00 00 00 00 00 00 00 00 00 10 67 86 00 00 00 00 08 53 6B 61 72 61 20 42 72 61 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 46 61 6C 63 6F 6E 65 72 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 52 00 00 08 B3 00 00 00 00 00 00 00 00 00 10 67 87 00 00 00 00 09 56 65 73 70 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 49 72 6F 6E 77 6F 6F 64 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A D3 00 00 03 D1 00 00 00 00 00 00 00 00 00 10 67 88 00 00 00 00 00 00 05 80 00 00
Original: ????
And here is my packets:
[B]UltimaPHP 0.1 Pre-Alpha:
Compressed: B3 0C EC 99 E8 D0 81 7a c2 a8 47 bb 46 c3 83 9f e8 00 00 00 00 00 00 00 00 00 00 00 00 00 23 dd a3 61 c1 cf f4 e5 58 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 62 fa 37 cd e0 00 00 00 00 00 00 02 f2 07 9b 79 b9 a6 c3 e4 67 5b 39 e2 f0 00 00 00 00 08 b2 a0 d2 e0 00 00 1c 5c 39 40 08 91 90 78 f8 8d 00 00 00 00 00 00 01 79 03 cd b3 9d 21 f1 e9 1a d5 e6 d5 ee 88 af 30 f8 80 00 00 00 c5 1d 87 dd d0 2b 80 0e 2e 1c 20 03 49 c8 70 73 74 83 c4 00 00 00 00 00 00 e6 df e7 ce 6b 73 90 fc f4 c1 76 b5 8d c7 88 00 00 00 00 51 02 07 6f 00 15 80 07 17 0c 98 03 aa 33 c7 8e 2e 16 af 17 80 00 00 00 00 00 2f 20 79 b7 9b 1a 81 e1 ab a4 37 6b 58 dc 78 80 00 00 00 02 dd 84 3a cc 00 00 0e 2e 16 00 14 2f 43 83 c5 da 0c 68 00 00 00 00 00 00 bc 81 e6 d5 e8 7d 11 5e 5a 9a bc c3 70 1d ad 63 71 e2 00 00 00 03 2b 08 56 b3 00 00 07 17 0b 60 07 7e ef 37 da 8c e8 e1 83 c6 36 0f 40 00 00 00 00 05 e4 0f 36 a4 61 f9 e9 9a d4 3f 88 7c 5d ad 5e e8 8a f3 0f 88 00 00 05 58 58 70 4a 20 25 00 1c 5c 32 10 06 57 74 0f 2d 5e 30 40 00 00 00 00 00 01 79 03 cd a8 cf 10 f8 c1 e2 e1 b7 9b 9b a4 3b 58 dc 78 80 00 00 05 19 f0 a9 ea 00 00 0e 2e 1f 40 07 07 35 61 d2 1f 4b 67 21 f4 f2 00 00 00 00 00 0b c8 1e 6d c7 f4 6a 8d f1 c7 cc 37 6b 58 dc 78 80 00 00 00 11 5d 43 81 d0 00 00 0e 2e 17 04 01 8a 57 e5 da c7 cc 30 00 00 00 00 00 00 5e 40 f3 6b 1a 1f 8e 37 f8 f1 c9 6b 1b 8f 10 00 00 00 00 ad 3b 03 4c 28 00 00 71 70 a3 a0 01 46 50 01
Decompress: A9 04 58 05 45 73 63 72 69 62 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 73 63 72 69 62 61 39 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 01 59 65 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 53 74 75 72 64 79 20 42 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 37 00 00 03 D2 00 00 00 00 00 00 00 00 00 10 67 80 00 00 00 00 02 4D 69 6E 6F 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 42 61 72 6E 61 63 6C 65 20 54 61 76 65 72 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 AD 00 00 01 97 00 00 00 0F 00 00 00 00 00 10 67 81 00 00 00 00 03 42 72 69 74 61 69 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 77 65 65 74 20 44 72 65 61 6D 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 D8 00 00 06 5D 00 00 00 0A 00 00 00 00 00 10 67 82 00 00 00 00 04 4D 6F 6F 6E 67 6C 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 53 63 68 6F 6C 61 72 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 34 00 00 04 91 00 00 00 00 00 00 00 00 00 10 67 83 00 00 00 00 05 54 72 69 6E 73 69 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 54 72 61 76 65 6C 6C 65 72 27 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 34 00 00 0A B9 00 00 00 00 00 00 00 00 00 10 67 84 00 00 00 00 06 4E 65 77 20 4D 61 67 69 6E 63 69 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 47 72 65 61 74 20 48 6F 72 6E 73 20 54 61 76 65 72 6E 00 00 00 00 00 00 00 00 00 00 00 00 0E 9A 00 00 08 AF 00 00 00 14 00 00 00 00 00 10 67 85 00 00 00 00 07 4A 68 65 6C 6F 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 4D 6F 72 6E 69 6E 67 20 53 74 61 72 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 62 00 00 0E E9 00 00 00 00 00 00 00 00 00 10 67 86 00 00 00 00 08 53 6B 61 72 61 20 42 72 61 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 46 61 6C 63 6F 6E 65 72 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 52 00 00 08 B3 00 00 00 00 00 00 00 00 00 10 67 87 00 00 00 00 09 56 65 73 70 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 49 72 6F 6E 77 6F 6F 64 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A D3 00 00 03 D1 00 00 00 00 00 00 00 00 00 10 67 88 00 00 00 00 00 00 05 80 00 00 00 00
Original: A9 04 58 05 45 73 63 72 69 62 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 73 63 72 69 62 61 39 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 01 59 65 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 53 74 75 72 64 79 20 42 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 37 00 00 03 D2 00 00 00 00 00 00 00 00 00 10 67 80 00 00 00 00 02 4D 69 6E 6F 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 42 61 72 6E 61 63 6C 65 20 54 61 76 65 72 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 AD 00 00 01 97 00 00 00 0F 00 00 00 00 00 10 67 81 00 00 00 00 03 42 72 69 74 61 69 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 77 65 65 74 20 44 72 65 61 6D 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 D8 00 00 06 5D 00 00 00 0A 00 00 00 00 00 10 67 82 00 00 00 00 04 4D 6F 6F 6E 67 6C 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 53 63 68 6F 6C 61 72 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 34 00 00 04 91 00 00 00 00 00 00 00 00 00 10 67 83 00 00 00 00 05 54 72 69 6E 73 69 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 54 72 61 76 65 6C 6C 65 72 27 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 34 00 00 0A B9 00 00 00 00 00 00 00 00 00 10 67 84 00 00 00 00 06 4E 65 77 20 4D 61 67 69 6E 63 69 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 47 72 65 61 74 20 48 6F 72 6E 73 20 54 61 76 65 72 6E 00 00 00 00 00 00 00 00 00 00 00 00 0E 9A 00 00 08 AF 00 00 00 14 00 00 00 00 00 10 67 85 00 00 00 00 07 4A 68 65 6C 6F 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 4D 6F 72 6E 69 6E 67 20 53 74 61 72 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 62 00 00 0E E9 00 00 00 00 00 00 00 00 00 10 67 86 00 00 00 00 08 53 6B 61 72 61 20 42 72 61 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 46 61 6C 63 6F 6E 65 72 73 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 52 00 00 08 B3 00 00 00 00 00 00 00 00 00 10 67 87 00 00 00 00 09 56 65 73 70 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 68 65 20 49 72 6F 6E 77 6F 6F 64 20 49 6E 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A D3 00 00 03 D1 00 00 00 00 00 00 00 00 00 10 67 88 00 00 00 00 00 00 05 80 00 00
Unexplained thing 1) The packet sent by sphere begin with 6 extra bytes which i can't figure out what this means... this is the extra bytes:
Note: this bytes i added by myself, typing on the hex string after compress the "original packet" but before send to the client.
Unexplained thing 2) after compress my packet, it seem different from sphere packet on the end.. only the last bytes on the end..
Unexplained thing 3) After i compress and decompress the original packet from UltimaPHP... two extra bytes (
00 00) appeared on the bottom of the hex string.
Someone know what this is or why this things happens??
Note 1: I've allready dealed with this "strange" packet on the first input from second socket connection (after client send what server the player choosed to get in).
The best thing to do, and i'll do later, is create a packet length tree... and search for then there and "split" the received "glued" packet before processes on server.
For now, i've done this "fix":
Code:
if (strlen(strtoupper(dechex(ord(substr($input, 0, 1))))) == 1) {
$glued = true;
}
i'll make the "right" code after finish with this compression!
Note 2: I've founded too some information about client encryption.. and what the fuck the crypt means....
all here