From fe3858b6f9d77a6e76216a9a1a7541250cf7e3a1 Mon Sep 17 00:00:00 2001 From: ebfe90 Date: Tue, 19 Jan 2021 16:40:31 +0100 Subject: [PATCH] unicode buffer --- pypykatz/commons/readers/local/common/live_reader_ctypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypykatz/commons/readers/local/common/live_reader_ctypes.py b/pypykatz/commons/readers/local/common/live_reader_ctypes.py index db220c7..05287f6 100644 --- a/pypykatz/commons/readers/local/common/live_reader_ctypes.py +++ b/pypykatz/commons/readers/local/common/live_reader_ctypes.py @@ -97,7 +97,7 @@ def convert_ntpath(exepath): def get_process_full_imagename(pid): _NtQuerySystemInformation = windll.ntdll.NtQuerySystemInformation image_filename = '' - buf = ctypes.create_string_buffer(0x100) + buf = ctypes.create_unicode_buffer(0x100) process_info = SYSTEM_PROCESS_ID_INFORMATION() process_info.ProcessId = ctypes.c_void_p(pid) process_info.ImageName.MaximumLength = len(buf)