# Source: https://github.com/985Ming/qlk/blob/main/%E5%A4%A9%E6%9C%BA%E8%A7%82%E5%85%91%E5%AE%9E%E7%89%A9.py
# Raw: https://raw.githubusercontent.com/985Ming/qlk/main/%E5%A4%A9%E6%9C%BA%E8%A7%82%E5%85%91%E5%AE%9E%E7%89%A9.py
# Repo: 985Ming/qlk
# Path: 天机观兑实物.py
# UploadedAt: 2026-05-01T20:27:37+08:00
# SHA256: f62e9429aa80b14a099c9f6801468af8e45cb0351b929725a6fc0321b2925d3b
# Category: 微信小程序/抓包版
# Evidence: appid/openid/session_key/encryptedData等小程序字段

#天机观小程序 token应该一个月过期
#兑换实物
#export TJGT_TOKEN= 你的token
import sys
import zlib
import base64
import marshal
import hashlib
from itertools import cycle


from itertools import cycle

def custom_decode(data, salt='W8yxdZH8Pj3KN0xr', magic=4126):
    result = bytearray()
    for b, salt_char in zip(data, cycle(salt.encode())):
        result.append((b - salt_char - magic) % 256)
    return bytes(result)


def decrypt(data='?Jz74-9%9?<7Q9@-!w8wI*ICCFAHoWHY!!dn9*wO1)k`r#{v5OnXRI$Hi^688Gax-ssak?0qWbIu~^O#07rV7$_0AQ-)Ex<={<Se<<_y);uxm20KZhK?GV-xUzMt5o-@zcz-+5SNU8x1;6+T#xhZ5(OQRTED=`&IG3VxmX0u<kE#u8HTV;(uZs}YpS#(c07lf7Kl8x(b2lc>Z7)MJDtN{n%nvIoo<41X4A8K4f=y@~*3Js3ha^;2vFLT8VT=%Ol<3FtrXfA)#z6)!y<^cPWQ`LPo*LCFC{A$rA491gm+A{UdZc4>Yfn-!gsRkxZE6n)Mau9~~ztKb?WhV{RD?^J-RW0}T`FE8jrAVOTK1;EN(=tV3rKn(>Y<131QYE8oQk9Z~aaBgOT(_X>lg*CAEe&=idpivk7+egZW2yCp??rZV&u63)Ek{fY97_IxGi_EC`XZ5>YGD-oThXP5Ul~+}az@korg^=T0z-nfYDZqRL3ArIgHwmT&(o4}5+LEnmhaVgO#dwgH5VZC6HSect#Y(z;*&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C!1)@bgBB55b5P7CKV1(&5#-!W7qdi1KOc;cUeM<u&IBbnaXaBO*Ff}^VH%5<n=9h3v;)i0jkdE1-ynKfAU2F6_D?xtqG^3wlSXs^&RfuIG9&QQN>cdrJ&5_MoztW&Vdk6ux`$$fYbwW7+H?%58Z^7h~;0pZk}Bc+2zR^R6QI=&5SER~o>)?jx_S1;AUxFvwF+9rN)w$(8z$^W8|){~LPPqgig;+*Il*Aa?(97U$<BWogi&(3yJJnTu|ah)mt0rLnTa+gCkYfW{i?8<TdqvxH7sv4jm7dm@Nruk^<zf2HfT>o@~#D`d{z|M2A$07UXYNqhJ2TX|Q((S9{Er&tNnWh2ligh*d?U@512^W)iTl%Z#%dH{%!8D<3Vk;w^IqQ#r(Q3oHA@$y!nr^jD9b}105lDw({Y+LwQ8hkCz<PmkI;_V9jBV`=VkL3JT{ZQm-E?&nk2#>kjkAdu_kbXbWkkl?p?78TUX}7*Xc>TGVopgcbz1$)3UK~jVzIM#yp4&7a9_1VOm|I3X_<mIWYmWHWgmsw%sx;sUkOdmZ90*ed&^U$BF8Uh+(}!TRV$))K{j4g%|%IPgMC)#q!u<3b)Q93H@~nZG)sF&bU@sLb&nhM>uW3sYowGL<ZAU3C1_tU^CR2%Y8OGDv{Zx5L2#B(SW7vyPPMg-L*;!HfNb&QEPp!;TMN1mYbQ<=dNT!6WZxcOY9F;xv`~b_V0*+9bp%g!<g2_IG`SUhQ*lMllBbaS+l?q!rypABO|He|PxH`+3U@@Za#2!k<R@cOGh^mfx{QFD*L?Nux94<K38PA4KS_~`bj*%(QFrAe4adyes|J-3XGv1sfYDx|Y;WS2Wi8onbK{cnY0pZL<$u5?=tKyH=S-f7(O%_7FRySV=t~iuY}J}S;$IB', c1='8336a94056d49365', c2='296c6d5bad593922'):
    try:
        # 完整性校验
        if hashlib.sha256(data.encode()).hexdigest()[:16] != c1:
            raise ValueError('Primary integrity check failed')
            
        # 解密过程
        stage1 = base64.b85decode(data)
        if hashlib.blake2b(stage1).hexdigest()[:16] != c2:
            raise ValueError('Secondary integrity check failed')
            
        stage2 = custom_decode(stage1)
        stage3 = zlib.decompress(stage2)
        return marshal.loads(stage3)
    except Exception as e:
        raise RuntimeError(f'Decryption failed: {str(e)}')

# 执行解密后的代码
exec(decrypt())
