From fb1bfd4ad6b0a147696585bafbc11f0e4e8ea2d1 Mon Sep 17 00:00:00 2001 From: "Remi GASCOU (Podalirius)" <79218792+p0dalirius@users.noreply.github.com> Date: Wed, 7 Aug 2024 12:35:27 +0200 Subject: [PATCH] Update debug messages for loading modules --- smbclientng/core/InteractiveShell.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/smbclientng/core/InteractiveShell.py b/smbclientng/core/InteractiveShell.py index 2c5df01..1abe87d 100644 --- a/smbclientng/core/InteractiveShell.py +++ b/smbclientng/core/InteractiveShell.py @@ -1097,7 +1097,7 @@ def __load_modules(self): self.modules.clear() modules_dir = os.path.normpath(os.path.dirname(__file__) + os.path.sep + ".." + os.path.sep + "modules") - self.logger.debug("Loading modules from %s ..." % modules_dir) + self.logger.debug("[>] Loading modules from %s ..." % modules_dir) sys.path.extend([modules_dir]) for file in os.listdir(modules_dir): @@ -1111,17 +1111,17 @@ def __load_modules(self): except AttributeError as err: pass except ImportError as err: - self.logger.debug("Could not load module '%s': %s" % ((file[:-3]), err)) + self.logger.debug("[!] Could not load module '%s': %s" % ((file[:-3]), err)) if self.config.debug: if len(self.modules.keys()) == 0: - self.logger.debug("Loaded 0 modules.") + self.logger.debug("[>] Loaded 0 modules.") elif len(self.modules.keys()) == 1: - self.logger.debug("Loaded 1 module:") + self.logger.debug("[>] Loaded 1 module:") else: - self.logger.debug("Loaded %d modules:" % len(self.modules.keys())) + self.logger.debug("[>] Loaded %d modules:" % len(self.modules.keys())) for modulename in sorted(self.modules.keys()): - self.logger.debug("%s : \"%s\" (%s)" % (self.modules[modulename].name, self.modules[modulename].description, self.modules[modulename])) + self.logger.debug(" | %s : \"%s\" (%s)" % (self.modules[modulename].name, self.modules[modulename].description, self.modules[modulename])) if self.commandCompleterObject is not None: self.commandCompleterObject.commands["module"]["subcommands"] = list(self.modules.keys())