From de289b467b2e30ca6a64dfe52782d5f0843d99e7 Mon Sep 17 00:00:00 2001 From: gabrielg5 Date: Thu, 28 Nov 2024 06:51:58 -0500 Subject: [PATCH] Checking for 'value' != None before creating IWbemClass properties --- impacket/dcerpc/v5/dcom/wmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impacket/dcerpc/v5/dcom/wmi.py b/impacket/dcerpc/v5/dcom/wmi.py index 79a1fb1afc..3f24facf1f 100644 --- a/impacket/dcerpc/v5/dcom/wmi.py +++ b/impacket/dcerpc/v5/dcom/wmi.py @@ -2613,7 +2613,7 @@ def SpawnInstance(self): def createProperties(self, properties): for property in properties: # Do we have an object property? - if properties[property]['type'] == CIM_TYPE_ENUM.CIM_TYPE_OBJECT.value: + if properties[property]['type'] == CIM_TYPE_ENUM.CIM_TYPE_OBJECT.value and properties[property]['value'] != None: # Yes.. let's create an Object for it too objRef = OBJREF_CUSTOM() objRef['iid'] = self._iid