Skip to content

Commit 2780d53

Browse files
committed
fixed bug #172
1 parent 8d6ff21 commit 2780d53

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

certipy/lib/ldap.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ def connect(self, version: ssl._SSLMethod = None) -> None:
117117
ldap_pass = "%s:%s" % (self.target.lmhash, self.target.nthash)
118118
else:
119119
ldap_pass = self.target.password
120-
channel_binding = None
120+
channel_binding = {}
121121
if self.target.ldap_channel_binding:
122122
if not hasattr(ldap3, 'TLS_CHANNEL_BINDING'):
123123
raise Exception("To use LDAP channel binding, install the patched ldap3 module: pip3 install git+https://github.com/ly4k/ldap3")
124-
channel_binding = ldap3.TLS_CHANNEL_BINDING if self.target.ldap_channel_binding else None
124+
channel_binding["channel_binding"] = ldap3.TLS_CHANNEL_BINDING if self.target.ldap_channel_binding else None
125125
ldap_conn = ldap3.Connection(
126126
ldap_server,
127127
user=user,
128128
password=ldap_pass,
129129
authentication=ldap3.NTLM,
130130
auto_referrals=False,
131131
receive_timeout=self.target.timeout * 10,
132-
channel_binding=channel_binding,
132+
**channel_binding
133133
)
134134

135135
if not ldap_conn.bound:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="certipy-ad",
8-
version="4.8.1",
8+
version="4.8.2",
99
license="MIT",
1010
author="ly4k",
1111
url="https://github.com/ly4k/Certipy",

0 commit comments

Comments
 (0)