wechaty / puppet-xp

Wechaty Puppet WeChat Windows Protocol
http://wechaty.js.org/docs/puppet-providers/xp
Apache License 2.0
471 stars 114 forks source link

使用3.9版本的时候扫码登录说当前版本需要更新最新版本问题 #231

Open codermie opened 6 months ago

codermie commented 6 months ago

使用3.9版本的时候扫码登录说当前版本需要更新最新版本问题

ych5680 commented 6 months ago

我也是

atorber commented 5 months ago

微信限制了老版本微信登录,参考 https://www.yuque.com/atorber/chatflow/ibnui5v8mob11d70#sznUs

soultentacle88 commented 4 months ago

from pymem import Pymem

修改微信版本3.9.2.23 为 3.9.11.17,打开微信后执行本脚本后,进行扫描登录

def fix_version(pm: Pymem): WeChatWindll_base = 0 for m in list(pm.list_modules()): path = m.filename if path.endswith("WeChatWin.dll"): WeChatWindll_base = m.lpBaseOfDll break

# 这些是CE找到的标绿的内存地址偏移量
ADDRS = [0x2FFEAF8, 0x3020E1C, 0x3021AEC, 0x303C4D8, 0x303FEF4, 0x30416EC]
ov = 0x63090217 # 3.9.2.23
nv = 0x63090b11 # 3.9.11.17

for offset in ADDRS:
    addr = WeChatWindll_base + offset
    v = pm.read_uint(addr)
    print(v)
    if v == nv:  # 是3.9.11.17,已经修复过了
        continue
    elif v != ov:  # 不是 3.9.2.23 修复也没用,代码是hardcode的,只适配这一个版本
        raise Exception("别修了,版本不对,修了也没啥用。")

    pm.write_uint(addr, nv) # 改成要伪装的版本3.9.11.17,转换逻辑看链接

print("好了,可以扫码登录了")

if name == "main": try: pm = Pymem("WeChat.exe") fix_version(pm) except Exception as e: print(f"{e},请确认微信程序已经打开!")

johnnyliu0904 commented 2 months ago

from pymem import Pymem

修改微信版本3.9.2.23 为 3.9.11.17,打开微信后执行本脚本后,进行扫描登录

def fix_version(pm: Pymem): WeChatWindll_base = 0 for m in list(pm.list_modules()): path = m.filename if path.endswith("WeChatWin.dll"): WeChatWindll_base = m.lpBaseOfDll break

# 这些是CE找到的标绿的内存地址偏移量
ADDRS = [0x2FFEAF8, 0x3020E1C, 0x3021AEC, 0x303C4D8, 0x303FEF4, 0x30416EC]
ov = 0x63090217 # 3.9.2.23
nv = 0x63090b11 # 3.9.11.17

for offset in ADDRS:
    addr = WeChatWindll_base + offset
    v = pm.read_uint(addr)
    print(v)
    if v == nv:  # 是3.9.11.17,已经修复过了
        continue
    elif v != ov:  # 不是 3.9.2.23 修复也没用,代码是hardcode的,只适配这一个版本
        raise Exception("别修了,版本不对,修了也没啥用。")

    pm.write_uint(addr, nv) # 改成要伪装的版本3.9.11.17,转换逻辑看链接

print("好了,可以扫码登录了")

if name == "main": try: pm = Pymem("WeChat.exe") fix_version(pm) except Exception as e: print(f"{e},请确认微信程序已经打开!")

'MockObject' object is not callable,请确认微信程序已经打开!

我微信打开了啊。。。