rpcclient.ios

Submodules

rpcclient.ios.accessibility

class rpcclient.ios.accessibility.AXDirection(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Next = 1
Previous = 2
class rpcclient.ios.accessibility.AXElement[source]

Bases: DarwinSymbol

Wrapper to device’s AXElement objective-c object. This object was written after reversing XADInspectorManager different methods.

property bundle_identifier: str

get element’s bundle identifier

compare_label(label: str, auto_scroll=True, draw_frame=True) bool[source]

compares given label with the self’s

will auto_scroll into current label if required

delete_text() None[source]

delete a character from currently editable element

property elements: List[AXElement]

get all current displayed elements

property first_element

get first element in hierarchy

property frame: CGRect

get element’s frame

highlight() None[source]

draw a frame around the element (replace the old one if existing)

property identifier: str

get element’s identifier

insert_text(text: str) None[source]

insert text into currently editable element

property is_accessibility_opaque_element_provider: bool
property label: str | None

get element’s label (actual displayed text)

property last_element

get last element in hierarchy

long_press() None[source]

long press element

next(direction=AXDirection.Next, cyclic=False)[source]

Will get and scroll to the next element in the current view.

This method was created by reversing [XADInspectorManager _nextElementNavigationInDirection:forElement:] so we don’t really know much about the used consts.

property parent
property path: DarwinSymbol

get element’s path

property pid: int

get element’s pid

press() None[source]

press element

property process_name: str

get element’s process name

property screen_locked: bool

get screen lock state

scroll_to_visible() None[source]

scroll until element becomes fully visible

property traits: AXTraits

get current element traits

property ui_element: DarwinSymbol

get encapsulated AXUIElement

property url: str

get element’s url

property value: str

get element’s value (actual set value)

class rpcclient.ios.accessibility.AXTraits(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntFlag

kAXAdjustableTrait = 4096
kAXAlertTrait = 72057594037927936
kAXAllowsDirectInteractionTrait = 8192
kAXAllowsLayoutChangeInStatusBarTrait = 288230376151711744
kAXAllowsNativeSlidingTrait = 2199023255552
kAXAutoCorrectCandidateTrait = 536870912
kAXBackButtonTrait = 134217728
kAXBookContentTrait = 281474976710656
kAXButtonTrait = 1
kAXCausesPageTurnTrait = 16384
kAXDeleteKeyTrait = 1073741824
kAXDraggableTrait = 274877906944
kAXFolderIconTrait = 1125899906842624
kAXFooterTrait = 67108864
kAXGesturePracticeRegionTrait = 549755813888
kAXHeaderTrait = 65536
kAXIgnoreItemChooserTrait = 18014398509481984
kAXImageTrait = 4
kAXInactiveTrait = 33554432
kAXIsEditingTrait = 2097152
kAXKeyboardKeyTrait = 32
kAXLaunchIconTrait = 4194304
kAXLinkTrait = 2
kAXMapTrait = 68719476736
kAXMathEquationTrait = 4398046511104
kAXMenuItemTrait = 4503599627370496
kAXNotEnabledTrait = 256
kAXPickerElementTrait = 524288
kAXPlaysSoundTrait = 16
kAXPopupButtonTrait = 1099511627776
kAXProminentIconTrait = 1152921504606846976
kAXRadioButtonTrait = 1048576
kAXReadOnlyTrait = 2251799813685248
kAXScrollableTrait = 8589934592
kAXSearchFieldTrait = 1024
kAXSecureTextFieldTrait = 16777216
kAXSelectedTrait = 8
kAXSelectionDismissesItemTrait = 2147483648
kAXSpacerTrait = 17179869184
kAXStartsMediaSessionTrait = 2048
kAXStaticTextTrait = 64
kAXStatusBarElementTrait = 8388608
kAXSummaryElementTrait = 128
kAXSupportsTrackingDetailTrait = 36028797018963968
kAXSupportsZoomTrait = 70368744177664
kAXTabBarTrait = 32768
kAXTabButtonTrait = 268435456
kAXTableIndexTrait = 34359738368
kAXTextAreaTrait = 140737488355328
kAXTextEntryTrait = 262144
kAXTextOperationsAvailableTrait = 137438953472
kAXToggleTrait = 9007199254740992
kAXTouchContainerTrait = 35184372088832
kAXUpdatesFrequentlyTrait = 512
kAXVisitedTrait = 4294967296
kAXWebContentTrait = 131072
class rpcclient.ios.accessibility.Accessibility(client)[source]

Bases: object

Accessibility utils

axelement(symbol: DarwinSymbol) AXElement[source]
draw_frame(x: float, y: float, width: float, height: float)[source]
property enabled: bool
hide_frame()[source]
press_elements_by_labels(labels: List[str], auto_scroll=True, draw_frame=True, timeout=5, direction: AXDirection = AXDirection.Next, displayed_only=False)[source]

press a sequence of labels :param labels: label list to press :param auto_scroll: scroll over the chosen element :param draw_frame: draw a frame over the current element :param timeout: timeout to wait for each element to appear :param direction: the direction of search :param displayed_only: search just in the displayed elements

property primary_app: AXElement
set_frame_style(value: int)[source]
wait_for_element_by_label(label: str, auto_scroll=True, draw_frame=True, timeout=5, direction=AXDirection.Next, displayed_only=False) AXElement[source]

busy-wait for an element to become available

class rpcclient.ios.accessibility.CGPoint(x: float, y: float)[source]

Bases: object

x: float
y: float
class rpcclient.ios.accessibility.CGRect(origin: rpcclient.ios.accessibility.CGPoint, size: rpcclient.ios.accessibility.CGSize)[source]

Bases: object

origin: CGPoint
size: CGSize
class rpcclient.ios.accessibility.CGSize(width: float, height: float)[source]

Bases: object

height: float
width: float
class rpcclient.ios.accessibility.FrameStyle(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Blue = 0
Default = 0
Green = 1
Invisible = 6
LightGreen = 5
Yellow = 4

rpcclient.ios.backlight

class rpcclient.ios.backlight.Backlight(client)[source]

Bases: object

property brightness: float

0.0 - 1.0

Type:

get brightness value in range

rpcclient.ios.client

class rpcclient.ios.client.IosClient(sock, sysname: str, arch: <Enum <FormatField>>, create_socket_cb: ~typing.Callable)[source]

Bases: DarwinClient

property airplane_mode: bool
property roots: List[str]

get a list of all accessible darwin roots when used for lookup of files/preferences/…

rpcclient.ios.lockdown

class rpcclient.ios.lockdown.Lockdown(client)[source]

Bases: object

add_pair_record(pair_record: Mapping, date: datetime, hostname: str = None)[source]
property data_ark: SCPreference
disable_expiration_for_all_existing_pair_records()[source]
static get_host_id(hostname: str = None) str[source]
get_pair_record_by_host_id(host_id: str) PairRecord[source]
get_pair_record_by_hostname(hostname: str) PairRecord[source]
get_self_pair_record() PairRecord[source]
property pair_dates: Mapping
property pair_records: List[PairRecord]

list pair records

set_pair_date(host_id: str, date: datetime)[source]
class rpcclient.ios.lockdown.PairRecord(client, host_id: str)[source]

Bases: object

property date: datetime
disable_expiration()[source]
property expiration_date: datetime
property host_id: str
property record: Mapping

rpcclient.ios.mobile_gestalt

class rpcclient.ios.mobile_gestalt.MobileGestalt(client)[source]

Bases: object

property ActiveWirelessTechnology
property AirplaneMode: bool
property AllDeviceCapabilities
property AllowYouTube
property AllowYouTubePlugin
property AppleInternalInstallCapability
property BasebandCertId
property BasebandChipId
property BasebandFirmwareManifestData
property BasebandFirmwareVersion
property BasebandKeyHashInformation
property BasebandSerialNumber
property BatteryCurrentCapacity
property BatteryIsCharging
property BatteryIsFullyCharged
property BluetoothAddress
property BoardId
property BuildVersion
property CPUArchitecture
property CarrierBundleInfoArray
property CarrierInstallCapability
property ChipID
property ComputerName
property DeviceClass
property DeviceClassNumber
property DeviceColor
property DeviceName
property DeviceSupports1080p
property DeviceSupports3DImagery
property DeviceSupports3DMaps
property DeviceSupports4G
property DeviceSupports720p
property DeviceSupports9Pin
property DeviceSupportsFaceTime
property DeviceSupportsLineIn
property DeviceSupportsNavigation
property DeviceSupportsSimplisticRoadMesh
property DeviceSupportsTethering
property DeviceVariant
property DiagData
property DieId
property DiskUsage
property ExternalChargeCapability
property ExternalPowerSourceConnected
property FaceTimeBitRate2G
property FaceTimeBitRate3G
property FaceTimeBitRateLTE
property FaceTimeBitRateWiFi
property FaceTimeDecodings
property FaceTimeEncodings
property FaceTimePreferredDecoding
property FaceTimePreferredEncoding
property FirmwareNonce
property FirmwarePreflightInfo
property FirmwareVersion
property ForwardCameraCapability
property HWModelStr
property HardwarePlatform
property HasAllFeaturesCapability
property HasBaseband
property HasInternalSettingsBundle
property HasSpringBoard
property IntegratedCircuitCardIdentifier
property InternalBuild
property InternationalMobileEquipmentIdentity
property InverseDeviceID
property IsSimulator
property IsThereEnoughBatteryLevelForSoftwareUpdate
property IsUIBuild
property MLBSerialNumber
property MinimumSupportediTunesVersion
property MobileSubscriberCountryCode
property MobileSubscriberNetworkCode
property ModelNumber
property PanoramaCameraCapability
property PartitionType
property PasswordConfigured
property ProductName
property ProductType
property ProductVersion
property ProximitySensorCalibration
property RearCameraCapability
property RegionCode
property RegionInfo
property RegionalBehaviorAll
property RegionalBehaviorChinaBrick
property RegionalBehaviorEUVolumeLimit
property RegionalBehaviorGB18030
property RegionalBehaviorGoogleMail
property RegionalBehaviorNTSC
property RegionalBehaviorNoPasscodeLocationTiles
property RegionalBehaviorNoVOIP
property RegionalBehaviorNoWiFi
property RegionalBehaviorShutterClick
property RegionalBehaviorVolumeLimit
property RegulatoryIdentifiers
property RequiredBatteryLevelForSoftwareUpdate
property SBAllowSensitiveUI
property SBCanForceDebuggingInfo
property SDIOManufacturerTuple
property SDIOProductInfo
property SIMTrayStatus
property SerialNumber
property ShouldHactivate
property SigningFuse
property SoftwareBehavior
property SoftwareBundleVersion
property SupportedDeviceFamilies
property SupportedKeyboards
property TotalSystemAvailable
property UniqueChipID
property UniqueDeviceID
property UniqueDeviceIDData
property UserAssignedDeviceName
property WifiAddress
property WifiAddressData
property WifiVendor
get_answer(key: str)[source]

get a string answer from MobileGestalt

set_answer(key: str, value)[source]

set an answer into MobileGestalt

rpcclient.ios.screen_capture

class rpcclient.ios.screen_capture.CGRect(x0, y0, x1, y1)

Bases: tuple

x0

Alias for field number 0

x1

Alias for field number 2

y0

Alias for field number 1

y1

Alias for field number 3

class rpcclient.ios.screen_capture.ScreenCapture(client)[source]

Bases: object

monitor screen events

property bounds: CGRect
property main_display: DarwinSymbol
property screenshot: bytes

rpcclient.ios.sprinboard

class rpcclient.ios.sprinboard.ScreenLockStatus(lock, passcode)

Bases: tuple

lock

Alias for field number 0

passcode

Alias for field number 1

class rpcclient.ios.sprinboard.SpringBoard(client)[source]

Bases: object

get_screen_lock_status() ScreenLockStatus[source]

get lockscreen and passcode status using SpringBoardServices

get_spring_board_server_port() int[source]
launch_application(bundle_identifier: str) None[source]

launch application using SpringBoardServices

open_sensitive_url_and_unlock(url: str, unlock: bool = True) None[source]

open default application according to url scheme

rpcclient.ios.telephony

class rpcclient.ios.telephony.Call(client, controller, call)[source]

Bases: object

answer()[source]

Answer the current call.

disconnect()[source]

Disconnect the current call.

class rpcclient.ios.telephony.Telephony(client)[source]

Bases: object

Telephony utils. In order to access the real telephony, the API requires the entitlement “application-identifier” to be set to “com.apple.coretelephony”.

property current_call: Call

Return on object representing the current active call.

dial(number: str)[source]

Start a call to a number. Use current_call to access the created call. :param number: Phone address to call to.

send_sms(to_address: str, text: str, smsc: str = '1111')[source]

Send a SMS. :param to_address: Phone address to send to. :param text: Message text. :param smsc: Originator’s short message service center address.

rpcclient.ios.wifi

class rpcclient.ios.wifi.IosWifi(client)[source]

Bases: object

network utils

get_interface(interface_name: str = None) WifiInterface[source]

get a specific wifi interface object for remote controlling

property interfaces: List[str]

get a list of all available wifi interfaces

is_on() bool[source]
property saved_networks: List[WifiSavedNetwork]
turn_off()[source]
turn_on()[source]
class rpcclient.ios.wifi.WifiInterface(client, interface, device)[source]

Bases: Allocated

disconnect()[source]

disconnect from current Wi-Fi network

scan(options: Mapping = None) List[WifiScannedNetwork][source]

perform Wi-Fi scan

class rpcclient.ios.wifi.WifiSavedNetwork(client, wifi_manager: DarwinSymbol, network: DarwinSymbol)[source]

Bases: object

property bssid: str
forget()[source]

forget Wi-Fi network

get_property(name: str)[source]
property ssid: bytes
class rpcclient.ios.wifi.WifiScannedNetwork(client, interface: DarwinSymbol, network: Mapping)[source]

Bases: object

property bssid: str
property channel: int
connect(password: str = None)[source]

connect to Wi-Fi network

disconnect()[source]
property rssi: int
property ssid: bytes