Skip to content

Commit b00b196

Browse files
committed
Handle win 2025 encoding
1 parent 8054fef commit b00b196

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

winlogbeat/tests/system/test_wineventlog.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -457,17 +457,22 @@ def test_multiline_events(self):
457457
"""
458458
wineventlog - Event with newlines and control characters
459459
"""
460+
accountName = "MS4\x1e$"
461+
# Windows 2025 Server encodes message differently
462+
if platform.platform().startswith("Windows-2025Server"):
463+
accountName = "MS4_$"
464+
460465
msg = """
461466
A trusted logon process has been registered with the Local Security Authority.
462467
This logon process will be trusted to submit logon requests.
463468
464469
Subject:
465470
466471
Security ID: SYSTEM
467-
Account Name: MS4\x1e$
472+
Account Name: {accountName}
468473
Account Domain: WORKGROUP
469474
Logon ID: 0x3e7
470-
Logon Process Name: IKE"""
475+
Logon Process Name: IKE""".format(accountName=accountName)
471476
self.write_event_log(msg)
472477
evts = self.read_events()
473478
self.assertTrue(len(evts), 1)

0 commit comments

Comments
 (0)