在so文件里找到key,标签名大概是jiaozhijiab,然后到xxtea解密工具里输入后发现解密失败,有佬帮忙看看吗?
游戏包链接:https://www.123865.com/s/DUNdTd-mHZ3h
在so文件里找到key,标签名大概是jiaozhijiab,然后到xxtea解密工具里输入后发现解密失败,有佬帮忙看看吗?
游戏包链接:https://www.123865.com/s/DUNdTd-mHZ3h
jiaozi2013
进行xor得到解密后的字节89 50 4E 47 0D 0A 1A 0A
与 解密字节合并 再与 png的结尾标识00 00 00 00 49 45 4E 44 AE 42 60 82
合并from pathlib import Path
from typing import Union
from numpy import uint8, frombuffer as npbuff, tile as npfill
class DreamBattleRoyale:
Key = npbuff(b'jiaozi2013', dtype=uint8)
KeyLen = len(Key)
SignA = b'\x89\x50\x4e\x47\x0d\x0a\x1a\x0a'
SignB = b'\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82'
@classmethod
def Decrypt(cls, png: Union[Path, str]):
with open(png, 'rb') as f:
if f.read(7) != b'jiaozhi':
return
datarr = npbuff(f.read(), dtype=uint8)
length = len(datarr)
data = (datarr ^ npfill(cls.Key, (length // cls.KeyLen) + 1)[:length]).tobytes()
with open(png, 'wb') as f:
f.write(b''.join((cls.SignA, data, cls.SignB)))
def batch(png_path: str = '', ext: str = '*.png', subfolder: bool = False):
path = Path(png_path) if png_path else Path.cwd()
need = [i for i in (path.rglob(ext) if subfolder else path.glob(ext))]
for i in need:
DreamBattleRoyale.Decrypt(i)
if __name__ == '__main__':
path = r'D:\测试' # 指定png所在文件夹
ext = '*.png' # 指定要解密的文件类型后缀
subfolder = True # 是否查找子文件夹内的文件
batch(path, ext, subfolder)
批量解密代码