From 96525c107b4c538e8b839d1b606ad4eb5b0d1cf1 Mon Sep 17 00:00:00 2001 From: DoronZ Date: Tue, 29 Mar 2022 00:58:19 +0300 Subject: [PATCH] processes: distinguish thread class using arch_t --- src/rpcclient/rpcclient/darwin/processes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rpcclient/rpcclient/darwin/processes.py b/src/rpcclient/rpcclient/darwin/processes.py index 5d958b6a..bbebf987 100644 --- a/src/rpcclient/rpcclient/darwin/processes.py +++ b/src/rpcclient/rpcclient/darwin/processes.py @@ -17,6 +17,7 @@ from rpcclient.exceptions import BadReturnValueError, ArgumentError from rpcclient.processes import Processes from rpcclient.structs.consts import SIGTERM +from rpcclient.protocol import arch_t FdStruct = namedtuple('FdStruct', 'fd struct') @@ -156,9 +157,10 @@ def __init__(self, client, pid: int): self._client = client self._pid = pid - self._thread_class = IntelThread64 - if self._client.uname.machine != 'x86_64': + if self._client.arch == arch_t.ARCH_ARM64: self._thread_class = ArmThread64 + else: + self._thread_class = IntelThread64 def kill(self, sig: int = SIGTERM): """ kill(pid, sig) at remote. read man for more details. """