From a167c23c2ae138d5b628396f88680aa199037f7f Mon Sep 17 00:00:00 2001 From: Tony Torres <1903524+juanhundo@users.noreply.github.com> Date: Tue, 20 Feb 2024 03:38:36 -0600 Subject: [PATCH] Update ldap.py (#7) Removed condition checks to see whether 'nthash' and 'lmhash' are not 'None'. --- sectools/windows/ldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sectools/windows/ldap.py b/sectools/windows/ldap.py index b079d2b..a577ecf 100644 --- a/sectools/windows/ldap.py +++ b/sectools/windows/ldap.py @@ -166,7 +166,7 @@ def __init_ldap_connection(target, tls_version, domain, username, password, lmha aeskey=aeskey, kdcHost=kdcHost ) - elif any([nthash is not None, len(nthash) != 0, lmhash is not None, len(lmhash) != 0]): + elif any([len(nthash) != 0, len(lmhash) != 0]): if any([lmhash is None, len(lmhash) == 0]): lmhash = "aad3b435b51404eeaad3b435b51404ee" if any([nthash is None, len(lmhash) == 0]):