向大老们求助,询问天下争霸三国志/幻世与冒险的解密方法

如题,在其他论坛被和谐掉了 :sob: :sob:,小白来不及存…解密脚本 :scream: :scream:
,看有没有人知道新版如何解密或有保留天下争霸三国志/幻世与冒险的解密脚本。 :bamboo:

天下争霸三国志:

:bellhop_bell:样本:(有存到网址就直接给了)

https://show.kiloai.com/app_hots/6/100/release/1.0.3.18/project.manifest

https://show.kiloai.com/app_hots/6/100/release/1.0.3.18/assets/resources/native/02/026131f6-f451-4aee-8e53-566a2fbdd686.astc
https://show.kiloai.com/app_hots/6/100/release/1.0.3.18/assets/resources/native/03/03b0aa8b-16d1-4216-b9cf-a1d9e4a920de.astc
https://show.kiloai.com/app_hots/6/100/release/1.0.3.18/assets/resources/native/03/03f95a20-43c4-4f91-ad5c-84957da69886.astc

Mobile Legends: Adventure/黎明啟示錄:

https://apkcombo.com/mobile-legends-adventure/com.moonton.mobilehero/
国服似乎叫幻世与冒险

听说是异或ea前100自节,但某次更新后,大幅度更改加密方式:

:bellhop_bell:样本:
heroSpine.zip (1.1 MB)

from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad
import base64
from pathlib import Path
import zlib
import tex2img
from struct import unpack
from PIL import Image

def aes_cbc_decrypt(ciphertext: bytes, key: bytes, iv: bytes) -> bytes:

    cipher = AES.new(key, AES.MODE_CBC, iv)
    decrypted_data = cipher.decrypt(ciphertext)
    #plaintext = unpad(decrypted_data, AES.block_size)
    return decrypted_data

key = bytes.fromhex("3a 44 e1 a5 f0 47 50 93 37 bd 9e 59 54 7b 2e d6 31 2f 85 27 22 07 c7 b7 55 9f 70 9b b4 b7 34 e5")
iv = bytes.fromhex("00 0a 57 b0 3e 30 dc f9 58 06 8b 23 e1 b7 a8 71")

for item in Path("res").rglob("*.astc"):
    print("dec:" + str(item))
    cipherdata = item.read_bytes()
    plaindata = aes_cbc_decrypt(cipherdata, key, iv)
    try:
        plaindata = zlib.decompress(plaindata)
    except:
        print("你确定没处理两次?")
        continue
    if plaindata[:4] != b"\x13\xAB\xA1\x5C":
        item.write_bytes(plaindata)
        continue
    block_width = plaindata[4]
    block_height = plaindata[5]
    width = int.from_bytes(plaindata[7:10], "little")
    height = int.from_bytes(plaindata[10:13], "little")
    z = int.from_bytes(plaindata[13:16], "little")
    if z != 1:
        print("z is not one")
    outdata = tex2img.decompress_astc(plaindata[16:], width, height, block_width, block_height, False)
    im = Image.frombytes("RGBA", (width, height), outdata)

    outpath = item.with_suffix(".png")
    im.save(outpath)

开卷考试。。。。

2 个赞

大老辛苦了,感谢您 :sob: :sob: :sob: