"""账号自动识别、登录切换和启动前准备的验证,不发送微信消息。""" from __future__ import annotations from pathlib import Path import struct import sys import unittest from unittest.mock import Mock, patch from wxbot_framework.account import (APP_GLOBAL_RVA, APP_VTABLE_RVA, CONTEXT_VTABLE_RVA, APP_CONTEXT_GETTER_RVA, IDENTITY_GETTER_RVA, read_current_account, select_account_process, read_current_profile) from wxbot_framework.text import TextRouter BASE, APP, CONTEXT, HEAP = 0x100000000, 0x300000000, 0x400000000, 0x500000000 SELF = "wxid_framework_current" class AccountMemory: def __init__(self, account=SELF): self.regions = {} self.add(BASE + APP_GLOBAL_RVA, 8) self.add(APP, 0x80) self.add(BASE + APP_VTABLE_RVA, 0x80) self.add(CONTEXT, 0x100) self.add(BASE + CONTEXT_VTABLE_RVA, 0x20) self.add(BASE + IDENTITY_GETTER_RVA, 5) self.add(HEAP, 128) self.write(BASE + APP_GLOBAL_RVA, struct.pack("