From 34254dfde25d5c10526335289d728ed6d66433a4 Mon Sep 17 00:00:00 2001 From: hakril Date: Thu, 16 Jul 2020 23:35:05 +0200 Subject: [PATCH] Improving NDR packing for some easy to fix corner cases --- windows/rpc/ndr.py | 28 +++++++++++++++++++++++----- windows/wintrust.py | 25 ++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/windows/rpc/ndr.py b/windows/rpc/ndr.py index 2e092f6..f34636e 100644 --- a/windows/rpc/ndr.py +++ b/windows/rpc/ndr.py @@ -266,6 +266,11 @@ class NdrGuid(object): rawguid = stream.partial_unpack("16s")[0] return gdef.IID.from_buffer_copy(rawguid) + @classmethod + def get_alignment(self): + return 1 + + class NdrContextHandle(object): @classmethod def pack(cls, data): @@ -278,6 +283,11 @@ class NdrContextHandle(object): attributes, rawguid = stream.partial_unpack("