diff --git a/src/rpcclient/rpcclient/darwin/client.py b/src/rpcclient/rpcclient/darwin/client.py index 2b5037b..2c9bb77 100644 --- a/src/rpcclient/rpcclient/darwin/client.py +++ b/src/rpcclient/rpcclient/darwin/client.py @@ -2,6 +2,7 @@ import builtins import json import logging +import os import plistlib import typing from collections import namedtuple @@ -35,11 +36,14 @@ from rpcclient.darwin.time import Time from rpcclient.darwin.xpc import Xpc from rpcclient.exceptions import CfSerializationError, GettingObjectiveCClassError, MissingLibraryError -from rpcclient.protos.rpc_pb2 import CmdGetClassList, CmdShowClass, CmdShowObject from rpcclient.structs.consts import RTLD_GLOBAL, RTLD_NOW from rpcclient.symbol import Symbol from rpcclient.symbols_jar import SymbolsJar +# make sure imports from the *_pb2 modules don't depend on the locally installed protobuf version +os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'python' +from rpcclient.protos.rpc_pb2 import CmdGetClassList, CmdShowClass, CmdShowObject # noqa: E402 + IsaMagic = namedtuple('IsaMagic', 'mask value') ISA_MAGICS = [ # ARM64