From 2780d5361121dd4ec79da3f64cfb1984c4f779c6 Mon Sep 17 00:00:00 2001 From: Oliver Lyak <53348818+ly4k@users.noreply.github.com> Date: Tue, 26 Sep 2023 02:51:14 +0200 Subject: [PATCH] fixed bug #172 --- certipy/lib/ldap.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/certipy/lib/ldap.py b/certipy/lib/ldap.py index b6c9762..9ac85b1 100755 --- a/certipy/lib/ldap.py +++ b/certipy/lib/ldap.py @@ -117,11 +117,11 @@ def connect(self, version: ssl._SSLMethod = None) -> None: ldap_pass = "%s:%s" % (self.target.lmhash, self.target.nthash) else: ldap_pass = self.target.password - channel_binding = None + channel_binding = {} if self.target.ldap_channel_binding: if not hasattr(ldap3, 'TLS_CHANNEL_BINDING'): raise Exception("To use LDAP channel binding, install the patched ldap3 module: pip3 install git+https://github.com/ly4k/ldap3") - channel_binding = ldap3.TLS_CHANNEL_BINDING if self.target.ldap_channel_binding else None + channel_binding["channel_binding"] = ldap3.TLS_CHANNEL_BINDING if self.target.ldap_channel_binding else None ldap_conn = ldap3.Connection( ldap_server, user=user, @@ -129,7 +129,7 @@ def connect(self, version: ssl._SSLMethod = None) -> None: authentication=ldap3.NTLM, auto_referrals=False, receive_timeout=self.target.timeout * 10, - channel_binding=channel_binding, + **channel_binding ) if not ldap_conn.bound: diff --git a/setup.py b/setup.py index 00285ae..b6413bc 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="certipy-ad", - version="4.8.1", + version="4.8.2", license="MIT", author="ly4k", url="https://github.com/ly4k/Certipy",