From a3514e8d4d00cb207c3610ccbb964150165feac5 Mon Sep 17 00:00:00 2001 From: "Remi GASCOU (Podalirius)" <79218792+p0dalirius@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:41:16 +0200 Subject: [PATCH] Fixed --- ldapconsole.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ldapconsole.py b/ldapconsole.py index 4f11f1f..7211f4e 100755 --- a/ldapconsole.py +++ b/ldapconsole.py @@ -740,7 +740,10 @@ def parseArgs(): if _select_index != -1: _query = " ".join(arguments[0:_select_index]).strip() - _attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ") + if len(arguments[_select_index + 1:]) == 0: + _attrs = [] + else: + _attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ") else: _query = " ".join(arguments[0:]).strip() _attrs = ["*"] @@ -767,7 +770,10 @@ def parseArgs(): _select_index = -1 if _select_index != -1: - _attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ") + if len(arguments[_select_index + 1:]) == 0: + _attrs = [] + else: + _attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ") else: _attrs = ["*"]