diff --git a/src/rpcclient/rpcclient/client.py b/src/rpcclient/rpcclient/client.py index c9f48c9..ef9f8c8 100644 --- a/src/rpcclient/rpcclient/client.py +++ b/src/rpcclient/rpcclient/client.py @@ -301,11 +301,11 @@ def symbol(self, symbol: int): return Symbol.create(symbol, self) @property - def errno(self): + def errno(self) -> int: return self.symbols.errno[0] @errno.setter - def errno(self, value): + def errno(self, value: int) -> None: self.symbols.errno[0] = value @property diff --git a/src/rpcclient/rpcclient/darwin/client.py b/src/rpcclient/rpcclient/darwin/client.py index a38a573..3314933 100644 --- a/src/rpcclient/rpcclient/darwin/client.py +++ b/src/rpcclient/rpcclient/darwin/client.py @@ -106,6 +106,18 @@ def interactive(self, additional_namespace: typing.Mapping = None): additional_namespace['CFSTR'] = self.cf super().interactive(additional_namespace=additional_namespace) + @property + def errno(self) -> int: + p_error = self.symbols.__error() + p_error.item_size = 4 + return p_error[0] + + @errno.setter + def errno(self, value: int) -> None: + p_error = self.symbols.__error() + p_error.item_size = 4 + p_error[0] = value + @property def images(self) -> typing.List[DyldImage]: m = []