pymobiledevice3 7.1.0__py3-none-any.whl → 7.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymobiledevice3/_version.py +2 -2
- pymobiledevice3/cli/developer/accessibility/settings.py +2 -1
- pymobiledevice3/cli/developer/debugserver.py +10 -3
- pymobiledevice3/cli/developer/dvt/__init__.py +26 -23
- pymobiledevice3/cli/lockdown.py +3 -2
- pymobiledevice3/cli/usbmux.py +8 -2
- pymobiledevice3/tcp_forwarder.py +1 -1
- {pymobiledevice3-7.1.0.dist-info → pymobiledevice3-7.2.1.dist-info}/METADATA +1 -1
- {pymobiledevice3-7.1.0.dist-info → pymobiledevice3-7.2.1.dist-info}/RECORD +13 -13
- {pymobiledevice3-7.1.0.dist-info → pymobiledevice3-7.2.1.dist-info}/WHEEL +0 -0
- {pymobiledevice3-7.1.0.dist-info → pymobiledevice3-7.2.1.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-7.1.0.dist-info → pymobiledevice3-7.2.1.dist-info}/licenses/LICENSE +0 -0
- {pymobiledevice3-7.1.0.dist-info → pymobiledevice3-7.2.1.dist-info}/top_level.txt +0 -0
pymobiledevice3/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '7.1
|
|
32
|
-
__version_tuple__ = version_tuple = (7,
|
|
31
|
+
__version__ = version = '7.2.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (7, 2, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ast
|
|
1
2
|
import logging
|
|
2
3
|
|
|
3
4
|
from typer_injector import InjectingTyper
|
|
@@ -30,7 +31,7 @@ def accessibility_settings_set(service_provider: ServiceProviderDep, setting: st
|
|
|
30
31
|
in order to list all available use the "show" command
|
|
31
32
|
"""
|
|
32
33
|
service = AccessibilityAudit(service_provider)
|
|
33
|
-
service.set_setting(setting,
|
|
34
|
+
service.set_setting(setting, ast.literal_eval(value))
|
|
34
35
|
OSUTILS.wait_return()
|
|
35
36
|
|
|
36
37
|
|
|
@@ -51,7 +51,14 @@ def debugserver_applist(service_provider: ServiceProviderDep) -> None:
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
@cli.command("start-server")
|
|
54
|
-
def debugserver_start_server(
|
|
54
|
+
def debugserver_start_server(
|
|
55
|
+
service_provider: ServiceProviderDep,
|
|
56
|
+
local_port: Optional[int] = None,
|
|
57
|
+
host: Annotated[
|
|
58
|
+
str,
|
|
59
|
+
typer.Option(help="Address to bind the local port to."),
|
|
60
|
+
] = "127.0.0.1",
|
|
61
|
+
) -> None:
|
|
55
62
|
"""
|
|
56
63
|
Start debugserver and print the LLDB connect string.
|
|
57
64
|
|
|
@@ -66,10 +73,10 @@ def debugserver_start_server(service_provider: ServiceProviderDep, local_port: O
|
|
|
66
73
|
service_name = "com.apple.internal.dt.remote.debugproxy"
|
|
67
74
|
|
|
68
75
|
if local_port is not None:
|
|
69
|
-
print(DEBUGSERVER_CONNECTION_STEPS.format(host=
|
|
76
|
+
print(DEBUGSERVER_CONNECTION_STEPS.format(host=host, port=local_port))
|
|
70
77
|
print("Started port forwarding. Press Ctrl-C to close this shell when done")
|
|
71
78
|
sys.stdout.flush()
|
|
72
|
-
LockdownTcpForwarder(service_provider, local_port, service_name).start()
|
|
79
|
+
LockdownTcpForwarder(service_provider, local_port, service_name).start(address=host)
|
|
73
80
|
elif Version(service_provider.product_version) >= Version("17.0"):
|
|
74
81
|
if not isinstance(service_provider, RemoteServiceDiscoveryService):
|
|
75
82
|
raise RSDRequiredError(service_provider.identifier)
|
|
@@ -166,46 +166,49 @@ def process_id_for_bundle_id(service_provider: ServiceProviderDep, app_bundle_id
|
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
def get_matching_processes(
|
|
169
|
-
|
|
169
|
+
device_info: DeviceInfo,
|
|
170
170
|
name: Optional[str] = None,
|
|
171
171
|
bundle_identifier: Optional[str] = None,
|
|
172
172
|
) -> list[MatchedProcessByPid]:
|
|
173
173
|
result: list[MatchedProcessByPid] = []
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
):
|
|
183
|
-
result.append(MatchedProcessByPid(name=current_name, pid=pid))
|
|
174
|
+
for process in device_info.proclist():
|
|
175
|
+
current_name = process["name"]
|
|
176
|
+
current_bundle_identifier = process.get("bundleIdentifier", "")
|
|
177
|
+
pid = process["pid"]
|
|
178
|
+
if (bundle_identifier is not None and bundle_identifier in current_bundle_identifier) or (
|
|
179
|
+
name is not None and name in current_name
|
|
180
|
+
):
|
|
181
|
+
result.append(MatchedProcessByPid(name=current_name, pid=pid))
|
|
184
182
|
return result
|
|
185
183
|
|
|
186
184
|
|
|
187
185
|
@cli.command("pkill")
|
|
188
186
|
def pkill(
|
|
189
187
|
service_provider: ServiceProviderDep,
|
|
190
|
-
|
|
188
|
+
expressions: Annotated[
|
|
189
|
+
list[str],
|
|
190
|
+
typer.Argument(help="One or more process-name (or bundle id) expressions to match."),
|
|
191
|
+
],
|
|
191
192
|
bundle: Annotated[
|
|
192
193
|
bool,
|
|
193
|
-
typer.Option(help="Treat given
|
|
194
|
+
typer.Option(help="Treat given expressions as bundle-identifiers instead of process names"),
|
|
194
195
|
] = False,
|
|
195
196
|
) -> None:
|
|
196
|
-
"""Kill all processes containing
|
|
197
|
-
matching_name = expression if not bundle else None
|
|
198
|
-
matching_bundle_identifier = expression if bundle else None
|
|
199
|
-
matching_processes = get_matching_processes(
|
|
200
|
-
service_provider, name=matching_name, bundle_identifier=matching_bundle_identifier
|
|
201
|
-
)
|
|
202
|
-
|
|
197
|
+
"""Kill all processes containing each expression in their name."""
|
|
203
198
|
with DvtSecureSocketProxyService(lockdown=service_provider) as dvt:
|
|
199
|
+
device_info = DeviceInfo(dvt)
|
|
204
200
|
process_control = ProcessControl(dvt)
|
|
205
201
|
|
|
206
|
-
for
|
|
207
|
-
|
|
208
|
-
|
|
202
|
+
for expression in expressions:
|
|
203
|
+
matching_name = expression if not bundle else None
|
|
204
|
+
matching_bundle_identifier = expression if bundle else None
|
|
205
|
+
matching_processes = get_matching_processes(
|
|
206
|
+
device_info, name=matching_name, bundle_identifier=matching_bundle_identifier
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
for process in matching_processes:
|
|
210
|
+
logger.info(f"Killing {process.name}({process.pid})")
|
|
211
|
+
process_control.kill(process.pid)
|
|
209
212
|
|
|
210
213
|
|
|
211
214
|
@cli.command("launch")
|
pymobiledevice3/cli/lockdown.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ast
|
|
1
2
|
import asyncio
|
|
2
3
|
import logging
|
|
3
4
|
import plistlib
|
|
@@ -61,8 +62,8 @@ def lockdown_set(
|
|
|
61
62
|
domain: Optional[str] = None,
|
|
62
63
|
key: Optional[str] = None,
|
|
63
64
|
) -> None:
|
|
64
|
-
"""set a lockdown value using python's
|
|
65
|
-
print_json(service_provider.set_value(value=
|
|
65
|
+
"""set a lockdown value using python's ast.literal_eval()"""
|
|
66
|
+
print_json(service_provider.set_value(value=ast.literal_eval(value), domain=domain, key=key))
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
@cli.command("remove")
|
pymobiledevice3/cli/usbmux.py
CHANGED
|
@@ -43,6 +43,10 @@ def usbmux_forward(
|
|
|
43
43
|
Optional[str],
|
|
44
44
|
typer.Option(help="Device serial/UDID to forward traffic to."),
|
|
45
45
|
] = None,
|
|
46
|
+
host: Annotated[
|
|
47
|
+
str,
|
|
48
|
+
typer.Option(help="Address to bind the local port to."),
|
|
49
|
+
] = "127.0.0.1",
|
|
46
50
|
daemonize: Annotated[
|
|
47
51
|
bool,
|
|
48
52
|
typer.Option("--daemonize", "-d", help="Run the forwarder in the background."),
|
|
@@ -58,10 +62,12 @@ def usbmux_forward(
|
|
|
58
62
|
raise NotImplementedError("daemonizing is only supported on unix platforms") from e
|
|
59
63
|
|
|
60
64
|
with tempfile.NamedTemporaryFile("wt") as pid_file:
|
|
61
|
-
daemon = Daemonize(
|
|
65
|
+
daemon = Daemonize(
|
|
66
|
+
app=f"forwarder {src_port}->{dst_port}", pid=pid_file.name, action=lambda: forwarder.start(address=host)
|
|
67
|
+
)
|
|
62
68
|
daemon.start()
|
|
63
69
|
else:
|
|
64
|
-
forwarder.start()
|
|
70
|
+
forwarder.start(address=host)
|
|
65
71
|
|
|
66
72
|
|
|
67
73
|
@cli.command("list")
|
pymobiledevice3/tcp_forwarder.py
CHANGED
|
@@ -38,7 +38,7 @@ class TcpForwarderBase:
|
|
|
38
38
|
# socket to its remote socket and vice versa
|
|
39
39
|
self.connections = {}
|
|
40
40
|
|
|
41
|
-
def start(self, address="
|
|
41
|
+
def start(self, address="127.0.0.1"):
|
|
42
42
|
"""forward each connection from given local machine port to remote device port"""
|
|
43
43
|
# create local tcp server socket
|
|
44
44
|
self.server_socket = socket.socket()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymobiledevice3
|
|
3
|
-
Version: 7.1
|
|
3
|
+
Version: 7.2.1
|
|
4
4
|
Summary: Pure python3 implementation for working with iDevices (iPhone, etc...)
|
|
5
5
|
Author-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>
|
|
6
6
|
Maintainer-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>
|
|
@@ -8,7 +8,7 @@ misc/understanding_idevice_protocol_layers.md,sha256=FMJQ-ik2j9kFLPS15JzDZg62uk1
|
|
|
8
8
|
misc/usbmux_sniff.sh,sha256=iWtbucOEQ9_UEFXk9x-2VNt48Jg5zrPsnUbZ_LfZxwA,212
|
|
9
9
|
pymobiledevice3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
pymobiledevice3/__main__.py,sha256=Ogsyro4MUVVSciEtg8kZufL81AHcjuphItnaL0BT10Q,16386
|
|
11
|
-
pymobiledevice3/_version.py,sha256=
|
|
11
|
+
pymobiledevice3/_version.py,sha256=rbztoWSpiETtUdAao1fLJkFRZtvzfRoSylakuWALkac,704
|
|
12
12
|
pymobiledevice3/bonjour.py,sha256=lmx3uCaiolF59AieftmTKqktNod5ZDyJ06oRZdYKHSE,13681
|
|
13
13
|
pymobiledevice3/ca.py,sha256=5_Y4F-zDFX_KeDL-M_TRCKKyrRRb9h1lBE8MGTWv91o,10606
|
|
14
14
|
pymobiledevice3/common.py,sha256=FZzF0BQYV5fCEUPbLo6jbt2Ig9s5YwR8AvX_iR124Ew,329
|
|
@@ -19,7 +19,7 @@ pymobiledevice3/lockdown.py,sha256=CgT3FApB3SLXbvbL3I7OFN7IkiPpSKjdxA1Zr0I6xIs,3
|
|
|
19
19
|
pymobiledevice3/lockdown_service_provider.py,sha256=mj5Hf3fNWdVYYUayKnLO3NWNgvD0xDMAiSIXKDcXCuk,1814
|
|
20
20
|
pymobiledevice3/pair_records.py,sha256=4T32UPcBuN_4e-QFzGLoDoUBg3k7hgQh72Yo3CTi18M,6001
|
|
21
21
|
pymobiledevice3/service_connection.py,sha256=7-FxkycdgzAMcPqn5j5K4z8Zj5O_EOAj67j9DhkJcOY,15041
|
|
22
|
-
pymobiledevice3/tcp_forwarder.py,sha256=
|
|
22
|
+
pymobiledevice3/tcp_forwarder.py,sha256=o3NyIWItt_eprILSCvZcT_rfjPEPJGSgiiM3CLgC2UU,8973
|
|
23
23
|
pymobiledevice3/usbmux.py,sha256=GmQTB3V5_6oYErBlZrFRi7XjPKVU1p0RUj147vT9-eg,16835
|
|
24
24
|
pymobiledevice3/utils.py,sha256=Udx6xubsWYtJU9x7R-PrlSHseY438ua9_DPvzHd3XrQ,2210
|
|
25
25
|
pymobiledevice3/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -33,7 +33,7 @@ pymobiledevice3/cli/cli_common.py,sha256=FZJtZgnMZcCg2X2daJBvqOgbhiGbcG5aDFQ_pf5
|
|
|
33
33
|
pymobiledevice3/cli/companion_proxy.py,sha256=Zp1PJKE36mNs2lbnmwevDoVC7jTX5FSuQApTcmvEhJg,611
|
|
34
34
|
pymobiledevice3/cli/crash.py,sha256=wss34L3at8qwL_z5ExGabofBbQ99cP_CGJJm8vuF36g,3506
|
|
35
35
|
pymobiledevice3/cli/idam.py,sha256=a_xnURhQlmfnrTGY5KwOIbl9f-1rAjuGG-q6QfOfSE4,1105
|
|
36
|
-
pymobiledevice3/cli/lockdown.py,sha256=
|
|
36
|
+
pymobiledevice3/cli/lockdown.py,sha256=p5bYYwR2HnXEU2jjotuYt3gSUVoVfzV9kBNTZr9eioU,6428
|
|
37
37
|
pymobiledevice3/cli/mounter.py,sha256=wKFyn2liZspAVu7GWAfJiA_CyTLmDFeN9mg9YISMK_M,7930
|
|
38
38
|
pymobiledevice3/cli/notification.py,sha256=rHC8z1RFpQpQAnsbqGC2ozqFjzvJ98FXw2WdAPJE0sw,2143
|
|
39
39
|
pymobiledevice3/cli/pcap.py,sha256=50_jpjxC5GRJeD3PnrVnp5CkJhw1ZOM-LKxwsotif1E,2431
|
|
@@ -45,19 +45,19 @@ pymobiledevice3/cli/remote.py,sha256=tjoMjjUg32SPaIdZbwtu2Frno5Ly9is3p_E6FyjWxUU
|
|
|
45
45
|
pymobiledevice3/cli/restore.py,sha256=j1T9-eZi2AsvQqJ0EKpXuaWPuttoVUPy0xbYYfH6B_s,7485
|
|
46
46
|
pymobiledevice3/cli/springboard.py,sha256=S76Kth2DbqsjGRFVOns40-L4RCqFnuMFuy7bVHbmw9M,3111
|
|
47
47
|
pymobiledevice3/cli/syslog.py,sha256=tqQLecHGcb0v_3Lq54XyEDojdxJSFpvMnQ8B7P_lU58,8945
|
|
48
|
-
pymobiledevice3/cli/usbmux.py,sha256=
|
|
48
|
+
pymobiledevice3/cli/usbmux.py,sha256=TTzVTftgipOS4ulHH9dfj7AG_GYZgKh8stl_4UXGS6o,3193
|
|
49
49
|
pymobiledevice3/cli/version.py,sha256=59NxyLVJWcqNpoKo-XTc5RYGmweuJUmKgKnLwaLzD5o,326
|
|
50
50
|
pymobiledevice3/cli/webinspector.py,sha256=grfwKDAQ1oh7WA_VWCM6qGQzo8osIOY2PjpYXJ1hzCs,17946
|
|
51
51
|
pymobiledevice3/cli/developer/__init__.py,sha256=idQOgVsitt3nfolyhZuA6KHN2j44JNVq-d41I6ychpY,2015
|
|
52
52
|
pymobiledevice3/cli/developer/arbitration.py,sha256=7Eod6-dlSjAMBljbsIGHL_QG9LFbOPIXqpS9Y_4-Q3Y,1576
|
|
53
53
|
pymobiledevice3/cli/developer/condition.py,sha256=lb5BS8lVcgsb2yBgBsN2nK-j2u1_iVm_tBd1pSRHZB0,1294
|
|
54
54
|
pymobiledevice3/cli/developer/core_device.py,sha256=QzMVfghq3fKLI2NQ2Kg7r_zyFIWGCBt7ZS-GTLWDZs4,10895
|
|
55
|
-
pymobiledevice3/cli/developer/debugserver.py,sha256=
|
|
55
|
+
pymobiledevice3/cli/developer/debugserver.py,sha256=gIUBiJx8e2h3u8QDJvR0rsQnmaPlY8eeEp6iVEhasjE,10600
|
|
56
56
|
pymobiledevice3/cli/developer/fetch_symbols.py,sha256=57HzVyUJPXL_I8EiqWArJ2Fczb2yX9y6nDMgjZcADo0,4353
|
|
57
57
|
pymobiledevice3/cli/developer/simulate_location.py,sha256=IVJQPYKUrQcsdpCxf2D2sgy6Nb3mUOFvK-Og_y5lfDM,1555
|
|
58
58
|
pymobiledevice3/cli/developer/accessibility/__init__.py,sha256=VpJSdnkEZhUuJXWy08wqgqObXv1PgZ2Ht4qy-560QRk,2271
|
|
59
|
-
pymobiledevice3/cli/developer/accessibility/settings.py,sha256=
|
|
60
|
-
pymobiledevice3/cli/developer/dvt/__init__.py,sha256=
|
|
59
|
+
pymobiledevice3/cli/developer/accessibility/settings.py,sha256=2aTAFSslD9Lc2yqW7l7x2IiRTOYxfOX_T_xYwkgHBvk,1193
|
|
60
|
+
pymobiledevice3/cli/developer/dvt/__init__.py,sha256=N2IZJR6pYerLtzCsNQL8TTSy6X1ktduLuYDT0Ld5tIo,15828
|
|
61
61
|
pymobiledevice3/cli/developer/dvt/core_profile_session.py,sha256=Ni6znP0mg-XKLu0aXm8ZZDEKziKokQYMjwbTu2TzFxk,9968
|
|
62
62
|
pymobiledevice3/cli/developer/dvt/simulate_location.py,sha256=QLjjllbjuM205joFlRXdo7cIjvkFdXJ2f5pKzT9sHOY,1816
|
|
63
63
|
pymobiledevice3/cli/developer/dvt/sysmon/__init__.py,sha256=PSTruXzQQLGvVuc1j7aKEafXFYgFMOCuNiMjbtDqKrM,2283
|
|
@@ -180,9 +180,9 @@ pymobiledevice3/services/web_protocol/switch_to.py,sha256=TCdVrMfsvd18o-vZ0owVrE
|
|
|
180
180
|
pymobiledevice3/tunneld/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
pymobiledevice3/tunneld/api.py,sha256=Lwl1OdhPTgX6Zqezy8T4dEcXRfaEPwyGNClioTx3fUc,2338
|
|
182
182
|
pymobiledevice3/tunneld/server.py,sha256=dMEZAv_X-76l0vSalpq4x0IVkbE-MNGR77T-u1TiHuE,25752
|
|
183
|
-
pymobiledevice3-7.1.
|
|
184
|
-
pymobiledevice3-7.1.
|
|
185
|
-
pymobiledevice3-7.1.
|
|
186
|
-
pymobiledevice3-7.1.
|
|
187
|
-
pymobiledevice3-7.1.
|
|
188
|
-
pymobiledevice3-7.1.
|
|
183
|
+
pymobiledevice3-7.2.1.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
184
|
+
pymobiledevice3-7.2.1.dist-info/METADATA,sha256=MDpLw5PrYW0CB_kUYGguA2DMEHn2-v-iIY5H5q7kF48,17500
|
|
185
|
+
pymobiledevice3-7.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
186
|
+
pymobiledevice3-7.2.1.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
|
|
187
|
+
pymobiledevice3-7.2.1.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
|
|
188
|
+
pymobiledevice3-7.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|