From f391b8a2a6795ed45a79a9d632f4ba216164b2e5 Mon Sep 17 00:00:00 2001 From: Bryan De Houwer Date: Sun, 18 Sep 2022 20:49:03 +0200 Subject: [PATCH] Bug fix: ensure DN is lowercase --- cme/modules/scan-network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cme/modules/scan-network.py b/cme/modules/scan-network.py index 77f338b6..ce69686e 100644 --- a/cme/modules/scan-network.py +++ b/cme/modules/scan-network.py @@ -39,7 +39,7 @@ def get_dns_resolver(server, context): return dnsresolver def ldap2domain(ldap): - return re.sub(',DC=', '.', ldap[ldap.find('dc='):], flags=re.I)[3:] + return re.sub(',DC=', '.', ldap[ldap.lower().find('dc='):], flags=re.I)[3:] def new_record(rtype, serial): nr = DNS_RECORD() @@ -347,4 +347,4 @@ class DNS_RPC_RECORD_TS(Structure): try: return datetime.datetime(1601,1,1) + datetime.timedelta(microseconds=microseconds) except OverflowError: - return None \ No newline at end of file + return None