pymobiledevice3 5.0.0__py3-none-any.whl → 5.0.2__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.
Potentially problematic release.
This version of pymobiledevice3 might be problematic. Click here for more details.
- misc/plist_sniffer.py +15 -15
- misc/remotexpc_sniffer.py +29 -28
- pymobiledevice3/__main__.py +128 -102
- pymobiledevice3/_version.py +2 -2
- pymobiledevice3/bonjour.py +26 -49
- pymobiledevice3/ca.py +32 -24
- pymobiledevice3/cli/activation.py +7 -7
- pymobiledevice3/cli/afc.py +19 -19
- pymobiledevice3/cli/amfi.py +4 -4
- pymobiledevice3/cli/apps.py +51 -39
- pymobiledevice3/cli/backup.py +58 -32
- pymobiledevice3/cli/bonjour.py +25 -18
- pymobiledevice3/cli/cli_common.py +112 -81
- pymobiledevice3/cli/companion_proxy.py +4 -4
- pymobiledevice3/cli/completions.py +10 -10
- pymobiledevice3/cli/crash.py +37 -31
- pymobiledevice3/cli/developer.py +602 -520
- pymobiledevice3/cli/diagnostics.py +38 -33
- pymobiledevice3/cli/lockdown.py +79 -74
- pymobiledevice3/cli/mounter.py +85 -68
- pymobiledevice3/cli/notification.py +10 -10
- pymobiledevice3/cli/pcap.py +19 -14
- pymobiledevice3/cli/power_assertion.py +12 -10
- pymobiledevice3/cli/processes.py +10 -10
- pymobiledevice3/cli/profile.py +88 -77
- pymobiledevice3/cli/provision.py +17 -17
- pymobiledevice3/cli/remote.py +186 -110
- pymobiledevice3/cli/restore.py +43 -40
- pymobiledevice3/cli/springboard.py +30 -28
- pymobiledevice3/cli/syslog.py +85 -58
- pymobiledevice3/cli/usbmux.py +21 -20
- pymobiledevice3/cli/version.py +3 -2
- pymobiledevice3/cli/webinspector.py +157 -79
- pymobiledevice3/common.py +1 -1
- pymobiledevice3/exceptions.py +154 -60
- pymobiledevice3/irecv.py +49 -53
- pymobiledevice3/irecv_devices.py +1489 -492
- pymobiledevice3/lockdown.py +394 -241
- pymobiledevice3/lockdown_service_provider.py +5 -7
- pymobiledevice3/osu/os_utils.py +18 -9
- pymobiledevice3/osu/posix_util.py +28 -15
- pymobiledevice3/osu/win_util.py +14 -8
- pymobiledevice3/pair_records.py +19 -19
- pymobiledevice3/remote/common.py +4 -4
- pymobiledevice3/remote/core_device/app_service.py +94 -67
- pymobiledevice3/remote/core_device/core_device_service.py +17 -14
- pymobiledevice3/remote/core_device/device_info.py +5 -5
- pymobiledevice3/remote/core_device/diagnostics_service.py +10 -8
- pymobiledevice3/remote/core_device/file_service.py +47 -33
- pymobiledevice3/remote/remote_service_discovery.py +53 -35
- pymobiledevice3/remote/remotexpc.py +62 -41
- pymobiledevice3/remote/tunnel_service.py +371 -293
- pymobiledevice3/remote/utils.py +12 -11
- pymobiledevice3/remote/xpc_message.py +145 -125
- pymobiledevice3/resources/dsc_uuid_map.py +19 -19
- pymobiledevice3/resources/firmware_notifications.py +16 -16
- pymobiledevice3/restore/asr.py +27 -27
- pymobiledevice3/restore/base_restore.py +90 -47
- pymobiledevice3/restore/consts.py +87 -66
- pymobiledevice3/restore/device.py +11 -11
- pymobiledevice3/restore/fdr.py +46 -46
- pymobiledevice3/restore/ftab.py +19 -19
- pymobiledevice3/restore/img4.py +130 -133
- pymobiledevice3/restore/mbn.py +35 -54
- pymobiledevice3/restore/recovery.py +125 -135
- pymobiledevice3/restore/restore.py +524 -523
- pymobiledevice3/restore/restore_options.py +122 -115
- pymobiledevice3/restore/restored_client.py +25 -22
- pymobiledevice3/restore/tss.py +378 -270
- pymobiledevice3/service_connection.py +50 -46
- pymobiledevice3/services/accessibilityaudit.py +136 -126
- pymobiledevice3/services/afc.py +350 -291
- pymobiledevice3/services/amfi.py +21 -18
- pymobiledevice3/services/companion.py +23 -19
- pymobiledevice3/services/crash_reports.py +60 -46
- pymobiledevice3/services/debugserver_applist.py +3 -3
- pymobiledevice3/services/device_arbitration.py +8 -8
- pymobiledevice3/services/device_link.py +55 -47
- pymobiledevice3/services/diagnostics.py +971 -968
- pymobiledevice3/services/dtfetchsymbols.py +8 -8
- pymobiledevice3/services/dvt/dvt_secure_socket_proxy.py +4 -4
- pymobiledevice3/services/dvt/dvt_testmanaged_proxy.py +4 -4
- pymobiledevice3/services/dvt/instruments/activity_trace_tap.py +85 -74
- pymobiledevice3/services/dvt/instruments/application_listing.py +2 -3
- pymobiledevice3/services/dvt/instruments/condition_inducer.py +7 -6
- pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py +466 -384
- pymobiledevice3/services/dvt/instruments/device_info.py +11 -11
- pymobiledevice3/services/dvt/instruments/energy_monitor.py +1 -1
- pymobiledevice3/services/dvt/instruments/graphics.py +1 -1
- pymobiledevice3/services/dvt/instruments/location_simulation.py +1 -1
- pymobiledevice3/services/dvt/instruments/location_simulation_base.py +10 -10
- pymobiledevice3/services/dvt/instruments/network_monitor.py +17 -17
- pymobiledevice3/services/dvt/instruments/notifications.py +1 -1
- pymobiledevice3/services/dvt/instruments/process_control.py +25 -10
- pymobiledevice3/services/dvt/instruments/screenshot.py +2 -2
- pymobiledevice3/services/dvt/instruments/sysmontap.py +15 -15
- pymobiledevice3/services/dvt/testmanaged/xcuitest.py +40 -50
- pymobiledevice3/services/file_relay.py +10 -10
- pymobiledevice3/services/heartbeat.py +8 -7
- pymobiledevice3/services/house_arrest.py +12 -15
- pymobiledevice3/services/installation_proxy.py +119 -100
- pymobiledevice3/services/lockdown_service.py +12 -5
- pymobiledevice3/services/misagent.py +22 -19
- pymobiledevice3/services/mobile_activation.py +84 -72
- pymobiledevice3/services/mobile_config.py +330 -301
- pymobiledevice3/services/mobile_image_mounter.py +137 -116
- pymobiledevice3/services/mobilebackup2.py +188 -150
- pymobiledevice3/services/notification_proxy.py +11 -11
- pymobiledevice3/services/os_trace.py +69 -51
- pymobiledevice3/services/pcapd.py +306 -306
- pymobiledevice3/services/power_assertion.py +10 -9
- pymobiledevice3/services/preboard.py +4 -4
- pymobiledevice3/services/remote_fetch_symbols.py +16 -14
- pymobiledevice3/services/remote_server.py +176 -146
- pymobiledevice3/services/restore_service.py +16 -16
- pymobiledevice3/services/screenshot.py +13 -10
- pymobiledevice3/services/simulate_location.py +7 -7
- pymobiledevice3/services/springboard.py +15 -15
- pymobiledevice3/services/syslog.py +5 -5
- pymobiledevice3/services/web_protocol/alert.py +3 -3
- pymobiledevice3/services/web_protocol/automation_session.py +180 -176
- pymobiledevice3/services/web_protocol/cdp_screencast.py +44 -36
- pymobiledevice3/services/web_protocol/cdp_server.py +19 -19
- pymobiledevice3/services/web_protocol/cdp_target.py +411 -373
- pymobiledevice3/services/web_protocol/driver.py +47 -45
- pymobiledevice3/services/web_protocol/element.py +74 -63
- pymobiledevice3/services/web_protocol/inspector_session.py +106 -102
- pymobiledevice3/services/web_protocol/selenium_api.py +2 -2
- pymobiledevice3/services/web_protocol/session_protocol.py +15 -10
- pymobiledevice3/services/web_protocol/switch_to.py +11 -12
- pymobiledevice3/services/webinspector.py +127 -116
- pymobiledevice3/tcp_forwarder.py +35 -22
- pymobiledevice3/tunneld/api.py +20 -15
- pymobiledevice3/tunneld/server.py +212 -133
- pymobiledevice3/usbmux.py +183 -138
- pymobiledevice3/utils.py +14 -11
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/METADATA +1 -1
- pymobiledevice3-5.0.2.dist-info/RECORD +173 -0
- pymobiledevice3-5.0.0.dist-info/RECORD +0 -173
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/WHEEL +0 -0
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/licenses/LICENSE +0 -0
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/top_level.txt +0 -0
|
@@ -13,267 +13,270 @@ from pymobiledevice3.lockdown import LockdownClient
|
|
|
13
13
|
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
|
|
14
14
|
from pymobiledevice3.services.lockdown_service import LockdownService
|
|
15
15
|
|
|
16
|
-
INTERFACE_NAMES = enum.Enum(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
16
|
+
INTERFACE_NAMES = enum.Enum(
|
|
17
|
+
"InterfaceNames",
|
|
18
|
+
names={
|
|
19
|
+
"other": 1,
|
|
20
|
+
"regular1822": 2,
|
|
21
|
+
"hdh1822": 3,
|
|
22
|
+
"ddnX25": 4,
|
|
23
|
+
"rfc877x25": 5,
|
|
24
|
+
"ethernetCsmacd": 6,
|
|
25
|
+
"iso88023Csmacd": 7,
|
|
26
|
+
"iso88024TokenBus": 8,
|
|
27
|
+
"iso88025TokenRing": 9,
|
|
28
|
+
"iso88026Man": 10,
|
|
29
|
+
"starLan": 11,
|
|
30
|
+
"proteon10Mbit": 12,
|
|
31
|
+
"proteon80Mbit": 13,
|
|
32
|
+
"hyperchannel": 14,
|
|
33
|
+
"fddi": 15,
|
|
34
|
+
"lapb": 16,
|
|
35
|
+
"sdlc": 17,
|
|
36
|
+
"ds1": 18,
|
|
37
|
+
"e1": 19,
|
|
38
|
+
"basicISDN": 20,
|
|
39
|
+
"primaryISDN": 21,
|
|
40
|
+
"propPointToPointSerial": 22,
|
|
41
|
+
"ppp": 23,
|
|
42
|
+
"softwareLoopback": 24,
|
|
43
|
+
"eon": 25,
|
|
44
|
+
"ethernet3Mbit": 26,
|
|
45
|
+
"nsip": 27,
|
|
46
|
+
"slip": 28,
|
|
47
|
+
"ultra": 29,
|
|
48
|
+
"ds3": 30,
|
|
49
|
+
"sip": 31,
|
|
50
|
+
"frameRelay": 32,
|
|
51
|
+
"rs232": 33,
|
|
52
|
+
"para": 34,
|
|
53
|
+
"arcnet": 35,
|
|
54
|
+
"arcnetPlus": 36,
|
|
55
|
+
"atm": 37,
|
|
56
|
+
"miox25": 38,
|
|
57
|
+
"sonet": 39,
|
|
58
|
+
"x25ple": 40,
|
|
59
|
+
"iso88022llc": 41,
|
|
60
|
+
"localTalk": 42,
|
|
61
|
+
"smdsDxi": 43,
|
|
62
|
+
"frameRelayService": 44,
|
|
63
|
+
"v35": 45,
|
|
64
|
+
"hssi": 46,
|
|
65
|
+
"hippi": 47,
|
|
66
|
+
"modem": 48,
|
|
67
|
+
"aal5": 49,
|
|
68
|
+
"sonetPath": 50,
|
|
69
|
+
"sonetVT": 51,
|
|
70
|
+
"smdsIcip": 52,
|
|
71
|
+
"propVirtual": 53,
|
|
72
|
+
"propMultiplexor": 54,
|
|
73
|
+
"ieee80212": 55,
|
|
74
|
+
"fibreChannel": 56,
|
|
75
|
+
"hippiInterface": 57,
|
|
76
|
+
"frameRelayInterconnect": 58,
|
|
77
|
+
"aflane8023": 59,
|
|
78
|
+
"aflane8025": 60,
|
|
79
|
+
"cctEmul": 61,
|
|
80
|
+
"fastEther": 62,
|
|
81
|
+
"isdn": 63,
|
|
82
|
+
"v11": 64,
|
|
83
|
+
"v36": 65,
|
|
84
|
+
"g703at64k": 66,
|
|
85
|
+
"g703at2mb": 67,
|
|
86
|
+
"qllc": 68,
|
|
87
|
+
"fastEtherFX": 69,
|
|
88
|
+
"channel": 70,
|
|
89
|
+
"ieee80211": 71,
|
|
90
|
+
"ibm370parChan": 72,
|
|
91
|
+
"escon": 73,
|
|
92
|
+
"dlsw": 74,
|
|
93
|
+
"isdns": 75,
|
|
94
|
+
"isdnu": 76,
|
|
95
|
+
"lapd": 77,
|
|
96
|
+
"ipSwitch": 78,
|
|
97
|
+
"rsrb": 79,
|
|
98
|
+
"atmLogical": 80,
|
|
99
|
+
"ds0": 81,
|
|
100
|
+
"ds0Bundle": 82,
|
|
101
|
+
"bsc": 83,
|
|
102
|
+
"async": 84,
|
|
103
|
+
"cnr": 85,
|
|
104
|
+
"iso88025Dtr": 86,
|
|
105
|
+
"eplrs": 87,
|
|
106
|
+
"arap": 88,
|
|
107
|
+
"propCnls": 89,
|
|
108
|
+
"hostPad": 90,
|
|
109
|
+
"termPad": 91,
|
|
110
|
+
"frameRelayMPI": 92,
|
|
111
|
+
"x213": 93,
|
|
112
|
+
"adsl": 94,
|
|
113
|
+
"radsl": 95,
|
|
114
|
+
"sdsl": 96,
|
|
115
|
+
"vdsl": 97,
|
|
116
|
+
"iso88025CRFPInt": 98,
|
|
117
|
+
"myrinet": 99,
|
|
118
|
+
"voiceEM": 100,
|
|
119
|
+
"voiceFXO": 101,
|
|
120
|
+
"voiceFXS": 102,
|
|
121
|
+
"voiceEncap": 103,
|
|
122
|
+
"voiceOverIp": 104,
|
|
123
|
+
"atmDxi": 105,
|
|
124
|
+
"atmFuni": 106,
|
|
125
|
+
"atmIma": 107,
|
|
126
|
+
"pppMultilinkBundle": 108,
|
|
127
|
+
"ipOverCdlc": 109,
|
|
128
|
+
"ipOverClaw": 110,
|
|
129
|
+
"stackToStack": 111,
|
|
130
|
+
"virtualIpAddress": 112,
|
|
131
|
+
"mpc": 113,
|
|
132
|
+
"ipOverAtm": 114,
|
|
133
|
+
"iso88025Fiber": 115,
|
|
134
|
+
"tdlc": 116,
|
|
135
|
+
"gigabitEthernet": 117,
|
|
136
|
+
"hdlc": 118,
|
|
137
|
+
"lapf": 119,
|
|
138
|
+
"v37": 120,
|
|
139
|
+
"x25mlp": 121,
|
|
140
|
+
"x25huntGroup": 122,
|
|
141
|
+
"transpHdlc": 123,
|
|
142
|
+
"interleave": 124,
|
|
143
|
+
"fast": 125,
|
|
144
|
+
"ip": 126,
|
|
145
|
+
"docsCableMaclayer": 127,
|
|
146
|
+
"docsCableDownstream": 128,
|
|
147
|
+
"docsCableUpstream": 129,
|
|
148
|
+
"a12MppSwitch": 130,
|
|
149
|
+
"tunnel": 131,
|
|
150
|
+
"coffee": 132,
|
|
151
|
+
"ces": 133,
|
|
152
|
+
"atmSubInterface": 134,
|
|
153
|
+
"l2vlan": 135,
|
|
154
|
+
"l3ipvlan": 136,
|
|
155
|
+
"l3ipxvlan": 137,
|
|
156
|
+
"digitalPowerline": 138,
|
|
157
|
+
"mediaMailOverIp": 139,
|
|
158
|
+
"dtm": 140,
|
|
159
|
+
"dcn": 141,
|
|
160
|
+
"ipForward": 142,
|
|
161
|
+
"msdsl": 143,
|
|
162
|
+
"ieee1394": 144,
|
|
163
|
+
"if-gsn": 145,
|
|
164
|
+
"dvbRccMacLayer": 146,
|
|
165
|
+
"dvbRccDownstream": 147,
|
|
166
|
+
"dvbRccUpstream": 148,
|
|
167
|
+
"atmVirtual": 149,
|
|
168
|
+
"mplsTunnel": 150,
|
|
169
|
+
"srp": 151,
|
|
170
|
+
"voiceOverAtm": 152,
|
|
171
|
+
"voiceOverFrameRelay": 153,
|
|
172
|
+
"idsl": 154,
|
|
173
|
+
"compositeLink": 155,
|
|
174
|
+
"ss7SigLink": 156,
|
|
175
|
+
"propWirelessP2P": 157,
|
|
176
|
+
"frForward": 158,
|
|
177
|
+
"rfc1483": 159,
|
|
178
|
+
"usb": 160,
|
|
179
|
+
"ieee8023adLag": 161,
|
|
180
|
+
"bgppolicyaccounting": 162,
|
|
181
|
+
"frf16MfrBundle": 163,
|
|
182
|
+
"h323Gatekeeper": 164,
|
|
183
|
+
"h323Proxy": 165,
|
|
184
|
+
"mpls": 166,
|
|
185
|
+
"mfSigLink": 167,
|
|
186
|
+
"hdsl2": 168,
|
|
187
|
+
"shdsl": 169,
|
|
188
|
+
"ds1FDL": 170,
|
|
189
|
+
"pos": 171,
|
|
190
|
+
"dvbAsiIn": 172,
|
|
191
|
+
"dvbAsiOut": 173,
|
|
192
|
+
"plc": 174,
|
|
193
|
+
"nfas": 175,
|
|
194
|
+
"tr008": 176,
|
|
195
|
+
"gr303RDT": 177,
|
|
196
|
+
"gr303IDT": 178,
|
|
197
|
+
"isup": 179,
|
|
198
|
+
"propDocsWirelessMaclayer": 180,
|
|
199
|
+
"propDocsWirelessDownstream": 181,
|
|
200
|
+
"propDocsWirelessUpstream": 182,
|
|
201
|
+
"hiperlan2": 183,
|
|
202
|
+
"propBWAp2Mp": 184,
|
|
203
|
+
"sonetOverheadChannel": 185,
|
|
204
|
+
"digitalWrapperOverheadChannel": 186,
|
|
205
|
+
"aal2": 187,
|
|
206
|
+
"radioMAC": 188,
|
|
207
|
+
"atmRadio": 189,
|
|
208
|
+
"imt": 190,
|
|
209
|
+
"mvl": 191,
|
|
210
|
+
"reachDSL": 192,
|
|
211
|
+
"frDlciEndPt": 193,
|
|
212
|
+
"atmVciEndPt": 194,
|
|
213
|
+
"opticalChannel": 195,
|
|
214
|
+
"opticalTransport": 196,
|
|
215
|
+
"propAtm": 197,
|
|
216
|
+
"voiceOverCable": 198,
|
|
217
|
+
"infiniband": 199,
|
|
218
|
+
"teLink": 200,
|
|
219
|
+
"q2931": 201,
|
|
220
|
+
"virtualTg": 202,
|
|
221
|
+
"sipTg": 203,
|
|
222
|
+
"sipSig": 204,
|
|
223
|
+
"docsCableUpstreamChannel": 205,
|
|
224
|
+
"econet": 206,
|
|
225
|
+
"pon155": 207,
|
|
226
|
+
"pon622": 208,
|
|
227
|
+
"bridge": 209,
|
|
228
|
+
"linegroup": 210,
|
|
229
|
+
"voiceEMFGD": 211,
|
|
230
|
+
"voiceFGDEANA": 212,
|
|
231
|
+
"voiceDID": 213,
|
|
232
|
+
"mpegTransport": 214,
|
|
233
|
+
"sixToFour": 215,
|
|
234
|
+
"gtp": 216,
|
|
235
|
+
"pdnEtherLoop1": 217,
|
|
236
|
+
"pdnEtherLoop2": 218,
|
|
237
|
+
"opticalChannelGroup": 219,
|
|
238
|
+
"homepna": 220,
|
|
239
|
+
"gfp": 221,
|
|
240
|
+
"ciscoISLvlan": 222,
|
|
241
|
+
"actelisMetaLOOP": 223,
|
|
242
|
+
"fcipLink": 224,
|
|
243
|
+
"rpr": 225,
|
|
244
|
+
"qam": 226,
|
|
245
|
+
"lmp": 227,
|
|
246
|
+
"cblVectaStar": 228,
|
|
247
|
+
"docsCableMCmtsDownstream": 229,
|
|
248
|
+
"adsl2": 230,
|
|
249
|
+
"macSecControlledIF": 231,
|
|
250
|
+
"macSecUncontrolledIF": 232,
|
|
251
|
+
"aviciOpticalEther": 233,
|
|
252
|
+
"atmbond": 234,
|
|
253
|
+
"voiceFGDOS": 235,
|
|
254
|
+
"mocaVersion1": 236,
|
|
255
|
+
"ieee80216WMAN": 237,
|
|
256
|
+
"adsl2plus": 238,
|
|
257
|
+
"dvbRcsMacLayer": 239,
|
|
258
|
+
"dvbTdm": 240,
|
|
259
|
+
"dvbRcsTdma": 241,
|
|
260
|
+
"x86Laps": 242,
|
|
261
|
+
"wwanPP": 243,
|
|
262
|
+
"wwanPP2": 244,
|
|
263
|
+
"voiceEBS": 245,
|
|
264
|
+
"ifPwType": 246,
|
|
265
|
+
"ilan": 247,
|
|
266
|
+
"pip": 248,
|
|
267
|
+
"aluELP": 249,
|
|
268
|
+
"gpon": 250,
|
|
269
|
+
"vdsl2": 251,
|
|
270
|
+
"capwapDot11Profile": 252,
|
|
271
|
+
"capwapDot11Bss": 253,
|
|
272
|
+
"capwapWtpVirtualRadio": 254,
|
|
273
|
+
"bits": 255,
|
|
274
|
+
"docsCableUpstreamRfPort": 256,
|
|
275
|
+
"cableDownstreamRfPort": 257,
|
|
276
|
+
"vmwareVirtualNic": 258,
|
|
277
|
+
"ieee802154": 259,
|
|
278
|
+
},
|
|
279
|
+
)
|
|
277
280
|
|
|
278
281
|
"""
|
|
279
282
|
struct pcap_hdr_s {
|
|
@@ -296,28 +299,28 @@ typedef struct pcaprec_hdr_s {
|
|
|
296
299
|
LINKTYPE_ETHERNET = 1
|
|
297
300
|
LINKTYPE_RAW = 101
|
|
298
301
|
|
|
299
|
-
ETHERNET_HEADER = b
|
|
302
|
+
ETHERNET_HEADER = b"\xbe\xef" * 6 + b"\x08\x00"
|
|
300
303
|
|
|
301
304
|
device_packet_struct = Struct(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
305
|
+
"header_length" / Int32ub,
|
|
306
|
+
"header_version" / Byte,
|
|
307
|
+
"packet_length" / Int32ub,
|
|
308
|
+
"interface_type" / Byte,
|
|
309
|
+
"unit" / Int16ub,
|
|
310
|
+
"io" / Byte,
|
|
311
|
+
"protocol_family" / Int32ub,
|
|
312
|
+
"frame_pre_length" / Int32ub,
|
|
313
|
+
"frame_post_length" / Int32ub,
|
|
314
|
+
"interface_name" / Padded(16, CString("utf8")),
|
|
315
|
+
"pid" / Int32ul,
|
|
316
|
+
"comm" / Padded(17, CString("utf8")),
|
|
317
|
+
"svc" / Int32ub,
|
|
318
|
+
"epid" / Int32ul,
|
|
319
|
+
"ecomm" / Padded(17, CString("utf8")),
|
|
320
|
+
"seconds" / Int32ub,
|
|
321
|
+
"microseconds" / Int32ub,
|
|
319
322
|
Seek(this.header_length),
|
|
320
|
-
|
|
323
|
+
"data" / Bytes(this.packet_length),
|
|
321
324
|
)
|
|
322
325
|
|
|
323
326
|
|
|
@@ -333,8 +336,9 @@ class PcapdService(LockdownService):
|
|
|
333
336
|
an iOS device. On macOS, the virtual interface can be enabled with the rvictl command. This script allows to use
|
|
334
337
|
this service on other systems.
|
|
335
338
|
"""
|
|
336
|
-
|
|
337
|
-
|
|
339
|
+
|
|
340
|
+
RSD_SERVICE_NAME = "com.apple.pcapd.shim.remote"
|
|
341
|
+
SERVICE_NAME = "com.apple.pcapd"
|
|
338
342
|
|
|
339
343
|
def __init__(self, lockdown: LockdownServiceProvider):
|
|
340
344
|
if isinstance(lockdown, LockdownClient):
|
|
@@ -342,8 +346,9 @@ class PcapdService(LockdownService):
|
|
|
342
346
|
else:
|
|
343
347
|
super().__init__(lockdown, self.RSD_SERVICE_NAME)
|
|
344
348
|
|
|
345
|
-
def watch(
|
|
346
|
-
|
|
349
|
+
def watch(
|
|
350
|
+
self, packets_count: int = -1, process: Optional[str] = None, interface_name: Optional[str] = None
|
|
351
|
+
) -> Generator[Container, None, None]:
|
|
347
352
|
packet_index = 0
|
|
348
353
|
while packet_index != packets_count:
|
|
349
354
|
d = self.service.recv_plist()
|
|
@@ -352,13 +357,11 @@ class PcapdService(LockdownService):
|
|
|
352
357
|
|
|
353
358
|
packet = device_packet_struct.parse(d)
|
|
354
359
|
|
|
355
|
-
if process is not None:
|
|
356
|
-
|
|
357
|
-
continue
|
|
360
|
+
if process is not None and process != str(packet.pid) and process != packet.comm:
|
|
361
|
+
continue
|
|
358
362
|
|
|
359
|
-
if interface_name is not None:
|
|
360
|
-
|
|
361
|
-
continue
|
|
363
|
+
if interface_name is not None and interface_name != packet.interface_name:
|
|
364
|
+
continue
|
|
362
365
|
|
|
363
366
|
packet.interface_type = INTERFACE_NAMES(packet.interface_type)
|
|
364
367
|
packet.protocol_family = CrossPlatformAddressFamily(packet.protocol_family)
|
|
@@ -366,7 +369,7 @@ class PcapdService(LockdownService):
|
|
|
366
369
|
if not packet.frame_pre_length:
|
|
367
370
|
# Add fake ethernet header for pdp packets.
|
|
368
371
|
packet.data = ETHERNET_HEADER + packet.data
|
|
369
|
-
elif packet.interface_name ==
|
|
372
|
+
elif packet.interface_name == "pdp_ip":
|
|
370
373
|
packet.data = ETHERNET_HEADER + packet.data[4:]
|
|
371
374
|
|
|
372
375
|
yield packet
|
|
@@ -376,35 +379,32 @@ class PcapdService(LockdownService):
|
|
|
376
379
|
def write_to_pcap(self, out, packet_generator) -> None:
|
|
377
380
|
shb = blocks.SectionHeader(
|
|
378
381
|
options={
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
+
"shb_hardware": "artificial",
|
|
383
|
+
"shb_os": "iOS",
|
|
384
|
+
"shb_userappl": "pymobiledevice3",
|
|
382
385
|
}
|
|
383
386
|
)
|
|
384
387
|
shb.new_member(
|
|
385
388
|
blocks.InterfaceDescription,
|
|
386
389
|
link_type=1,
|
|
387
|
-
options={
|
|
388
|
-
'if_description': 'iOS Packet Capture',
|
|
389
|
-
'if_os': f'iOS {self.lockdown.product_version}'
|
|
390
|
-
},
|
|
390
|
+
options={"if_description": "iOS Packet Capture", "if_os": f"iOS {self.lockdown.product_version}"},
|
|
391
391
|
)
|
|
392
392
|
writer = FileWriter(out, shb)
|
|
393
393
|
|
|
394
394
|
for packet in packet_generator:
|
|
395
|
-
if hasattr(packet,
|
|
396
|
-
packet_time = packet.timestamp
|
|
397
|
-
else:
|
|
398
|
-
packet_time = time.time()
|
|
395
|
+
packet_time = packet.timestamp if hasattr(packet, "timestamp") else time.time()
|
|
399
396
|
|
|
400
397
|
timestamp_microseconds = int(packet_time * 1_000_000)
|
|
401
398
|
timestamp_high = (timestamp_microseconds >> 32) & 0xFFFFFFFF
|
|
402
399
|
timestamp_low = timestamp_microseconds & 0xFFFFFFFF
|
|
403
400
|
|
|
404
|
-
enhanced_packet = shb.new_member(
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
401
|
+
enhanced_packet = shb.new_member(
|
|
402
|
+
blocks.EnhancedPacket,
|
|
403
|
+
options={
|
|
404
|
+
"opt_comment": f"PID: {packet.pid}, ProcName: {packet.comm}, EPID: {packet.epid}, "
|
|
405
|
+
f"EProcName: {packet.ecomm}, SVC: {packet.svc}"
|
|
406
|
+
},
|
|
407
|
+
)
|
|
408
408
|
|
|
409
409
|
enhanced_packet.packet_data = packet.data
|
|
410
410
|
enhanced_packet.timestamp_high = timestamp_high
|