From 2bdf6d11a5094ee34ee03d02c4fb6b1ef3fedf6f Mon Sep 17 00:00:00 2001 From: Fox <22664861+Mercury0@users.noreply.github.com> Date: Fri, 30 May 2025 17:33:41 -0700 Subject: [PATCH] Resolve initial CBT value error --- impacket/ldap/ldap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/impacket/ldap/ldap.py b/impacket/ldap/ldap.py index e8b6f75504..b34d5156e2 100644 --- a/impacket/ldap/ldap.py +++ b/impacket/ldap/ldap.py @@ -269,7 +269,9 @@ def kerberosLogin(self, user, password, domain='', lmhash='', nthash='', aesKey= # If TLS is used, setup channel binding - if self._SSL and self.__channel_binding_value is not None: + if self._SSL: + if self.__channel_binding_value is None: + self.__channel_binding_value = self.generateChannelBindingValue() chkField['Bnd'] = self.__channel_binding_value if self.__signing: chkField['Flags'] |= GSS_C_CONF_FLAG