Happy Elimination Happy Holiday Protocol Decryption

bad8107555806000f445f7ddc2dcf394.png

30087c0a7a67bfa4858ffc859fe91b08.png

Happy Elimination Happy Holiday Protocol Decryption

d2e94701724eb7a1dffb5d7f214cacac.png

Protocol/protocol/flow/volume/decryption/encryption

fe076ee721a92b412422fa7094481487.png

Analyze the protocol encryption method of the game traffic of Happy Elimination Happy Holiday.

sequence

deafc83f24eab809b193ad4dd99db647.png

Happy Elimination Happy Holiday is a synthesis + simulation home improvement game. In this game, you will become a passionate designer and run a studio with your friends. You'll need to redesign each room according to your client's needs, creating stunning and unique designs. Using your own imagination and creativity, you will conquer the challenge and create amazing crafts! This game can be played on multiple platforms, including iOS, Android, and applets. It seemed to be very popular a while ago. Someone asked me to play it, but the result was that the other party couldn’t use it due to the slow work of habitual work. Consider giving it a try.

76e243b6ff2a8bdec83762ae94a67c60.png

Book

584d6057f512774a113ef8e77478221e.png

3a6d40e314871ace685cb370ccce960e.jpeg

827313f3cc8d24f404cb22fa2cf30f9f.jpeg

ece0aef5a61026c18e5353b514465cd3.png

ea6836571d0fc36c8eda886753881ebc.png

There is no doubt that for this type of archive game, the protocol routine is the same, and the data is encrypted. On the whole, a large series of archived data is uploaded to the server during the game, downloaded from the server at the right time, and synchronized to the local use. In the process of uploading and downloading, there are some checks, and of course, some risk control strategies. On the server or client side, it's done.

3ad1bc4a52b39976b306ce2becb8b575.png

download archive

This game uses HTTP to upload and download archives, and the URL used by the applet is this:

https://kxjr.vzhifu.net/wxxyx/userinfo/getinfo

Using a POST request, the request body data is as follows:

params={"appid":"38865",
            "prjid":"38865",
            "openid":"ohk81cccccccY",
            "chaid":"wechat",
            "timestamp":"1673596666000",
             "sign":"660767676767677676E0B2C8607151"
            }

The only thing to watch here is the sign value, which can be obtained by adding salt and then MD5. The salt value can be obtained by unpacking the small program package. For unpacking the small program, please refer to the article before the end of the article, or find me in the background (public account: protocol Analysis and Restoration).

The developer of Android and iOS should be the same person, and the URL used is this:

https://kxjr.app.vzhifu.net/dnwx/game/login/v2

This packet capture process needs to pay attention to using the appropriate method.

Using a POST request, the request body data is as follows:

params= {
        "accountType": "0",
        "aid": "2ec511b87b96d69e",
        "appid": "38823",
        "brand": "apple",
        "chaid": "ios",
        "cmd": "1002",
        "email": "",
        "gold": "0",
        "idfa": "",
        "itemList": "",
        "level": "0",
        "loginId": "xxxx",
        "lsn": "220360577",
        "lv": "0",
        "model": "iphone11",
        "netType": "2",
        "os": "ios",
        "pid": "38111117",
        "pkgName": "com.xzd.holiday.hlxc",
        "pwd": "",
         "sign": "xxxx",
        "sysVer": "28",
        "timestamp": "1337049333359",
        "userName": "",
        "wxhead": "",
        "wxid": "",
        "wxname": ""
    }

There is still only the calculation of the sign value that needs attention. Add salt and then MD5 to get it. The salt value can be obtained from the program. If you encounter difficulties, you can find me in the background (public account: protocol analysis and restoration).

9cf3b8215d258f27061f3c981502f21f.png

upload archive

In the process of uploading archives, the URL used by the applet is this:

https://kxjr.vzhifu.net/wxxyx/userinfo/update

Android and iOS use this:

https://kxjr.app.vzhifu.net/dnwx/game/report/v2

The archive inside is basically the same as the downloaded response body. There is a large amount of data or zipuserdata in an itemList, which needs to be decoded by base64, gzip, and then unquote, find the resources inside, process the values ​​inside, and then reverse the process to restore :

itemdatab64=player['itemList']['data']#这个里面的resources 里面时数据,改这个才生效
    itemdata=base64.b64decode(itemdatab64.encode())
    itemdataunzip=gzdecode(itemdata)
    itemdataurldec =  urllib.parse.unquote(itemdataunzip)
    itemdatajson=json.loads(itemdataurldec)
    resources=itemdatajson['resources']

The rest is very simple, if you encounter problems, you can still find me.

Postscript

a7b9f5247a784f4f6ff1e8bac2de0c60.png

03b6901c2d150efa33896ddbd54db1a0.png

b9d8be064d608091c661202443581d48.jpeg

f675f10fdb2b7240dabff9ac07e20211.jpeg

ac452bc2a2d8d0ff565dab3707116af9.png

f6562894e9275df275df2b64324bcf2b.png

The file modification of this game is fairly simple. I like the simple algorithm the most, and I believe everyone will like it too.

58413eea52efef27d6f0010e595970b2.png

Reminder

If you have difficulty in decrypting the protocol, please contact me (protocol analysis and restoration), that’s right, let’s improve together.                    

970fef061902bb5417e43ba24f1baf1f.png

fbe1fd93eb9a9a0c61c40234de75cafa.png

END

afb2e420d0d9566d59928a63934fe0c2.png

f835c305a5d63122e8ffb612d3bed1b8.png

Past review

PC-side WeChat applet wxapkg decryption

Cocos2dx small game data signature algorithm crack

ffa1d732991bb318ecae3e8b640249cf.png

aff5894af44de0ca8889270fea71495d.jpeg

33079eff1fe26c494dd46d4d826a5f1b.png

Guess you like

Origin blog.csdn.net/yeyiqun/article/details/129360671