Skip to content

Commit

Permalink
processes: distinguish thread class using arch_t
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Mar 28, 2022
1 parent d6ecbe0 commit 96525c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rpcclient/rpcclient/darwin/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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. """
Expand Down

0 comments on commit 96525c1

Please sign in to comment.