diff --git a/src/rpcclient/rpcclient/darwin/keychain.py b/src/rpcclient/rpcclient/darwin/keychain.py index f5009b9..bafecc0 100644 --- a/src/rpcclient/rpcclient/darwin/keychain.py +++ b/src/rpcclient/rpcclient/darwin/keychain.py @@ -5,7 +5,6 @@ logger = logging.getLogger(__name__) - class Keychain: """ keychain utils """ @@ -67,7 +66,8 @@ def _query(self, class_type: Symbol) -> list[dict]: raise RpcPermissionError() # results contain a reference which isn't plist-serializable - removal_key = self._client.cf('v_Ref') + keys_to_remove = [self._client.cf('v_Ref'), self._client.cf('accc')] for i in range(result.objc_call('count')): - result.objc_call('objectAtIndex:', i).objc_call('removeObjectForKey:', removal_key) + for removal_key in keys_to_remove: + result.objc_call('objectAtIndex:', i).objc_call('removeObjectForKey:', removal_key) return result.py()