Skip to content

Commit

Permalink
rpcclient: darwin: add set_airplane_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Feb 15, 2022
1 parent 37ec97e commit defbb74
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rpcclient/rpcclient/darwin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ def uname(self):
def is_idevice(self):
return self.uname.machine.startswith('i')

def set_airplane_mode(self, mode: bool):
preferences = self.symbols.objc_getClass('RadiosPreferences').objc_call('new')
preferences.objc_call('setAirplaneMode:', mode)
preferences.objc_call('synchronize')

def symbol(self, symbol: int):
""" at a symbol object from a given address """
return DarwinSymbol.create(symbol, self)
Expand Down

0 comments on commit defbb74

Please sign in to comment.