@@ -250,20 +250,20 @@ def check_ldaps_cbt(self):
250250 ldap_connection = ldap_impacket .LDAPConnection (url = ldap_url , baseDN = self .baseDN , dstIp = self .host )
251251 ldap_connection ._LDAPConnection__channel_binding_value = None
252252 try :
253- ldap_connection .login (user = " " ,domain = self .domain )
253+ ldap_connection .login (user = " " , domain = self .domain )
254254 except ldap_impacket .LDAPSessionError as e :
255255 if str (e ).find ("data 80090346" ) >= 0 :
256- self .cbt_status = "Always" # CBT is Required
256+ self .cbt_status = "Always" # CBT is Required
257257 elif str (e ).find ("data 52e" ) >= 0 :
258258 ldap_connection = ldap_impacket .LDAPConnection (url = ldap_url , baseDN = self .baseDN , dstIp = self .host )
259259 tmp = bytearray (ldap_connection ._LDAPConnection__channel_binding_value )
260260 tmp [15 ] = (tmp [3 ] + 1 ) % 256
261261 ldap_connection ._LDAPConnection__channel_binding_value = bytes (tmp )
262262 try :
263- ldap_connection .login (user = " " ,domain = self .domain )
263+ ldap_connection .login (user = " " , domain = self .domain )
264264 except ldap_impacket .LDAPSessionError as e :
265265 if str (e ).find ("data 80090346" ) >= 0 :
266- self .cbt_status = "When Supported" # CBT is When Supported
266+ self .cbt_status = "When Supported" # CBT is When Supported
267267
268268 def enum_host_info (self ):
269269 self .hostname = self .target .split ("." )[0 ].upper () if "." in self .target else self .target
@@ -320,7 +320,7 @@ def enum_host_info(self):
320320
321321 def print_host_info (self ):
322322 self .logger .debug ("Printing host info for LDAP" )
323- signing = colored (f "signing:Enforced" , host_info_colors [0 ], attrs = ["bold" ]) if self .signing_required else colored (f "signing:None" , host_info_colors [1 ], attrs = ["bold" ])
323+ signing = colored ("signing:Enforced" , host_info_colors [0 ], attrs = ["bold" ]) if self .signing_required else colored ("signing:None" , host_info_colors [1 ], attrs = ["bold" ])
324324 cbt_status = colored (f"channel binding:{ self .cbt_status } " , host_info_colors [3 ], attrs = ["bold" ]) if self .cbt_status == "Always" else colored (f"channel binding:{ self .cbt_status } " , host_info_colors [2 ], attrs = ["bold" ])
325325 ntlm = colored (f"(NTLM:{ not self .no_ntlm } )" , host_info_colors [2 ], attrs = ["bold" ]) if self .no_ntlm else ""
326326 self .logger .extra ["protocol" ] = "LDAP" if str (self .port ) == "389" else "LDAPS"
0 commit comments