pymobiledevice3 4.14.6__py3-none-any.whl → 7.0.6__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.
- misc/plist_sniffer.py +15 -15
- misc/remotexpc_sniffer.py +29 -28
- misc/understanding_idevice_protocol_layers.md +15 -10
- pymobiledevice3/__main__.py +317 -127
- pymobiledevice3/_version.py +22 -4
- pymobiledevice3/bonjour.py +358 -113
- pymobiledevice3/ca.py +253 -16
- pymobiledevice3/cli/activation.py +31 -23
- pymobiledevice3/cli/afc.py +49 -40
- pymobiledevice3/cli/amfi.py +16 -21
- pymobiledevice3/cli/apps.py +87 -42
- pymobiledevice3/cli/backup.py +160 -90
- pymobiledevice3/cli/bonjour.py +44 -40
- pymobiledevice3/cli/cli_common.py +204 -198
- pymobiledevice3/cli/companion_proxy.py +14 -14
- pymobiledevice3/cli/crash.py +105 -56
- pymobiledevice3/cli/developer/__init__.py +62 -0
- pymobiledevice3/cli/developer/accessibility/__init__.py +65 -0
- pymobiledevice3/cli/developer/accessibility/settings.py +43 -0
- pymobiledevice3/cli/developer/arbitration.py +50 -0
- pymobiledevice3/cli/developer/condition.py +33 -0
- pymobiledevice3/cli/developer/core_device.py +294 -0
- pymobiledevice3/cli/developer/debugserver.py +244 -0
- pymobiledevice3/cli/developer/dvt/__init__.py +438 -0
- pymobiledevice3/cli/developer/dvt/core_profile_session.py +295 -0
- pymobiledevice3/cli/developer/dvt/simulate_location.py +56 -0
- pymobiledevice3/cli/developer/dvt/sysmon/__init__.py +69 -0
- pymobiledevice3/cli/developer/dvt/sysmon/process.py +188 -0
- pymobiledevice3/cli/developer/fetch_symbols.py +108 -0
- pymobiledevice3/cli/developer/simulate_location.py +51 -0
- pymobiledevice3/cli/diagnostics/__init__.py +75 -0
- pymobiledevice3/cli/diagnostics/battery.py +47 -0
- pymobiledevice3/cli/idam.py +42 -0
- pymobiledevice3/cli/lockdown.py +108 -103
- pymobiledevice3/cli/mounter.py +158 -99
- pymobiledevice3/cli/notification.py +38 -26
- pymobiledevice3/cli/pcap.py +45 -24
- pymobiledevice3/cli/power_assertion.py +18 -17
- pymobiledevice3/cli/processes.py +17 -23
- pymobiledevice3/cli/profile.py +165 -109
- pymobiledevice3/cli/provision.py +35 -34
- pymobiledevice3/cli/remote.py +217 -129
- pymobiledevice3/cli/restore.py +159 -143
- pymobiledevice3/cli/springboard.py +63 -53
- pymobiledevice3/cli/syslog.py +193 -86
- pymobiledevice3/cli/usbmux.py +73 -33
- pymobiledevice3/cli/version.py +5 -7
- pymobiledevice3/cli/webinspector.py +376 -214
- pymobiledevice3/common.py +3 -1
- pymobiledevice3/exceptions.py +182 -58
- pymobiledevice3/irecv.py +52 -53
- pymobiledevice3/irecv_devices.py +1489 -464
- pymobiledevice3/lockdown.py +473 -275
- pymobiledevice3/lockdown_service_provider.py +15 -8
- pymobiledevice3/osu/os_utils.py +27 -9
- pymobiledevice3/osu/posix_util.py +34 -15
- pymobiledevice3/osu/win_util.py +14 -8
- pymobiledevice3/pair_records.py +102 -21
- pymobiledevice3/remote/common.py +8 -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 +19 -4
- pymobiledevice3/remote/core_device/file_service.py +53 -23
- pymobiledevice3/remote/remote_service_discovery.py +79 -45
- pymobiledevice3/remote/remotexpc.py +73 -44
- pymobiledevice3/remote/tunnel_service.py +442 -317
- pymobiledevice3/remote/utils.py +14 -13
- pymobiledevice3/remote/xpc_message.py +145 -125
- pymobiledevice3/resources/dsc_uuid_map.py +19 -19
- pymobiledevice3/resources/firmware_notifications.py +20 -16
- pymobiledevice3/resources/notifications.txt +144 -0
- pymobiledevice3/restore/asr.py +27 -27
- pymobiledevice3/restore/base_restore.py +110 -21
- pymobiledevice3/restore/consts.py +87 -66
- pymobiledevice3/restore/device.py +59 -12
- pymobiledevice3/restore/fdr.py +46 -48
- pymobiledevice3/restore/ftab.py +19 -19
- pymobiledevice3/restore/img4.py +163 -0
- pymobiledevice3/restore/mbn.py +587 -0
- pymobiledevice3/restore/recovery.py +151 -151
- pymobiledevice3/restore/restore.py +562 -544
- pymobiledevice3/restore/restore_options.py +131 -110
- pymobiledevice3/restore/restored_client.py +51 -31
- pymobiledevice3/restore/tss.py +385 -267
- pymobiledevice3/service_connection.py +252 -59
- pymobiledevice3/services/accessibilityaudit.py +202 -120
- pymobiledevice3/services/afc.py +962 -365
- pymobiledevice3/services/amfi.py +24 -30
- pymobiledevice3/services/companion.py +23 -19
- pymobiledevice3/services/crash_reports.py +71 -47
- pymobiledevice3/services/debugserver_applist.py +3 -3
- pymobiledevice3/services/device_arbitration.py +8 -8
- pymobiledevice3/services/device_link.py +101 -79
- pymobiledevice3/services/diagnostics.py +973 -967
- 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 +20 -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 +35 -10
- pymobiledevice3/services/dvt/instruments/screenshot.py +2 -2
- pymobiledevice3/services/dvt/instruments/sysmontap.py +15 -15
- pymobiledevice3/services/dvt/testmanaged/xcuitest.py +42 -52
- pymobiledevice3/services/file_relay.py +10 -10
- pymobiledevice3/services/heartbeat.py +9 -8
- pymobiledevice3/services/house_arrest.py +16 -15
- pymobiledevice3/services/idam.py +20 -0
- pymobiledevice3/services/installation_proxy.py +173 -81
- pymobiledevice3/services/lockdown_service.py +20 -10
- pymobiledevice3/services/misagent.py +22 -19
- pymobiledevice3/services/mobile_activation.py +147 -64
- pymobiledevice3/services/mobile_config.py +331 -294
- pymobiledevice3/services/mobile_image_mounter.py +141 -113
- pymobiledevice3/services/mobilebackup2.py +203 -145
- pymobiledevice3/services/notification_proxy.py +11 -11
- pymobiledevice3/services/os_trace.py +134 -74
- pymobiledevice3/services/pcapd.py +314 -302
- pymobiledevice3/services/power_assertion.py +10 -9
- pymobiledevice3/services/preboard.py +4 -4
- pymobiledevice3/services/remote_fetch_symbols.py +21 -14
- pymobiledevice3/services/remote_server.py +176 -146
- pymobiledevice3/services/restore_service.py +16 -16
- pymobiledevice3/services/screenshot.py +15 -12
- 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 +11 -11
- pymobiledevice3/services/web_protocol/automation_session.py +251 -239
- pymobiledevice3/services/web_protocol/cdp_screencast.py +46 -37
- pymobiledevice3/services/web_protocol/cdp_server.py +19 -19
- pymobiledevice3/services/web_protocol/cdp_target.py +411 -373
- pymobiledevice3/services/web_protocol/driver.py +114 -111
- pymobiledevice3/services/web_protocol/element.py +124 -111
- pymobiledevice3/services/web_protocol/inspector_session.py +106 -102
- pymobiledevice3/services/web_protocol/selenium_api.py +49 -49
- pymobiledevice3/services/web_protocol/session_protocol.py +18 -12
- pymobiledevice3/services/web_protocol/switch_to.py +30 -27
- pymobiledevice3/services/webinspector.py +189 -155
- pymobiledevice3/tcp_forwarder.py +87 -69
- pymobiledevice3/tunneld/__init__.py +0 -0
- pymobiledevice3/tunneld/api.py +63 -0
- pymobiledevice3/tunneld/server.py +603 -0
- pymobiledevice3/usbmux.py +198 -147
- pymobiledevice3/utils.py +14 -11
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/METADATA +55 -28
- pymobiledevice3-7.0.6.dist-info/RECORD +188 -0
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/WHEEL +1 -1
- pymobiledevice3/cli/developer.py +0 -1215
- pymobiledevice3/cli/diagnostics.py +0 -99
- pymobiledevice3/tunneld.py +0 -524
- pymobiledevice3-4.14.6.dist-info/RECORD +0 -168
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info/licenses}/LICENSE +0 -0
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/top_level.txt +0 -0
|
@@ -9,8 +9,6 @@ from enum import IntEnum
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from tarfile import TarFile
|
|
11
11
|
|
|
12
|
-
from construct import Adapter, Byte, Bytes, Computed, Enum, Int16ul, Int32ul, Optional, RepeatUntil, Struct, this
|
|
13
|
-
|
|
14
12
|
from pymobiledevice3.exceptions import PyMobileDevice3Exception
|
|
15
13
|
from pymobiledevice3.lockdown import LockdownClient
|
|
16
14
|
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
|
|
@@ -18,8 +16,8 @@ from pymobiledevice3.services.lockdown_service import LockdownService
|
|
|
18
16
|
from pymobiledevice3.utils import try_decode
|
|
19
17
|
|
|
20
18
|
CHUNK_SIZE = 4096
|
|
21
|
-
TIME_FORMAT =
|
|
22
|
-
SYSLOG_LINE_SPLITTER =
|
|
19
|
+
TIME_FORMAT = "%H:%M:%S"
|
|
20
|
+
SYSLOG_LINE_SPLITTER = "\n\x00"
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
class SyslogLogLevel(IntEnum):
|
|
@@ -45,52 +43,107 @@ class SyslogEntry:
|
|
|
45
43
|
timestamp: datetime
|
|
46
44
|
level: SyslogLogLevel
|
|
47
45
|
image_name: str
|
|
46
|
+
image_offset: int
|
|
48
47
|
filename: str
|
|
49
48
|
message: str
|
|
50
49
|
label: typing.Optional[SyslogLabel] = None
|
|
51
50
|
|
|
52
51
|
|
|
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
|
-
|
|
52
|
+
def parse_syslog_entry(data: bytes) -> SyslogEntry:
|
|
53
|
+
"""
|
|
54
|
+
Parse a syslog entry from binary data.
|
|
55
|
+
|
|
56
|
+
:param data: Raw binary data
|
|
57
|
+
:return: SyslogEntry
|
|
58
|
+
"""
|
|
59
|
+
offset = 0
|
|
60
|
+
|
|
61
|
+
# Skip first 9 bytes
|
|
62
|
+
offset += 9
|
|
63
|
+
|
|
64
|
+
# Parse pid (4 bytes, little-endian unsigned int)
|
|
65
|
+
pid = struct.unpack("<I", data[offset : offset + 4])[0]
|
|
66
|
+
offset += 4
|
|
67
|
+
|
|
68
|
+
# Skip 42 bytes
|
|
69
|
+
offset += 42
|
|
70
|
+
|
|
71
|
+
# Parse timestamp
|
|
72
|
+
seconds = struct.unpack("<I", data[offset : offset + 4])[0]
|
|
73
|
+
offset += 4
|
|
74
|
+
offset += 4 # Skip 4 bytes
|
|
75
|
+
microseconds = struct.unpack("<I", data[offset : offset + 4])[0]
|
|
76
|
+
offset += 4
|
|
77
|
+
timestamp = datetime.fromtimestamp(seconds + (microseconds / 1000000))
|
|
78
|
+
|
|
79
|
+
# Skip 1 byte
|
|
80
|
+
offset += 1
|
|
81
|
+
|
|
82
|
+
# Parse level (1 byte)
|
|
83
|
+
level = data[offset]
|
|
84
|
+
offset += 1
|
|
85
|
+
|
|
86
|
+
# Skip 38 bytes
|
|
87
|
+
offset += 38
|
|
88
|
+
|
|
89
|
+
# Parse image_name_size (2 bytes, little-endian unsigned short)
|
|
90
|
+
image_name_size = struct.unpack("<H", data[offset : offset + 2])[0]
|
|
91
|
+
offset += 2
|
|
92
|
+
|
|
93
|
+
# Parse message_size (2 bytes, little-endian unsigned short)
|
|
94
|
+
message_size = struct.unpack("<H", data[offset : offset + 2])[0]
|
|
95
|
+
offset += 2
|
|
96
|
+
|
|
97
|
+
# Skip 2 bytes
|
|
98
|
+
offset += 2
|
|
99
|
+
|
|
100
|
+
# Parse sender_image_offset (4 bytes, little-endian unsigned int)
|
|
101
|
+
sender_image_offset = struct.unpack("<I", data[offset : offset + 4])[0]
|
|
102
|
+
offset += 4
|
|
103
|
+
|
|
104
|
+
# Parse subsystem_size (4 bytes, little-endian unsigned int)
|
|
105
|
+
subsystem_size = struct.unpack("<I", data[offset : offset + 4])[0]
|
|
106
|
+
offset += 4
|
|
107
|
+
|
|
108
|
+
# Parse category_size (4 bytes, little-endian unsigned int)
|
|
109
|
+
category_size = struct.unpack("<I", data[offset : offset + 4])[0]
|
|
110
|
+
offset += 4
|
|
111
|
+
|
|
112
|
+
# Skip 4 bytes
|
|
113
|
+
offset += 4
|
|
114
|
+
|
|
115
|
+
# Parse filename (null-terminated)
|
|
116
|
+
filename_end = data.find(b"\x00", offset)
|
|
117
|
+
filename = try_decode(data[offset:filename_end])
|
|
118
|
+
offset = filename_end + 1
|
|
119
|
+
|
|
120
|
+
# Parse image_name
|
|
121
|
+
image_name = try_decode(data[offset : offset + image_name_size - 1])
|
|
122
|
+
offset += image_name_size
|
|
123
|
+
|
|
124
|
+
# Parse message
|
|
125
|
+
message = try_decode(data[offset : offset + message_size - 1])
|
|
126
|
+
offset += message_size
|
|
127
|
+
|
|
128
|
+
# Parse label (optional)
|
|
129
|
+
label = None
|
|
130
|
+
if subsystem_size > 0 and category_size > 0:
|
|
131
|
+
subsystem = try_decode(data[offset : offset + subsystem_size - 1])
|
|
132
|
+
offset += subsystem_size
|
|
133
|
+
category = try_decode(data[offset : offset + category_size - 1])
|
|
134
|
+
offset += category_size
|
|
135
|
+
label = SyslogLabel(subsystem=subsystem, category=category)
|
|
136
|
+
|
|
137
|
+
return SyslogEntry(
|
|
138
|
+
pid=pid,
|
|
139
|
+
timestamp=timestamp,
|
|
140
|
+
level=SyslogLogLevel(level),
|
|
141
|
+
image_name=image_name,
|
|
142
|
+
image_offset=sender_image_offset,
|
|
143
|
+
filename=filename,
|
|
144
|
+
message=message,
|
|
145
|
+
label=label,
|
|
146
|
+
)
|
|
94
147
|
|
|
95
148
|
|
|
96
149
|
class OsTraceService(LockdownService):
|
|
@@ -101,8 +154,9 @@ class OsTraceService(LockdownService):
|
|
|
101
154
|
* Get old stored syslog archive in PAX format (can be extracted using `pax -r < filename`).
|
|
102
155
|
* Archive contain the contents are the `/var/db/diagnostics` directory
|
|
103
156
|
"""
|
|
104
|
-
|
|
105
|
-
|
|
157
|
+
|
|
158
|
+
SERVICE_NAME = "com.apple.os_trace_relay"
|
|
159
|
+
RSD_SERVICE_NAME = "com.apple.os_trace_relay.shim.remote"
|
|
106
160
|
|
|
107
161
|
def __init__(self, lockdown: LockdownServiceProvider):
|
|
108
162
|
if isinstance(lockdown, LockdownClient):
|
|
@@ -111,7 +165,7 @@ class OsTraceService(LockdownService):
|
|
|
111
165
|
super().__init__(lockdown, self.RSD_SERVICE_NAME)
|
|
112
166
|
|
|
113
167
|
def get_pid_list(self):
|
|
114
|
-
self.service.send_plist({
|
|
168
|
+
self.service.send_plist({"Request": "PidList"})
|
|
115
169
|
|
|
116
170
|
# ignore first received unknown byte
|
|
117
171
|
self.service.recvall(1)
|
|
@@ -119,33 +173,44 @@ class OsTraceService(LockdownService):
|
|
|
119
173
|
response = self.service.recv_prefixed()
|
|
120
174
|
return plistlib.loads(response)
|
|
121
175
|
|
|
122
|
-
def create_archive(
|
|
123
|
-
|
|
176
|
+
def create_archive(
|
|
177
|
+
self,
|
|
178
|
+
out: typing.IO,
|
|
179
|
+
size_limit: typing.Optional[int] = None,
|
|
180
|
+
age_limit: typing.Optional[int] = None,
|
|
181
|
+
start_time: typing.Optional[int] = None,
|
|
182
|
+
):
|
|
183
|
+
request = {"Request": "CreateArchive"}
|
|
124
184
|
|
|
125
185
|
if size_limit is not None:
|
|
126
|
-
request.update({
|
|
186
|
+
request.update({"SizeLimit": size_limit})
|
|
127
187
|
|
|
128
188
|
if age_limit is not None:
|
|
129
|
-
request.update({
|
|
189
|
+
request.update({"AgeLimit": age_limit})
|
|
130
190
|
|
|
131
191
|
if start_time is not None:
|
|
132
|
-
request.update({
|
|
192
|
+
request.update({"StartTime": start_time})
|
|
133
193
|
|
|
134
194
|
self.service.send_plist(request)
|
|
135
195
|
|
|
136
|
-
assert
|
|
196
|
+
assert self.service.recvall(1)[0] == 1
|
|
137
197
|
|
|
138
|
-
assert plistlib.loads(self.service.recv_prefixed()).get(
|
|
198
|
+
assert plistlib.loads(self.service.recv_prefixed()).get("Status") == "RequestSuccessful", "Invalid status"
|
|
139
199
|
|
|
140
200
|
while True:
|
|
141
201
|
try:
|
|
142
|
-
assert
|
|
202
|
+
assert self.service.recvall(1)[0] == 3, "invalid magic"
|
|
143
203
|
except ConnectionAbortedError:
|
|
144
204
|
break
|
|
145
|
-
out.write(self.service.recv_prefixed(endianity=
|
|
146
|
-
|
|
147
|
-
def collect(
|
|
148
|
-
|
|
205
|
+
out.write(self.service.recv_prefixed(endianity="<"))
|
|
206
|
+
|
|
207
|
+
def collect(
|
|
208
|
+
self,
|
|
209
|
+
out: str,
|
|
210
|
+
size_limit: typing.Optional[int] = None,
|
|
211
|
+
age_limit: typing.Optional[int] = None,
|
|
212
|
+
start_time: typing.Optional[int] = None,
|
|
213
|
+
) -> None:
|
|
149
214
|
"""
|
|
150
215
|
Collect the system logs into a .logarchive that can be viewed later with tools such as log or Console.
|
|
151
216
|
|
|
@@ -155,28 +220,23 @@ class OsTraceService(LockdownService):
|
|
|
155
220
|
:param start_time: start time of logarchive in unix timestamp
|
|
156
221
|
"""
|
|
157
222
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
158
|
-
file = Path(temp_dir) /
|
|
159
|
-
with open(file,
|
|
223
|
+
file = Path(temp_dir) / "foo.tar"
|
|
224
|
+
with open(file, "wb") as f:
|
|
160
225
|
self.create_archive(f, size_limit=size_limit, age_limit=age_limit, start_time=start_time)
|
|
161
226
|
TarFile(file).extractall(out)
|
|
162
227
|
|
|
163
228
|
def syslog(self, pid=-1) -> typing.Generator[SyslogEntry, None, None]:
|
|
164
|
-
self.service.send_plist({
|
|
229
|
+
self.service.send_plist({"Request": "StartActivity", "MessageFilter": 65535, "Pid": pid, "StreamFlags": 60})
|
|
165
230
|
|
|
166
|
-
length_length, = struct.unpack(
|
|
231
|
+
(length_length,) = struct.unpack("<I", self.service.recvall(4))
|
|
167
232
|
length = int(self.service.recvall(length_length)[::-1].hex(), 16)
|
|
168
233
|
response = plistlib.loads(self.service.recvall(length))
|
|
169
234
|
|
|
170
|
-
if response.get(
|
|
171
|
-
raise PyMobileDevice3Exception(f
|
|
235
|
+
if response.get("Status") != "RequestSuccessful":
|
|
236
|
+
raise PyMobileDevice3Exception(f"got invalid response: {response}")
|
|
172
237
|
|
|
173
238
|
while True:
|
|
174
|
-
assert
|
|
175
|
-
length, = struct.unpack(
|
|
239
|
+
assert self.service.recvall(1) == b"\x02"
|
|
240
|
+
(length,) = struct.unpack("<I", self.service.recvall(4))
|
|
176
241
|
line = self.service.recvall(length)
|
|
177
|
-
|
|
178
|
-
label = None
|
|
179
|
-
if entry.label is not None:
|
|
180
|
-
label = SyslogLabel(subsystem=entry.label.subsystem, category=entry.label.category)
|
|
181
|
-
yield SyslogEntry(pid=entry.pid, timestamp=entry.timestamp, level=SyslogLogLevel(int(entry.level)),
|
|
182
|
-
image_name=entry.image_name, filename=entry.filename, message=entry.message, label=label)
|
|
242
|
+
yield parse_syslog_entry(line)
|