1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, UCS 0.7.4.0 is now available. Get it now for FREE here
    Dismiss Notice
  3. Hi there Guest ! Are you a uploader and you are looking for a way to earn from your uploads? uploadify is a file hosting platform that provides you the possibility to earn from your download without the annoying surveys. Free 10 Gb Space!
    Dismiss Notice
  4. Hey Guest, It is hard to setup a server, that is why there is a documentation to help you here
    Dismiss Notice

[Packets]Decryption

Discussion in 'Clash of Clans Underground' started by AsH.H6, Jan 2, 2016.

  1. That certainly tracks with what clanner says about it on the EndClientTurn page on the cocdp wiki, but it's a bit vague. I'm sure it wouldn't take someone with the inclination long to figure it out with trial and error, if they just started with an empty level 1 town hall base and slowly added buildings and monitored the output.
     
  2. Because during an attack, the checksum also includes the enemy base.
     
  3. The game client has to be able to produce it, so it can only use the data available in the EnemyHomeData, VisitHomeData, etc packets.
     
  4. #124 SNBogdanov, Apr 4, 2016
    Last edited: Apr 4, 2016
    If someone is interested I clean up own and enemy hmoes messages

    OwnHomeData
    LastVisit = TimeSpan.FromSeconds(reader.ReadInt32());
    Unknown1 = reader.ReadInt32();
    Timestamp = DateTimeConverter.FromUnixTimestamp(reader.ReadInt32());

    OwnVillageData = new VillageData();
    OwnVillageData.Read(reader);

    OwnAvatarData = new AvatarData();
    OwnAvatarData.Read(reader);
    UserID = OwnAvatarData.UserID;

    Unknown29 = reader.ReadInt32();
    Unknown30 = reader.ReadInt64();
    Unknown31 = reader.ReadInt64();
    Unknown32 = reader.ReadInt64();


    EnemyHomeData

    LastVisit = TimeSpan.FromSeconds(reader.ReadInt32());
    Unknown1 = reader.ReadInt32();
    Timestamp = DateTimeConverter.FromUnixTimestamp(reader.ReadInt32());

    EnemyVillageData = new VillageData();
    EnemyVillageData.Read(reader);


    EnemyAvatarData = new AvatarData();
    EnemyAvatarData.Read(reader);

    OwnAvatarData = new AvatarData();
    OwnAvatarData.Read(reader);
    Unknown2=reader.ReadByte();

    So it is very similar.
     
  5. Good news about sending commands. It is not required to calculate checksum. It is absoultelly required to have correct subtick values in commands and message itself. It should be not greater then next command, sent by game itself. Othervise server will close connection.
    Server will send OutOfsync message, but if this messoge is not passed to game then everything is Ok.
     
  6. What value do you send instead, then? Given the binary data format, I can't imagine that you can just omit the field.
     
  7. Just send 0 in checksum and subtick from last command +1 in commands.
    If we know that it wil be out of sync, it does not metter what to send in checksum.
    So only game close connection after receiving OutOfSync message. If it does not get it, connection remains.
    Only one thing I added is: I send ReturnHomeMessage to get freshest game state so I can see results of my commands.
    PS:
    I tried CollectResources and ClearObstacles commands. And they are working
     
  8. #128 SNBogdanov, Apr 5, 2016
    Last edited: Apr 5, 2016
    I did not try attacking yet. And after out of sync message BS send commands and server does not rejects it.
    PS:
    You are probably right. Out of sync message sends only once after my command. Next commands are ignored till refresh
     
  9. Ignoring OutOfSunc message gives interesting results. Server does not accept donation to clanmembers and don't send requests for following commands: Matchmaking, AttackNpc, Replay attack
     
  10. 24115 ServerError
     
  11. And what it will be? Who will handle upgrade? On server it will be no upgrade. next OwnHomeData message will bring unupgraded building
     
  12. Currently there is no CRC calcualtion algorithm available. I am working and dealing with OutOfsync messages. And this causes troubles for me. Main part (Attacking) is not working. Village mode is working for me more or less. Just another thing that is not working after OutOfSync. And it is "Another user is connecting to village". Now I can have 2 connections on different devices. On phone I can attack and results of attack appear on BS after ReturnHome and OwnHomeDataMessage
     
    sm4sher likes this.
  13. Issuing command to collect resources in both devices will not cause problem since it does not use number of resources in collector. Only building ID is used. And yes. You will have different picture of your village after handling of such commands. But as soon as you refresh (on BS I use ReturnHome Command) or visit some other players and come back (which also issue ReturnhomeCommand) server will send updated OwnHomeDataMessage with updated village info. And Both devices will get same information. You can not do things ofter OOS message which requireinteraction with other users data. And because of that you can not have 2 attacks on different devices at the same time
     
  14. Some guy from France. But he told me that his algorithm no longer valid.
     
  15. There is a pattern to it. I'm not sure where the position in the cycle is stored, though.

    Edit: I imagine it would be simple to deduce. Just load the village twice without changing anything, clear an obstacle, then load it again. You should see the fields that change every time in the first two packets, then find one that hadn't changed the first time in your third packet. Some three-way compare tool would probably make it a breeze.

    Edit 2: For all I know, it uses the total obstacles cleared variable in the achievements section.
     
  16. Is it possible to crak ling.so automatically? I want to have algorith to find keys in updated libg.so. Better to have it without running some additional tools on android
     
  17. #139 abcdef, Apr 28, 2016
    Last edited: Apr 28, 2016
  18. I can patch libg.so by myself using keys from github. It is not a problem. Problem is to find new key.
    PS:
    My proxy bot is running on 2 computers with no problem so far. One account is blocked, but I am quite sure it is due to XMod.
     

Share This Page