Update ldap.py

line 914 and 916 Comparison edited to "is"

Signed-off-by: termanix <50464194+termanix@users.noreply.github.com>
main
termanix 2024-03-22 18:58:45 +03:00 committed by GitHub
parent c1a2a92816
commit 7c07ab04d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -911,9 +911,9 @@ class ldap(connection):
if parsed_pw_last_set == "1601-01-01 00:00:00":
parsed_pw_last_set = "<never>"
if arguser.get('sAMAccountName').lower() in activeusers and arg == False:
if arguser.get('sAMAccountName').lower() in activeusers and arg is False:
self.logger.highlight(f"{arguser.get('sAMAccountName', ''):<30}{parsed_pw_last_set:<20}{arguser.get('badPwdCount', ''):<8}{arguser.get('description', ''):<60}")
elif (arguser.get('sAMAccountName').lower() not in activeusers) and (arg == True):
elif (arguser.get('sAMAccountName').lower() not in activeusers) and (arg is True):
self.logger.highlight(f"{arguser.get('sAMAccountName', ''):<7} {'(Disabled)':<22}{parsed_pw_last_set:<20}{arguser.get('badPwdCount', ''):<8}{arguser.get('description', ''):<60}")
elif (arguser.get('sAMAccountName').lower() in activeusers) :
self.logger.highlight(f"{arguser.get('sAMAccountName', ''):<30}{parsed_pw_last_set:<20}{arguser.get('badPwdCount', ''):<8}{arguser.get('description', ''):<60}")