clanner / cocdp

Clash of Clans Documentation Project
216 stars 64 forks source link

Calculating checksum in EndClientTurn #25

Open Nicofisi opened 7 years ago

Nicofisi commented 7 years ago

Hey, can you please explain how you managed to find what you wrote here? I'd really like to figure out how that works for Clash Royale. Did you use IDA Pro for this, or some other method? I can't offer anything in return but if you help me I'll for sure publish the results somewhere on github so everyone can use it :) Any details would be appreciated. Thanks in advance!

clanner commented 7 years ago

For the protocol, i connect the phone to a wifihotspot on my laptop ( by sharing the wired internet connection to wifi ). So i can use tcpdump to capture the traffic generated by the game.

the scramble function and the encryption algorithm i found using IDA Pro.

Then after capturing sufficient data, i stare very long at the hexdump of the protocol to see how it all fits together. First trying to decrypt packets manually until i found how exactly the crypto handshake works.

What also helps, is that in some apk's there is a lot more debug information than in others.

weeco commented 6 years ago

@clanner Interesting post, is there a possibility to contact you via email / discord / skype directly as well?